1 /* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 * express or implied.
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
17 */
18 // ============================================================(Auto)=
19 // FILE: h245_decoder.c
20 //
21 // DESC: PER Decode routines for H.245
22 // -------------------------------------------------------------------
23 // Copyright (c) 1998- 2000, PacketVideo Corporation.
24 // All Rights Reserved.
25 // ===================================================================
26
27 #include "oscl_base.h"
28 #include "oscl_mem.h"
29 #include "per_headers.h"
30 #include "h245def.h"
31 #include "h245_decoder.h"
32
33 /* <=======================================================> */
34 /* PER-Decoder for MultimediaSystemControlMessage (CHOICE) */
35 /* <=======================================================> */
Decode_MultimediaSystemControlMessage(PS_MultimediaSystemControlMessage x,PS_InStream stream)36 void Decode_MultimediaSystemControlMessage(PS_MultimediaSystemControlMessage x, PS_InStream stream)
37 {
38 x->index = GetChoiceIndex(4, 1, stream);
39 switch (x->index)
40 {
41 case 0:
42 x->request = (PS_RequestMessage) OSCL_DEFAULT_MALLOC(sizeof(S_RequestMessage));
43 Decode_RequestMessage(x->request, stream);
44 break;
45 case 1:
46 x->response = (PS_ResponseMessage) OSCL_DEFAULT_MALLOC(sizeof(S_ResponseMessage));
47 Decode_ResponseMessage(x->response, stream);
48 break;
49 case 2:
50 x->command = (PS_CommandMessage) OSCL_DEFAULT_MALLOC(sizeof(S_CommandMessage));
51 Decode_CommandMessage(x->command, stream);
52 break;
53 case 3:
54 x->indication = (PS_IndicationMessage) OSCL_DEFAULT_MALLOC(sizeof(S_IndicationMessage));
55 Decode_IndicationMessage(x->indication, stream);
56 break;
57 /* ------------------------------- */
58 /* ---- Extension Begins Here ---- */
59 /* ------------------------------- */
60 default:
61 ErrorMessage("Decode_MultimediaSystemControlMessage: Unsupported extension (skipping)");
62 SkipOneExtension(stream);
63 }
64 }
65
66 /* <=======================================> */
67 /* PER-Decoder for RequestMessage (CHOICE) */
68 /* <=======================================> */
Decode_RequestMessage(PS_RequestMessage x,PS_InStream stream)69 void Decode_RequestMessage(PS_RequestMessage x, PS_InStream stream)
70 {
71 x->index = GetChoiceIndex(11, 1, stream);
72 switch (x->index)
73 {
74 case 0:
75 x->nonStandard = (PS_NonStandardMessage) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardMessage));
76 Decode_NonStandardMessage(x->nonStandard, stream);
77 break;
78 case 1:
79 x->masterSlaveDetermination = (PS_MasterSlaveDetermination) OSCL_DEFAULT_MALLOC(sizeof(S_MasterSlaveDetermination));
80 Decode_MasterSlaveDetermination(x->masterSlaveDetermination, stream);
81 break;
82 case 2:
83 x->terminalCapabilitySet = (PS_TerminalCapabilitySet) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalCapabilitySet));
84 Decode_TerminalCapabilitySet(x->terminalCapabilitySet, stream);
85 break;
86 case 3:
87 x->openLogicalChannel = (PS_OpenLogicalChannel) OSCL_DEFAULT_MALLOC(sizeof(S_OpenLogicalChannel));
88 Decode_OpenLogicalChannel(x->openLogicalChannel, stream);
89 break;
90 case 4:
91 x->closeLogicalChannel = (PS_CloseLogicalChannel) OSCL_DEFAULT_MALLOC(sizeof(S_CloseLogicalChannel));
92 Decode_CloseLogicalChannel(x->closeLogicalChannel, stream);
93 break;
94 case 5:
95 x->requestChannelClose = (PS_RequestChannelClose) OSCL_DEFAULT_MALLOC(sizeof(S_RequestChannelClose));
96 Decode_RequestChannelClose(x->requestChannelClose, stream);
97 break;
98 case 6:
99 x->multiplexEntrySend = (PS_MultiplexEntrySend) OSCL_DEFAULT_MALLOC(sizeof(S_MultiplexEntrySend));
100 Decode_MultiplexEntrySend(x->multiplexEntrySend, stream);
101 break;
102 case 7:
103 x->requestMultiplexEntry = (PS_RequestMultiplexEntry) OSCL_DEFAULT_MALLOC(sizeof(S_RequestMultiplexEntry));
104 Decode_RequestMultiplexEntry(x->requestMultiplexEntry, stream);
105 break;
106 case 8:
107 x->requestMode = (PS_RequestMode) OSCL_DEFAULT_MALLOC(sizeof(S_RequestMode));
108 Decode_RequestMode(x->requestMode, stream);
109 break;
110 case 9:
111 x->roundTripDelayRequest = (PS_RoundTripDelayRequest) OSCL_DEFAULT_MALLOC(sizeof(S_RoundTripDelayRequest));
112 Decode_RoundTripDelayRequest(x->roundTripDelayRequest, stream);
113 break;
114 case 10:
115 x->maintenanceLoopRequest = (PS_MaintenanceLoopRequest) OSCL_DEFAULT_MALLOC(sizeof(S_MaintenanceLoopRequest));
116 Decode_MaintenanceLoopRequest(x->maintenanceLoopRequest, stream);
117 break;
118 /* ------------------------------- */
119 /* ---- Extension Begins Here ---- */
120 /* ------------------------------- */
121 case 11:
122 GetLengthDet(stream);
123 x->communicationModeRequest = (PS_CommunicationModeRequest) OSCL_DEFAULT_MALLOC(sizeof(S_CommunicationModeRequest));
124 Decode_CommunicationModeRequest(x->communicationModeRequest, stream);
125 ReadRemainingBits(stream);
126 break;
127 case 12:
128 GetLengthDet(stream);
129 x->conferenceRequest = (PS_ConferenceRequest) OSCL_DEFAULT_MALLOC(sizeof(S_ConferenceRequest));
130 Decode_ConferenceRequest(x->conferenceRequest, stream);
131 ReadRemainingBits(stream);
132 break;
133 case 13:
134 GetLengthDet(stream);
135 x->multilinkRequest = (PS_MultilinkRequest) OSCL_DEFAULT_MALLOC(sizeof(S_MultilinkRequest));
136 Decode_MultilinkRequest(x->multilinkRequest, stream);
137 ReadRemainingBits(stream);
138 break;
139 case 14:
140 GetLengthDet(stream);
141 x->logicalChannelRateRequest = (PS_LogicalChannelRateRequest) OSCL_DEFAULT_MALLOC(sizeof(S_LogicalChannelRateRequest));
142 Decode_LogicalChannelRateRequest(x->logicalChannelRateRequest, stream);
143 ReadRemainingBits(stream);
144 break;
145 default:
146 ErrorMessage("Decode_RequestMessage: Unsupported extension (skipping)");
147 SkipOneExtension(stream);
148 }
149 }
150
151 /* <========================================> */
152 /* PER-Decoder for ResponseMessage (CHOICE) */
153 /* <========================================> */
Decode_ResponseMessage(PS_ResponseMessage x,PS_InStream stream)154 void Decode_ResponseMessage(PS_ResponseMessage x, PS_InStream stream)
155 {
156 x->index = GetChoiceIndex(19, 1, stream);
157 switch (x->index)
158 {
159 case 0:
160 x->nonStandard = (PS_NonStandardMessage) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardMessage));
161 Decode_NonStandardMessage(x->nonStandard, stream);
162 break;
163 case 1:
164 x->masterSlaveDeterminationAck = (PS_MasterSlaveDeterminationAck) OSCL_DEFAULT_MALLOC(sizeof(S_MasterSlaveDeterminationAck));
165 Decode_MasterSlaveDeterminationAck(x->masterSlaveDeterminationAck, stream);
166 break;
167 case 2:
168 x->masterSlaveDeterminationReject = (PS_MasterSlaveDeterminationReject) OSCL_DEFAULT_MALLOC(sizeof(S_MasterSlaveDeterminationReject));
169 Decode_MasterSlaveDeterminationReject(x->masterSlaveDeterminationReject, stream);
170 break;
171 case 3:
172 x->terminalCapabilitySetAck = (PS_TerminalCapabilitySetAck) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalCapabilitySetAck));
173 Decode_TerminalCapabilitySetAck(x->terminalCapabilitySetAck, stream);
174 break;
175 case 4:
176 x->terminalCapabilitySetReject = (PS_TerminalCapabilitySetReject) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalCapabilitySetReject));
177 Decode_TerminalCapabilitySetReject(x->terminalCapabilitySetReject, stream);
178 break;
179 case 5:
180 x->openLogicalChannelAck = (PS_OpenLogicalChannelAck) OSCL_DEFAULT_MALLOC(sizeof(S_OpenLogicalChannelAck));
181 Decode_OpenLogicalChannelAck(x->openLogicalChannelAck, stream);
182 break;
183 case 6:
184 x->openLogicalChannelReject = (PS_OpenLogicalChannelReject) OSCL_DEFAULT_MALLOC(sizeof(S_OpenLogicalChannelReject));
185 Decode_OpenLogicalChannelReject(x->openLogicalChannelReject, stream);
186 break;
187 case 7:
188 x->closeLogicalChannelAck = (PS_CloseLogicalChannelAck) OSCL_DEFAULT_MALLOC(sizeof(S_CloseLogicalChannelAck));
189 Decode_CloseLogicalChannelAck(x->closeLogicalChannelAck, stream);
190 break;
191 case 8:
192 x->requestChannelCloseAck = (PS_RequestChannelCloseAck) OSCL_DEFAULT_MALLOC(sizeof(S_RequestChannelCloseAck));
193 Decode_RequestChannelCloseAck(x->requestChannelCloseAck, stream);
194 break;
195 case 9:
196 x->requestChannelCloseReject = (PS_RequestChannelCloseReject) OSCL_DEFAULT_MALLOC(sizeof(S_RequestChannelCloseReject));
197 Decode_RequestChannelCloseReject(x->requestChannelCloseReject, stream);
198 break;
199 case 10:
200 x->multiplexEntrySendAck = (PS_MultiplexEntrySendAck) OSCL_DEFAULT_MALLOC(sizeof(S_MultiplexEntrySendAck));
201 Decode_MultiplexEntrySendAck(x->multiplexEntrySendAck, stream);
202 break;
203 case 11:
204 x->multiplexEntrySendReject = (PS_MultiplexEntrySendReject) OSCL_DEFAULT_MALLOC(sizeof(S_MultiplexEntrySendReject));
205 Decode_MultiplexEntrySendReject(x->multiplexEntrySendReject, stream);
206 break;
207 case 12:
208 x->requestMultiplexEntryAck = (PS_RequestMultiplexEntryAck) OSCL_DEFAULT_MALLOC(sizeof(S_RequestMultiplexEntryAck));
209 Decode_RequestMultiplexEntryAck(x->requestMultiplexEntryAck, stream);
210 break;
211 case 13:
212 x->requestMultiplexEntryReject = (PS_RequestMultiplexEntryReject) OSCL_DEFAULT_MALLOC(sizeof(S_RequestMultiplexEntryReject));
213 Decode_RequestMultiplexEntryReject(x->requestMultiplexEntryReject, stream);
214 break;
215 case 14:
216 x->requestModeAck = (PS_RequestModeAck) OSCL_DEFAULT_MALLOC(sizeof(S_RequestModeAck));
217 Decode_RequestModeAck(x->requestModeAck, stream);
218 break;
219 case 15:
220 x->requestModeReject = (PS_RequestModeReject) OSCL_DEFAULT_MALLOC(sizeof(S_RequestModeReject));
221 Decode_RequestModeReject(x->requestModeReject, stream);
222 break;
223 case 16:
224 x->roundTripDelayResponse = (PS_RoundTripDelayResponse) OSCL_DEFAULT_MALLOC(sizeof(S_RoundTripDelayResponse));
225 Decode_RoundTripDelayResponse(x->roundTripDelayResponse, stream);
226 break;
227 case 17:
228 x->maintenanceLoopAck = (PS_MaintenanceLoopAck) OSCL_DEFAULT_MALLOC(sizeof(S_MaintenanceLoopAck));
229 Decode_MaintenanceLoopAck(x->maintenanceLoopAck, stream);
230 break;
231 case 18:
232 x->maintenanceLoopReject = (PS_MaintenanceLoopReject) OSCL_DEFAULT_MALLOC(sizeof(S_MaintenanceLoopReject));
233 Decode_MaintenanceLoopReject(x->maintenanceLoopReject, stream);
234 break;
235 /* ------------------------------- */
236 /* ---- Extension Begins Here ---- */
237 /* ------------------------------- */
238 case 19:
239 GetLengthDet(stream);
240 x->communicationModeResponse = (PS_CommunicationModeResponse) OSCL_DEFAULT_MALLOC(sizeof(S_CommunicationModeResponse));
241 Decode_CommunicationModeResponse(x->communicationModeResponse, stream);
242 ReadRemainingBits(stream);
243 break;
244 case 20:
245 GetLengthDet(stream);
246 x->conferenceResponse = (PS_ConferenceResponse) OSCL_DEFAULT_MALLOC(sizeof(S_ConferenceResponse));
247 Decode_ConferenceResponse(x->conferenceResponse, stream);
248 ReadRemainingBits(stream);
249 break;
250 case 21:
251 GetLengthDet(stream);
252 x->multilinkResponse = (PS_MultilinkResponse) OSCL_DEFAULT_MALLOC(sizeof(S_MultilinkResponse));
253 Decode_MultilinkResponse(x->multilinkResponse, stream);
254 ReadRemainingBits(stream);
255 break;
256 case 22:
257 GetLengthDet(stream);
258 x->logicalChannelRateAcknowledge = (PS_LogicalChannelRateAcknowledge) OSCL_DEFAULT_MALLOC(sizeof(S_LogicalChannelRateAcknowledge));
259 Decode_LogicalChannelRateAcknowledge(x->logicalChannelRateAcknowledge, stream);
260 ReadRemainingBits(stream);
261 break;
262 case 23:
263 GetLengthDet(stream);
264 x->logicalChannelRateReject = (PS_LogicalChannelRateReject) OSCL_DEFAULT_MALLOC(sizeof(S_LogicalChannelRateReject));
265 Decode_LogicalChannelRateReject(x->logicalChannelRateReject, stream);
266 ReadRemainingBits(stream);
267 break;
268 default:
269 ErrorMessage("Decode_ResponseMessage: Unsupported extension (skipping)");
270 SkipOneExtension(stream);
271 }
272 }
273
274 /* <=======================================> */
275 /* PER-Decoder for CommandMessage (CHOICE) */
276 /* <=======================================> */
Decode_CommandMessage(PS_CommandMessage x,PS_InStream stream)277 void Decode_CommandMessage(PS_CommandMessage x, PS_InStream stream)
278 {
279 x->index = GetChoiceIndex(7, 1, stream);
280 switch (x->index)
281 {
282 case 0:
283 x->nonStandard = (PS_NonStandardMessage) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardMessage));
284 Decode_NonStandardMessage(x->nonStandard, stream);
285 break;
286 case 1:
287 x->maintenanceLoopOffCommand = (PS_MaintenanceLoopOffCommand) OSCL_DEFAULT_MALLOC(sizeof(S_MaintenanceLoopOffCommand));
288 Decode_MaintenanceLoopOffCommand(x->maintenanceLoopOffCommand, stream);
289 break;
290 case 2:
291 x->sendTerminalCapabilitySet = (PS_SendTerminalCapabilitySet) OSCL_DEFAULT_MALLOC(sizeof(S_SendTerminalCapabilitySet));
292 Decode_SendTerminalCapabilitySet(x->sendTerminalCapabilitySet, stream);
293 break;
294 case 3:
295 x->encryptionCommand = (PS_EncryptionCommand) OSCL_DEFAULT_MALLOC(sizeof(S_EncryptionCommand));
296 Decode_EncryptionCommand(x->encryptionCommand, stream);
297 break;
298 case 4:
299 x->flowControlCommand = (PS_FlowControlCommand) OSCL_DEFAULT_MALLOC(sizeof(S_FlowControlCommand));
300 Decode_FlowControlCommand(x->flowControlCommand, stream);
301 break;
302 case 5:
303 x->endSessionCommand = (PS_EndSessionCommand) OSCL_DEFAULT_MALLOC(sizeof(S_EndSessionCommand));
304 Decode_EndSessionCommand(x->endSessionCommand, stream);
305 break;
306 case 6:
307 x->miscellaneousCommand = (PS_MiscellaneousCommand) OSCL_DEFAULT_MALLOC(sizeof(S_MiscellaneousCommand));
308 Decode_MiscellaneousCommand(x->miscellaneousCommand, stream);
309 break;
310 /* ------------------------------- */
311 /* ---- Extension Begins Here ---- */
312 /* ------------------------------- */
313 case 7:
314 GetLengthDet(stream);
315 x->communicationModeCommand = (PS_CommunicationModeCommand) OSCL_DEFAULT_MALLOC(sizeof(S_CommunicationModeCommand));
316 Decode_CommunicationModeCommand(x->communicationModeCommand, stream);
317 ReadRemainingBits(stream);
318 break;
319 case 8:
320 GetLengthDet(stream);
321 x->conferenceCommand = (PS_ConferenceCommand) OSCL_DEFAULT_MALLOC(sizeof(S_ConferenceCommand));
322 Decode_ConferenceCommand(x->conferenceCommand, stream);
323 ReadRemainingBits(stream);
324 break;
325 case 9:
326 GetLengthDet(stream);
327 x->h223MultiplexReconfiguration = (PS_H223MultiplexReconfiguration) OSCL_DEFAULT_MALLOC(sizeof(S_H223MultiplexReconfiguration));
328 Decode_H223MultiplexReconfiguration(x->h223MultiplexReconfiguration, stream);
329 ReadRemainingBits(stream);
330 break;
331 case 10:
332 GetLengthDet(stream);
333 x->newATMVCCommand = (PS_NewATMVCCommand) OSCL_DEFAULT_MALLOC(sizeof(S_NewATMVCCommand));
334 Decode_NewATMVCCommand(x->newATMVCCommand, stream);
335 ReadRemainingBits(stream);
336 break;
337 default:
338 ErrorMessage("Decode_CommandMessage: Unsupported extension (skipping)");
339 SkipOneExtension(stream);
340 }
341 }
342
343 /* <==========================================> */
344 /* PER-Decoder for IndicationMessage (CHOICE) */
345 /* <==========================================> */
Decode_IndicationMessage(PS_IndicationMessage x,PS_InStream stream)346 void Decode_IndicationMessage(PS_IndicationMessage x, PS_InStream stream)
347 {
348 x->index = GetChoiceIndex(14, 1, stream);
349 switch (x->index)
350 {
351 case 0:
352 x->nonStandard = (PS_NonStandardMessage) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardMessage));
353 Decode_NonStandardMessage(x->nonStandard, stream);
354 break;
355 case 1:
356 x->functionNotUnderstood = (PS_FunctionNotUnderstood) OSCL_DEFAULT_MALLOC(sizeof(S_FunctionNotUnderstood));
357 Decode_FunctionNotUnderstood(x->functionNotUnderstood, stream);
358 break;
359 case 2:
360 x->masterSlaveDeterminationRelease = (PS_MasterSlaveDeterminationRelease) OSCL_DEFAULT_MALLOC(sizeof(S_MasterSlaveDeterminationRelease));
361 Decode_MasterSlaveDeterminationRelease(x->masterSlaveDeterminationRelease, stream);
362 break;
363 case 3:
364 x->terminalCapabilitySetRelease = (PS_TerminalCapabilitySetRelease) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalCapabilitySetRelease));
365 Decode_TerminalCapabilitySetRelease(x->terminalCapabilitySetRelease, stream);
366 break;
367 case 4:
368 x->openLogicalChannelConfirm = (PS_OpenLogicalChannelConfirm) OSCL_DEFAULT_MALLOC(sizeof(S_OpenLogicalChannelConfirm));
369 Decode_OpenLogicalChannelConfirm(x->openLogicalChannelConfirm, stream);
370 break;
371 case 5:
372 x->requestChannelCloseRelease = (PS_RequestChannelCloseRelease) OSCL_DEFAULT_MALLOC(sizeof(S_RequestChannelCloseRelease));
373 Decode_RequestChannelCloseRelease(x->requestChannelCloseRelease, stream);
374 break;
375 case 6:
376 x->multiplexEntrySendRelease = (PS_MultiplexEntrySendRelease) OSCL_DEFAULT_MALLOC(sizeof(S_MultiplexEntrySendRelease));
377 Decode_MultiplexEntrySendRelease(x->multiplexEntrySendRelease, stream);
378 break;
379 case 7:
380 x->requestMultiplexEntryRelease = (PS_RequestMultiplexEntryRelease) OSCL_DEFAULT_MALLOC(sizeof(S_RequestMultiplexEntryRelease));
381 Decode_RequestMultiplexEntryRelease(x->requestMultiplexEntryRelease, stream);
382 break;
383 case 8:
384 x->requestModeRelease = (PS_RequestModeRelease) OSCL_DEFAULT_MALLOC(sizeof(S_RequestModeRelease));
385 Decode_RequestModeRelease(x->requestModeRelease, stream);
386 break;
387 case 9:
388 x->miscellaneousIndication = (PS_MiscellaneousIndication) OSCL_DEFAULT_MALLOC(sizeof(S_MiscellaneousIndication));
389 Decode_MiscellaneousIndication(x->miscellaneousIndication, stream);
390 break;
391 case 10:
392 x->jitterIndication = (PS_JitterIndication) OSCL_DEFAULT_MALLOC(sizeof(S_JitterIndication));
393 Decode_JitterIndication(x->jitterIndication, stream);
394 break;
395 case 11:
396 x->h223SkewIndication = (PS_H223SkewIndication) OSCL_DEFAULT_MALLOC(sizeof(S_H223SkewIndication));
397 Decode_H223SkewIndication(x->h223SkewIndication, stream);
398 break;
399 case 12:
400 x->newATMVCIndication = (PS_NewATMVCIndication) OSCL_DEFAULT_MALLOC(sizeof(S_NewATMVCIndication));
401 Decode_NewATMVCIndication(x->newATMVCIndication, stream);
402 break;
403 case 13:
404 x->userInput = (PS_UserInputIndication) OSCL_DEFAULT_MALLOC(sizeof(S_UserInputIndication));
405 Decode_UserInputIndication(x->userInput, stream);
406 break;
407 /* ------------------------------- */
408 /* ---- Extension Begins Here ---- */
409 /* ------------------------------- */
410 case 14:
411 GetLengthDet(stream);
412 x->h2250MaximumSkewIndication = (PS_H2250MaximumSkewIndication) OSCL_DEFAULT_MALLOC(sizeof(S_H2250MaximumSkewIndication));
413 Decode_H2250MaximumSkewIndication(x->h2250MaximumSkewIndication, stream);
414 ReadRemainingBits(stream);
415 break;
416 case 15:
417 GetLengthDet(stream);
418 x->mcLocationIndication = (PS_MCLocationIndication) OSCL_DEFAULT_MALLOC(sizeof(S_MCLocationIndication));
419 Decode_MCLocationIndication(x->mcLocationIndication, stream);
420 ReadRemainingBits(stream);
421 break;
422 case 16:
423 GetLengthDet(stream);
424 x->conferenceIndication = (PS_ConferenceIndication) OSCL_DEFAULT_MALLOC(sizeof(S_ConferenceIndication));
425 Decode_ConferenceIndication(x->conferenceIndication, stream);
426 ReadRemainingBits(stream);
427 break;
428 case 17:
429 GetLengthDet(stream);
430 x->vendorIdentification = (PS_VendorIdentification) OSCL_DEFAULT_MALLOC(sizeof(S_VendorIdentification));
431 Decode_VendorIdentification(x->vendorIdentification, stream);
432 ReadRemainingBits(stream);
433 break;
434 case 18:
435 GetLengthDet(stream);
436 x->functionNotSupported = (PS_FunctionNotSupported) OSCL_DEFAULT_MALLOC(sizeof(S_FunctionNotSupported));
437 Decode_FunctionNotSupported(x->functionNotSupported, stream);
438 ReadRemainingBits(stream);
439 break;
440 case 19:
441 GetLengthDet(stream);
442 x->multilinkIndication = (PS_MultilinkIndication) OSCL_DEFAULT_MALLOC(sizeof(S_MultilinkIndication));
443 Decode_MultilinkIndication(x->multilinkIndication, stream);
444 ReadRemainingBits(stream);
445 break;
446 case 20:
447 GetLengthDet(stream);
448 x->logicalChannelRateRelease = (PS_LogicalChannelRateRelease) OSCL_DEFAULT_MALLOC(sizeof(S_LogicalChannelRateRelease));
449 Decode_LogicalChannelRateRelease(x->logicalChannelRateRelease, stream);
450 ReadRemainingBits(stream);
451 break;
452 case 21:
453 GetLengthDet(stream);
454 x->flowControlIndication = (PS_FlowControlIndication) OSCL_DEFAULT_MALLOC(sizeof(S_FlowControlIndication));
455 Decode_FlowControlIndication(x->flowControlIndication, stream);
456 ReadRemainingBits(stream);
457 break;
458 default:
459 ErrorMessage("Decode_IndicationMessage: Unsupported extension (skipping)");
460 SkipOneExtension(stream);
461 }
462 }
463
464 /* <=============================================> */
465 /* PER-Decoder for GenericInformation (SEQUENCE) */
466 /* <=============================================> */
Decode_GenericInformation(PS_GenericInformation x,PS_InStream stream)467 void Decode_GenericInformation(PS_GenericInformation x, PS_InStream stream)
468 {
469 uint16 i;
470 uint8 extension;
471 PS_UnknownSigMap map;
472
473 extension = GetBoolean(stream);
474 x->option_of_subMessageIdentifier = GetBoolean(stream);
475 x->option_of_messageContent = GetBoolean(stream);
476 Decode_CapabilityIdentifier(&x->messageIdentifier, stream);
477 if (x->option_of_subMessageIdentifier)
478 {
479 x->subMessageIdentifier = (uint8)GetInteger(0, 127, stream);
480 }
481 if (x->option_of_messageContent)
482 {
483 x->size_of_messageContent = (uint16)GetLengthDet(stream);
484 x->messageContent = (PS_GenericParameter)
485 OSCL_DEFAULT_MALLOC(x->size_of_messageContent * sizeof(S_GenericParameter));
486 for (i = 0; i < x->size_of_messageContent; ++i)
487 {
488 Decode_GenericParameter(x->messageContent + i, stream);
489 }
490 }
491 /* ------------------------------- */
492 /* ---- Extension Begins Here ---- */
493 /* ------------------------------- */
494 if (extension)
495 {
496 map = GetUnknownSigMap(stream);
497 if (SkipUnreadExtensions(map, stream))
498 {
499 ErrorMessageAndLeave("Decode_GenericInformation: Unknown extensions (skipped)");
500 }
501 }
502 }
503
504 /* <=============================================> */
505 /* PER-Decoder for NonStandardMessage (SEQUENCE) */
506 /* <=============================================> */
Decode_NonStandardMessage(PS_NonStandardMessage x,PS_InStream stream)507 void Decode_NonStandardMessage(PS_NonStandardMessage x, PS_InStream stream)
508 {
509 uint8 extension;
510 PS_UnknownSigMap map;
511
512 extension = GetBoolean(stream);
513 Decode_NonStandardParameter(&x->nonStandardData, stream);
514 /* ------------------------------- */
515 /* ---- Extension Begins Here ---- */
516 /* ------------------------------- */
517 if (extension)
518 {
519 map = GetUnknownSigMap(stream);
520 if (SkipUnreadExtensions(map, stream))
521 {
522 ErrorMessage("Decode_NonStandardMessage: Unknown extensions (skipped)");
523 }
524 }
525 }
526
527 /* <===============================================> */
528 /* PER-Decoder for NonStandardParameter (SEQUENCE) */
529 /* <===============================================> */
Decode_NonStandardParameter(PS_NonStandardParameter x,PS_InStream stream)530 void Decode_NonStandardParameter(PS_NonStandardParameter x, PS_InStream stream)
531 {
532 Decode_NonStandardIdentifier(&x->nonStandardIdentifier, stream);
533 GetOctetString(1, 0, 0, &x->data, stream);
534 }
535
536 /* <==============================================> */
537 /* PER-Decoder for NonStandardIdentifier (CHOICE) */
538 /* <==============================================> */
Decode_NonStandardIdentifier(PS_NonStandardIdentifier x,PS_InStream stream)539 void Decode_NonStandardIdentifier(PS_NonStandardIdentifier x, PS_InStream stream)
540 {
541 x->index = GetChoiceIndex(2, 0, stream);
542 switch (x->index)
543 {
544 case 0:
545 x->object = (PS_OBJECTIDENT) OSCL_DEFAULT_MALLOC(sizeof(S_OBJECTIDENT));
546 GetObjectID(x->object, stream);
547 break;
548 case 1:
549 x->h221NonStandard = (PS_H221NonStandard) OSCL_DEFAULT_MALLOC(sizeof(S_H221NonStandard));
550 Decode_H221NonStandard(x->h221NonStandard, stream);
551 break;
552 default:
553 ErrorMessageAndLeave("Decode_NonStandardIdentifier: Illegal CHOICE index");
554 }
555 }
556
557 /* <==========================================> */
558 /* PER-Decoder for H221NonStandard (SEQUENCE) */
559 /* <==========================================> */
Decode_H221NonStandard(PS_H221NonStandard x,PS_InStream stream)560 void Decode_H221NonStandard(PS_H221NonStandard x, PS_InStream stream)
561 {
562 x->t35CountryCode = (uint8) GetInteger(0, 255, stream);
563 x->t35Extension = (uint8) GetInteger(0, 255, stream);
564 x->manufacturerCode = (uint16) GetInteger(0, 65535, stream);
565 }
566
567 /* <===================================================> */
568 /* PER-Decoder for MasterSlaveDetermination (SEQUENCE) */
569 /* <===================================================> */
Decode_MasterSlaveDetermination(PS_MasterSlaveDetermination x,PS_InStream stream)570 void Decode_MasterSlaveDetermination(PS_MasterSlaveDetermination x, PS_InStream stream)
571 {
572 uint8 extension;
573 PS_UnknownSigMap map;
574
575 extension = GetBoolean(stream);
576 x->terminalType = (uint8) GetInteger(0, 255, stream);
577 x->statusDeterminationNumber = GetInteger(0, 16777215, stream);
578 /* ------------------------------- */
579 /* ---- Extension Begins Here ---- */
580 /* ------------------------------- */
581 if (extension)
582 {
583 map = GetUnknownSigMap(stream);
584 if (SkipUnreadExtensions(map, stream))
585 {
586 ErrorMessage("Decode_MasterSlaveDetermination: Unknown extensions (skipped)");
587 }
588 }
589 }
590
591 /* <======================================================> */
592 /* PER-Decoder for MasterSlaveDeterminationAck (SEQUENCE) */
593 /* <======================================================> */
Decode_MasterSlaveDeterminationAck(PS_MasterSlaveDeterminationAck x,PS_InStream stream)594 void Decode_MasterSlaveDeterminationAck(PS_MasterSlaveDeterminationAck x, PS_InStream stream)
595 {
596 uint8 extension;
597 PS_UnknownSigMap map;
598
599 extension = GetBoolean(stream);
600 Decode_Decision(&x->decision, stream);
601 /* ------------------------------- */
602 /* ---- Extension Begins Here ---- */
603 /* ------------------------------- */
604 if (extension)
605 {
606 map = GetUnknownSigMap(stream);
607 if (SkipUnreadExtensions(map, stream))
608 {
609 ErrorMessage("Decode_MasterSlaveDeterminationAck: Unknown extensions (skipped)");
610 }
611 }
612 }
613
614 /* <=================================> */
615 /* PER-Decoder for Decision (CHOICE) */
616 /* <=================================> */
Decode_Decision(PS_Decision x,PS_InStream stream)617 void Decode_Decision(PS_Decision x, PS_InStream stream)
618 {
619 x->index = GetChoiceIndex(2, 0, stream);
620 switch (x->index)
621 {
622 case 0:
623 /* (master is NULL) */
624 break;
625 case 1:
626 /* (slave is NULL) */
627 break;
628 default:
629 ErrorMessageAndLeave("Decode_Decision: Illegal CHOICE index");
630 }
631 }
632
633 /* <=========================================================> */
634 /* PER-Decoder for MasterSlaveDeterminationReject (SEQUENCE) */
635 /* <=========================================================> */
Decode_MasterSlaveDeterminationReject(PS_MasterSlaveDeterminationReject x,PS_InStream stream)636 void Decode_MasterSlaveDeterminationReject(PS_MasterSlaveDeterminationReject x, PS_InStream stream)
637 {
638 uint8 extension;
639 PS_UnknownSigMap map;
640
641 extension = GetBoolean(stream);
642 Decode_MsdRejectCause(&x->msdRejectCause, stream);
643 /* ------------------------------- */
644 /* ---- Extension Begins Here ---- */
645 /* ------------------------------- */
646 if (extension)
647 {
648 map = GetUnknownSigMap(stream);
649 if (SkipUnreadExtensions(map, stream))
650 {
651 ErrorMessage("Decode_MasterSlaveDeterminationReject: Unknown extensions (skipped)");
652 }
653 }
654 }
655
656 /* <=======================================> */
657 /* PER-Decoder for MsdRejectCause (CHOICE) */
658 /* <=======================================> */
Decode_MsdRejectCause(PS_MsdRejectCause x,PS_InStream stream)659 void Decode_MsdRejectCause(PS_MsdRejectCause x, PS_InStream stream)
660 {
661 x->index = GetChoiceIndex(1, 1, stream);
662 switch (x->index)
663 {
664 case 0:
665 /* (identicalNumbers is NULL) */
666 break;
667 /* ------------------------------- */
668 /* ---- Extension Begins Here ---- */
669 /* ------------------------------- */
670 default:
671 ErrorMessage("Decode_MsdRejectCause: Unsupported extension (skipping)");
672 SkipOneExtension(stream);
673 }
674 }
675
676 /* <==========================================================> */
677 /* PER-Decoder for MasterSlaveDeterminationRelease (SEQUENCE) */
678 /* <==========================================================> */
Decode_MasterSlaveDeterminationRelease(PS_MasterSlaveDeterminationRelease x,PS_InStream stream)679 void Decode_MasterSlaveDeterminationRelease(PS_MasterSlaveDeterminationRelease x, PS_InStream stream)
680 {
681 uint8 extension;
682 PS_UnknownSigMap map;
683
684 OSCL_UNUSED_ARG(x);
685
686 extension = GetBoolean(stream);
687 /* ------------------------------- */
688 /* ---- Extension Begins Here ---- */
689 /* ------------------------------- */
690 if (extension)
691 {
692 map = GetUnknownSigMap(stream);
693 if (SkipUnreadExtensions(map, stream))
694 {
695 ErrorMessage("Decode_MasterSlaveDeterminationRelease: Unknown extensions (skipped)");
696 }
697 }
698 }
699
700 /* <================================================> */
701 /* PER-Decoder for TerminalCapabilitySet (SEQUENCE) */
702 /* <================================================> */
Decode_TerminalCapabilitySet(PS_TerminalCapabilitySet x,PS_InStream stream)703 void Decode_TerminalCapabilitySet(PS_TerminalCapabilitySet x, PS_InStream stream)
704 {
705 uint16 i;
706 uint8 extension;
707 PS_UnknownSigMap map;
708
709 extension = GetBoolean(stream);
710 x->option_of_multiplexCapability = GetBoolean(stream);
711 x->option_of_capabilityTable = GetBoolean(stream);
712 x->option_of_capabilityDescriptors = GetBoolean(stream);
713 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
714 GetObjectID(&x->protocolIdentifier, stream);
715 if (x->option_of_multiplexCapability)
716 {
717 Decode_MultiplexCapability(&x->multiplexCapability, stream);
718 }
719 if (x->option_of_capabilityTable)
720 {
721 x->size_of_capabilityTable = (uint16) GetInteger(1, 256, stream);
722 x->capabilityTable = (PS_CapabilityTableEntry)
723 OSCL_DEFAULT_MALLOC(x->size_of_capabilityTable * sizeof(S_CapabilityTableEntry));
724 for (i = 0; i < x->size_of_capabilityTable; ++i)
725 {
726 Decode_CapabilityTableEntry(x->capabilityTable + i, stream);
727 }
728 }
729 if (x->option_of_capabilityDescriptors)
730 {
731 x->size_of_capabilityDescriptors = (uint16) GetInteger(1, 256, stream);
732 x->capabilityDescriptors = (PS_CapabilityDescriptor)
733 OSCL_DEFAULT_MALLOC(x->size_of_capabilityDescriptors * sizeof(S_CapabilityDescriptor));
734 for (i = 0; i < x->size_of_capabilityDescriptors; ++i)
735 {
736 Decode_CapabilityDescriptor(x->capabilityDescriptors + i, stream);
737 }
738 }
739 /* ------------------------------- */
740 /* ---- Extension Begins Here ---- */
741 /* ------------------------------- */
742 x->option_of_genericInformation = OFF;
743 if (extension)
744 {
745 map = GetUnknownSigMap(stream);
746 x->option_of_genericInformation = SigMapValue(0, map);
747 if (x->option_of_genericInformation)
748 {
749 ExtensionPrep(map, stream);
750 x->size_of_genericInformation = (uint16)GetLengthDet(stream);
751 x->genericInformation = (PS_GenericInformation)
752 OSCL_DEFAULT_MALLOC(x->size_of_genericInformation * sizeof(S_GenericInformation));
753 for (i = 0; i < x->size_of_genericInformation; ++i)
754 {
755 Decode_GenericInformation(x->genericInformation + i, stream);
756 }
757 ReadRemainingBits(stream);
758 }
759 if (SkipUnreadExtensions(map, stream))
760 {
761 ErrorMessage("Decode_TerminalCapabilitySet: Unknown extensions (skipped)");
762 }
763 }
764 }
765
766 /* <===============================================> */
767 /* PER-Decoder for CapabilityTableEntry (SEQUENCE) */
768 /* <===============================================> */
Decode_CapabilityTableEntry(PS_CapabilityTableEntry x,PS_InStream stream)769 void Decode_CapabilityTableEntry(PS_CapabilityTableEntry x, PS_InStream stream)
770 {
771 x->option_of_capability = GetBoolean(stream);
772 x->capabilityTableEntryNumber = (uint16) GetInteger(1, 65535, stream);
773 if (x->option_of_capability)
774 {
775 Decode_Capability(&x->capability, stream);
776 }
777 }
778
779 /* <===============================================> */
780 /* PER-Decoder for CapabilityDescriptor (SEQUENCE) */
781 /* <===============================================> */
Decode_CapabilityDescriptor(PS_CapabilityDescriptor x,PS_InStream stream)782 void Decode_CapabilityDescriptor(PS_CapabilityDescriptor x, PS_InStream stream)
783 {
784 uint16 i;
785 x->option_of_simultaneousCapabilities = GetBoolean(stream);
786 x->capabilityDescriptorNumber = (uint8) GetInteger(0, 255, stream);
787 if (x->option_of_simultaneousCapabilities)
788 {
789 x->size_of_simultaneousCapabilities = (uint16) GetInteger(1, 256, stream);
790 x->simultaneousCapabilities = (PS_AlternativeCapabilitySet)
791 OSCL_DEFAULT_MALLOC(x->size_of_simultaneousCapabilities * sizeof(S_AlternativeCapabilitySet));
792 for (i = 0; i < x->size_of_simultaneousCapabilities; ++i)
793 {
794 Decode_AlternativeCapabilitySet(x->simultaneousCapabilities + i, stream);
795 }
796 }
797 }
798
799 /* <======================================================> */
800 /* PER-Decoder for AlternativeCapabilitySet (SEQUENCE-OF) */
801 /* <======================================================> */
Decode_AlternativeCapabilitySet(PS_AlternativeCapabilitySet x,PS_InStream stream)802 void Decode_AlternativeCapabilitySet(PS_AlternativeCapabilitySet x, PS_InStream stream)
803 {
804 uint16 i;
805 x->size = (uint16) GetInteger(1, 256, stream);
806 x->item = (uint32*) OSCL_DEFAULT_MALLOC(x->size * sizeof(uint32));
807 for (i = 0; i < x->size; ++i)
808 {
809 x->item[i] = GetInteger(1, 65535, stream);
810 }
811 }
812
813 /* <===================================================> */
814 /* PER-Decoder for TerminalCapabilitySetAck (SEQUENCE) */
815 /* <===================================================> */
Decode_TerminalCapabilitySetAck(PS_TerminalCapabilitySetAck x,PS_InStream stream)816 void Decode_TerminalCapabilitySetAck(PS_TerminalCapabilitySetAck x, PS_InStream stream)
817 {
818 uint8 extension;
819 PS_UnknownSigMap map;
820
821 extension = GetBoolean(stream);
822 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
823 /* ------------------------------- */
824 /* ---- Extension Begins Here ---- */
825 /* ------------------------------- */
826 if (extension)
827 {
828 map = GetUnknownSigMap(stream);
829 if (SkipUnreadExtensions(map, stream))
830 {
831 ErrorMessage("Decode_TerminalCapabilitySetAck: Unknown extensions (skipped)");
832 }
833 }
834 }
835
836 /* <======================================================> */
837 /* PER-Decoder for TerminalCapabilitySetReject (SEQUENCE) */
838 /* <======================================================> */
Decode_TerminalCapabilitySetReject(PS_TerminalCapabilitySetReject x,PS_InStream stream)839 void Decode_TerminalCapabilitySetReject(PS_TerminalCapabilitySetReject x, PS_InStream stream)
840 {
841 uint8 extension;
842 PS_UnknownSigMap map;
843
844 extension = GetBoolean(stream);
845 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
846 Decode_TcsRejectCause(&x->tcsRejectCause, stream);
847 /* ------------------------------- */
848 /* ---- Extension Begins Here ---- */
849 /* ------------------------------- */
850 if (extension)
851 {
852 map = GetUnknownSigMap(stream);
853 if (SkipUnreadExtensions(map, stream))
854 {
855 ErrorMessage("Decode_TerminalCapabilitySetReject: Unknown extensions (skipped)");
856 }
857 }
858 }
859
860 /* <=======================================> */
861 /* PER-Decoder for TcsRejectCause (CHOICE) */
862 /* <=======================================> */
Decode_TcsRejectCause(PS_TcsRejectCause x,PS_InStream stream)863 void Decode_TcsRejectCause(PS_TcsRejectCause x, PS_InStream stream)
864 {
865 x->index = GetChoiceIndex(4, 1, stream);
866 switch (x->index)
867 {
868 case 0:
869 /* (unspecified is NULL) */
870 break;
871 case 1:
872 /* (undefinedTableEntryUsed is NULL) */
873 break;
874 case 2:
875 /* (descriptorCapacityExceeded is NULL) */
876 break;
877 case 3:
878 x->tableEntryCapacityExceeded = (PS_TableEntryCapacityExceeded) OSCL_DEFAULT_MALLOC(sizeof(S_TableEntryCapacityExceeded));
879 Decode_TableEntryCapacityExceeded(x->tableEntryCapacityExceeded, stream);
880 break;
881 /* ------------------------------- */
882 /* ---- Extension Begins Here ---- */
883 /* ------------------------------- */
884 default:
885 ErrorMessage("Decode_TcsRejectCause: Unsupported extension (skipping)");
886 SkipOneExtension(stream);
887 }
888 }
889
890 /* <===================================================> */
891 /* PER-Decoder for TableEntryCapacityExceeded (CHOICE) */
892 /* <===================================================> */
Decode_TableEntryCapacityExceeded(PS_TableEntryCapacityExceeded x,PS_InStream stream)893 void Decode_TableEntryCapacityExceeded(PS_TableEntryCapacityExceeded x, PS_InStream stream)
894 {
895 x->index = GetChoiceIndex(2, 0, stream);
896 switch (x->index)
897 {
898 case 0:
899 x->highestEntryNumberProcessed = (uint16) GetInteger(1, 65535, stream);
900 break;
901 case 1:
902 /* (noneProcessed is NULL) */
903 break;
904 default:
905 ErrorMessageAndLeave("Decode_TableEntryCapacityExceeded: Illegal CHOICE index");
906 }
907 }
908
909 /* <=======================================================> */
910 /* PER-Decoder for TerminalCapabilitySetRelease (SEQUENCE) */
911 /* <=======================================================> */
Decode_TerminalCapabilitySetRelease(PS_TerminalCapabilitySetRelease x,PS_InStream stream)912 void Decode_TerminalCapabilitySetRelease(PS_TerminalCapabilitySetRelease x, PS_InStream stream)
913 {
914 uint8 extension;
915 PS_UnknownSigMap map;
916
917
918 OSCL_UNUSED_ARG(x);
919
920 extension = GetBoolean(stream);
921 /* ------------------------------- */
922 /* ---- Extension Begins Here ---- */
923 /* ------------------------------- */
924 if (extension)
925 {
926 map = GetUnknownSigMap(stream);
927 if (SkipUnreadExtensions(map, stream))
928 {
929 ErrorMessage("Decode_TerminalCapabilitySetRelease: Unknown extensions (skipped)");
930 }
931 }
932 }
933
934 /* <===================================> */
935 /* PER-Decoder for Capability (CHOICE) */
936 /* <===================================> */
Decode_Capability(PS_Capability x,PS_InStream stream)937 void Decode_Capability(PS_Capability x, PS_InStream stream)
938 {
939 x->index = GetChoiceIndex(12, 1, stream);
940 switch (x->index)
941 {
942 case 0:
943 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
944 Decode_NonStandardParameter(x->nonStandard, stream);
945 break;
946 case 1:
947 x->receiveVideoCapability = (PS_VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_VideoCapability));
948 Decode_VideoCapability(x->receiveVideoCapability, stream);
949 break;
950 case 2:
951 x->transmitVideoCapability = (PS_VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_VideoCapability));
952 Decode_VideoCapability(x->transmitVideoCapability, stream);
953 break;
954 case 3:
955 x->receiveAndTransmitVideoCapability = (PS_VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_VideoCapability));
956 Decode_VideoCapability(x->receiveAndTransmitVideoCapability, stream);
957 break;
958 case 4:
959 x->receiveAudioCapability = (PS_AudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_AudioCapability));
960 Decode_AudioCapability(x->receiveAudioCapability, stream);
961 break;
962 case 5:
963 x->transmitAudioCapability = (PS_AudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_AudioCapability));
964 Decode_AudioCapability(x->transmitAudioCapability, stream);
965 break;
966 case 6:
967 x->receiveAndTransmitAudioCapability = (PS_AudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_AudioCapability));
968 Decode_AudioCapability(x->receiveAndTransmitAudioCapability, stream);
969 break;
970 case 7:
971 x->receiveDataApplicationCapability = (PS_DataApplicationCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataApplicationCapability));
972 Decode_DataApplicationCapability(x->receiveDataApplicationCapability, stream);
973 break;
974 case 8:
975 x->transmitDataApplicationCapability = (PS_DataApplicationCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataApplicationCapability));
976 Decode_DataApplicationCapability(x->transmitDataApplicationCapability, stream);
977 break;
978 case 9:
979 x->receiveAndTransmitDataApplicationCapability = (PS_DataApplicationCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataApplicationCapability));
980 Decode_DataApplicationCapability(x->receiveAndTransmitDataApplicationCapability, stream);
981 break;
982 case 10:
983 x->h233EncryptionTransmitCapability = GetBoolean(stream);
984 break;
985 case 11:
986 x->h233EncryptionReceiveCapability = (PS_H233EncryptionReceiveCapability) OSCL_DEFAULT_MALLOC(sizeof(S_H233EncryptionReceiveCapability));
987 Decode_H233EncryptionReceiveCapability(x->h233EncryptionReceiveCapability, stream);
988 break;
989 /* ------------------------------- */
990 /* ---- Extension Begins Here ---- */
991 /* ------------------------------- */
992 case 12:
993 GetLengthDet(stream);
994 x->conferenceCapability = (PS_ConferenceCapability) OSCL_DEFAULT_MALLOC(sizeof(S_ConferenceCapability));
995 Decode_ConferenceCapability(x->conferenceCapability, stream);
996 ReadRemainingBits(stream);
997 break;
998 case 13:
999 GetLengthDet(stream);
1000 x->h235SecurityCapability = (PS_H235SecurityCapability) OSCL_DEFAULT_MALLOC(sizeof(S_H235SecurityCapability));
1001 Decode_H235SecurityCapability(x->h235SecurityCapability, stream);
1002 ReadRemainingBits(stream);
1003 break;
1004 case 14:
1005 GetLengthDet(stream);
1006 x->maxPendingReplacementFor = (uint8) GetInteger(0, 255, stream);
1007 ReadRemainingBits(stream);
1008 break;
1009 case 15:
1010 GetLengthDet(stream);
1011 x->receiveUserInputCapability = (PS_UserInputCapability) OSCL_DEFAULT_MALLOC(sizeof(S_UserInputCapability));
1012 Decode_UserInputCapability(x->receiveUserInputCapability, stream);
1013 ReadRemainingBits(stream);
1014 break;
1015 case 16:
1016 GetLengthDet(stream);
1017 x->transmitUserInputCapability = (PS_UserInputCapability) OSCL_DEFAULT_MALLOC(sizeof(S_UserInputCapability));
1018 Decode_UserInputCapability(x->transmitUserInputCapability, stream);
1019 ReadRemainingBits(stream);
1020 break;
1021 case 17:
1022 GetLengthDet(stream);
1023 x->receiveAndTransmitUserInputCapability = (PS_UserInputCapability) OSCL_DEFAULT_MALLOC(sizeof(S_UserInputCapability));
1024 Decode_UserInputCapability(x->receiveAndTransmitUserInputCapability, stream);
1025 ReadRemainingBits(stream);
1026 break;
1027 case 18:
1028 GetLengthDet(stream);
1029 x->genericControlCapability = (PS_GenericCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GenericCapability));
1030 Decode_GenericCapability(x->genericControlCapability, stream);
1031 ReadRemainingBits(stream);
1032 break;
1033 default:
1034 ErrorMessage("Decode_Capability: Unsupported extension (skipping)");
1035 SkipOneExtension(stream);
1036 }
1037 }
1038
1039 /* <==========================================================> */
1040 /* PER-Decoder for H233EncryptionReceiveCapability (SEQUENCE) */
1041 /* <==========================================================> */
Decode_H233EncryptionReceiveCapability(PS_H233EncryptionReceiveCapability x,PS_InStream stream)1042 void Decode_H233EncryptionReceiveCapability(PS_H233EncryptionReceiveCapability x, PS_InStream stream)
1043 {
1044 uint8 extension;
1045 PS_UnknownSigMap map;
1046
1047 extension = GetBoolean(stream);
1048 x->h233IVResponseTime = (uint8) GetInteger(0, 255, stream);
1049 /* ------------------------------- */
1050 /* ---- Extension Begins Here ---- */
1051 /* ------------------------------- */
1052 if (extension)
1053 {
1054 map = GetUnknownSigMap(stream);
1055 if (SkipUnreadExtensions(map, stream))
1056 {
1057 ErrorMessage("Decode_H233EncryptionReceiveCapability: Unknown extensions (skipped)");
1058 }
1059 }
1060 }
1061
1062 /* <=================================================> */
1063 /* PER-Decoder for H235SecurityCapability (SEQUENCE) */
1064 /* <=================================================> */
Decode_H235SecurityCapability(PS_H235SecurityCapability x,PS_InStream stream)1065 void Decode_H235SecurityCapability(PS_H235SecurityCapability x, PS_InStream stream)
1066 {
1067 uint8 extension;
1068 PS_UnknownSigMap map;
1069
1070 extension = GetBoolean(stream);
1071 Decode_EncryptionAuthenticationAndIntegrity(&x->encryptionAuthenticationAndIntegrity, stream);
1072 x->mediaCapability = (uint16) GetInteger(1, 65535, stream);
1073 /* ------------------------------- */
1074 /* ---- Extension Begins Here ---- */
1075 /* ------------------------------- */
1076 if (extension)
1077 {
1078 map = GetUnknownSigMap(stream);
1079 if (SkipUnreadExtensions(map, stream))
1080 {
1081 ErrorMessage("Decode_H235SecurityCapability: Unknown extensions (skipped)");
1082 }
1083 }
1084 }
1085
1086 /* <============================================> */
1087 /* PER-Decoder for MultiplexCapability (CHOICE) */
1088 /* <============================================> */
Decode_MultiplexCapability(PS_MultiplexCapability x,PS_InStream stream)1089 void Decode_MultiplexCapability(PS_MultiplexCapability x, PS_InStream stream)
1090 {
1091 x->index = GetChoiceIndex(4, 1, stream);
1092 switch (x->index)
1093 {
1094 case 0:
1095 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
1096 Decode_NonStandardParameter(x->nonStandard, stream);
1097 break;
1098 case 1:
1099 x->h222Capability = (PS_H222Capability) OSCL_DEFAULT_MALLOC(sizeof(S_H222Capability));
1100 Decode_H222Capability(x->h222Capability, stream);
1101 break;
1102 case 2:
1103 x->h223Capability = (PS_H223Capability) OSCL_DEFAULT_MALLOC(sizeof(S_H223Capability));
1104 Decode_H223Capability(x->h223Capability, stream);
1105 break;
1106 case 3:
1107 x->v76Capability = (PS_V76Capability) OSCL_DEFAULT_MALLOC(sizeof(S_V76Capability));
1108 Decode_V76Capability(x->v76Capability, stream);
1109 break;
1110 /* ------------------------------- */
1111 /* ---- Extension Begins Here ---- */
1112 /* ------------------------------- */
1113 case 4:
1114 GetLengthDet(stream);
1115 x->h2250Capability = (PS_H2250Capability) OSCL_DEFAULT_MALLOC(sizeof(S_H2250Capability));
1116 Decode_H2250Capability(x->h2250Capability, stream);
1117 ReadRemainingBits(stream);
1118 break;
1119 case 5:
1120 GetLengthDet(stream);
1121 x->genericMultiplexCapability = (PS_GenericCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GenericCapability));
1122 Decode_GenericCapability(x->genericMultiplexCapability, stream);
1123 ReadRemainingBits(stream);
1124 break;
1125 default:
1126 ErrorMessage("Decode_MultiplexCapability: Unsupported extension (skipping)");
1127 SkipOneExtension(stream);
1128 }
1129 }
1130
1131 /* <=========================================> */
1132 /* PER-Decoder for H222Capability (SEQUENCE) */
1133 /* <=========================================> */
Decode_H222Capability(PS_H222Capability x,PS_InStream stream)1134 void Decode_H222Capability(PS_H222Capability x, PS_InStream stream)
1135 {
1136 uint16 i;
1137 uint8 extension;
1138 PS_UnknownSigMap map;
1139
1140 extension = GetBoolean(stream);
1141 x->numberOfVCs = (uint16) GetInteger(1, 256, stream);
1142 x->size_of_vcCapability = (uint16) GetLengthDet(stream);
1143 x->vcCapability = (PS_VCCapability)
1144 OSCL_DEFAULT_MALLOC(x->size_of_vcCapability * sizeof(S_VCCapability));
1145 for (i = 0; i < x->size_of_vcCapability; ++i)
1146 {
1147 Decode_VCCapability(x->vcCapability + i, stream);
1148 }
1149 /* ------------------------------- */
1150 /* ---- Extension Begins Here ---- */
1151 /* ------------------------------- */
1152 if (extension)
1153 {
1154 map = GetUnknownSigMap(stream);
1155 if (SkipUnreadExtensions(map, stream))
1156 {
1157 ErrorMessage("Decode_H222Capability: Unknown extensions (skipped)");
1158 }
1159 }
1160 }
1161
1162 /* <=======================================> */
1163 /* PER-Decoder for VCCapability (SEQUENCE) */
1164 /* <=======================================> */
Decode_VCCapability(PS_VCCapability x,PS_InStream stream)1165 void Decode_VCCapability(PS_VCCapability x, PS_InStream stream)
1166 {
1167 uint8 extension;
1168 PS_UnknownSigMap map;
1169
1170 extension = GetBoolean(stream);
1171 x->option_of_vccAal1 = GetBoolean(stream);
1172 x->option_of_vccAal5 = GetBoolean(stream);
1173 if (x->option_of_vccAal1)
1174 {
1175 Decode_VccAal1(&x->vccAal1, stream);
1176 }
1177 if (x->option_of_vccAal5)
1178 {
1179 Decode_VccAal5(&x->vccAal5, stream);
1180 }
1181 x->transportStream = GetBoolean(stream);
1182 x->programStream = GetBoolean(stream);
1183 Decode_AvailableBitRates(&x->availableBitRates, stream);
1184 /* ------------------------------- */
1185 /* ---- Extension Begins Here ---- */
1186 /* ------------------------------- */
1187 x->option_of_aal1ViaGateway = OFF;
1188 if (extension)
1189 {
1190 map = GetUnknownSigMap(stream);
1191 x->option_of_aal1ViaGateway = SigMapValue(0, map);
1192 if (x->option_of_aal1ViaGateway)
1193 {
1194 ExtensionPrep(map, stream);
1195 Decode_Aal1ViaGateway(&x->aal1ViaGateway, stream);
1196 ReadRemainingBits(stream);
1197 }
1198 if (SkipUnreadExtensions(map, stream))
1199 {
1200 ErrorMessage("Decode_VCCapability: Unknown extensions (skipped)");
1201 }
1202 }
1203 }
1204
1205 /* <=========================================> */
1206 /* PER-Decoder for Aal1ViaGateway (SEQUENCE) */
1207 /* <=========================================> */
Decode_Aal1ViaGateway(PS_Aal1ViaGateway x,PS_InStream stream)1208 void Decode_Aal1ViaGateway(PS_Aal1ViaGateway x, PS_InStream stream)
1209 {
1210 uint16 i;
1211 uint8 extension;
1212 PS_UnknownSigMap map;
1213
1214 extension = GetBoolean(stream);
1215 x->size_of_gatewayAddress = (uint16) GetInteger(1, 256, stream);
1216 x->gatewayAddress = (PS_Q2931Address)
1217 OSCL_DEFAULT_MALLOC(x->size_of_gatewayAddress * sizeof(S_Q2931Address));
1218 for (i = 0; i < x->size_of_gatewayAddress; ++i)
1219 {
1220 Decode_Q2931Address(x->gatewayAddress + i, stream);
1221 }
1222 x->nullClockRecovery = GetBoolean(stream);
1223 x->srtsClockRecovery = GetBoolean(stream);
1224 x->adaptiveClockRecovery = GetBoolean(stream);
1225 x->nullErrorCorrection = GetBoolean(stream);
1226 x->longInterleaver = GetBoolean(stream);
1227 x->shortInterleaver = GetBoolean(stream);
1228 x->errorCorrectionOnly = GetBoolean(stream);
1229 x->structuredDataTransfer = GetBoolean(stream);
1230 x->partiallyFilledCells = GetBoolean(stream);
1231 /* ------------------------------- */
1232 /* ---- Extension Begins Here ---- */
1233 /* ------------------------------- */
1234 if (extension)
1235 {
1236 map = GetUnknownSigMap(stream);
1237 if (SkipUnreadExtensions(map, stream))
1238 {
1239 ErrorMessage("Decode_Aal1ViaGateway: Unknown extensions (skipped)");
1240 }
1241 }
1242 }
1243
1244 /* <============================================> */
1245 /* PER-Decoder for AvailableBitRates (SEQUENCE) */
1246 /* <============================================> */
Decode_AvailableBitRates(PS_AvailableBitRates x,PS_InStream stream)1247 void Decode_AvailableBitRates(PS_AvailableBitRates x, PS_InStream stream)
1248 {
1249 uint8 extension;
1250 PS_UnknownSigMap map;
1251
1252 extension = GetBoolean(stream);
1253 Decode_VccAal5Type(&x->vccAal5Type, stream);
1254 /* ------------------------------- */
1255 /* ---- Extension Begins Here ---- */
1256 /* ------------------------------- */
1257 if (extension)
1258 {
1259 map = GetUnknownSigMap(stream);
1260 if (SkipUnreadExtensions(map, stream))
1261 {
1262 ErrorMessage("Decode_AvailableBitRates: Unknown extensions (skipped)");
1263 }
1264 }
1265 }
1266
1267 /* <====================================> */
1268 /* PER-Decoder for VccAal5Type (CHOICE) */
1269 /* <====================================> */
Decode_VccAal5Type(PS_VccAal5Type x,PS_InStream stream)1270 void Decode_VccAal5Type(PS_VccAal5Type x, PS_InStream stream)
1271 {
1272 x->index = GetChoiceIndex(2, 0, stream);
1273 switch (x->index)
1274 {
1275 case 0:
1276 x->singleBitRate = (uint16) GetInteger(1, 65535, stream);
1277 break;
1278 case 1:
1279 x->rangeOfBitRates = (PS_RangeOfBitRates) OSCL_DEFAULT_MALLOC(sizeof(S_RangeOfBitRates));
1280 Decode_RangeOfBitRates(x->rangeOfBitRates, stream);
1281 break;
1282 default:
1283 ErrorMessageAndLeave("Decode_VccAal5Type: Illegal CHOICE index");
1284 }
1285 }
1286
1287 /* <==========================================> */
1288 /* PER-Decoder for RangeOfBitRates (SEQUENCE) */
1289 /* <==========================================> */
Decode_RangeOfBitRates(PS_RangeOfBitRates x,PS_InStream stream)1290 void Decode_RangeOfBitRates(PS_RangeOfBitRates x, PS_InStream stream)
1291 {
1292 x->lowerBitRate = (uint16) GetInteger(1, 65535, stream);
1293 x->higherBitRate = (uint16) GetInteger(1, 65535, stream);
1294 }
1295
1296 /* <==================================> */
1297 /* PER-Decoder for VccAal5 (SEQUENCE) */
1298 /* <==================================> */
Decode_VccAal5(PS_VccAal5 x,PS_InStream stream)1299 void Decode_VccAal5(PS_VccAal5 x, PS_InStream stream)
1300 {
1301 uint8 extension;
1302 PS_UnknownSigMap map;
1303
1304 extension = GetBoolean(stream);
1305 x->forwardMaximumSDUSize = (uint16) GetInteger(0, 65535, stream);
1306 x->backwardMaximumSDUSize = (uint16) GetInteger(0, 65535, stream);
1307 /* ------------------------------- */
1308 /* ---- Extension Begins Here ---- */
1309 /* ------------------------------- */
1310 if (extension)
1311 {
1312 map = GetUnknownSigMap(stream);
1313 if (SkipUnreadExtensions(map, stream))
1314 {
1315 ErrorMessage("Decode_VccAal5: Unknown extensions (skipped)");
1316 }
1317 }
1318 }
1319
1320 /* <==================================> */
1321 /* PER-Decoder for VccAal1 (SEQUENCE) */
1322 /* <==================================> */
Decode_VccAal1(PS_VccAal1 x,PS_InStream stream)1323 void Decode_VccAal1(PS_VccAal1 x, PS_InStream stream)
1324 {
1325 uint8 extension;
1326 PS_UnknownSigMap map;
1327
1328 extension = GetBoolean(stream);
1329 x->nullClockRecovery = GetBoolean(stream);
1330 x->srtsClockRecovery = GetBoolean(stream);
1331 x->adaptiveClockRecovery = GetBoolean(stream);
1332 x->nullErrorCorrection = GetBoolean(stream);
1333 x->longInterleaver = GetBoolean(stream);
1334 x->shortInterleaver = GetBoolean(stream);
1335 x->errorCorrectionOnly = GetBoolean(stream);
1336 x->structuredDataTransfer = GetBoolean(stream);
1337 x->partiallyFilledCells = GetBoolean(stream);
1338 /* ------------------------------- */
1339 /* ---- Extension Begins Here ---- */
1340 /* ------------------------------- */
1341 if (extension)
1342 {
1343 map = GetUnknownSigMap(stream);
1344 if (SkipUnreadExtensions(map, stream))
1345 {
1346 ErrorMessage("Decode_VccAal1: Unknown extensions (skipped)");
1347 }
1348 }
1349 }
1350
1351 /* <=========================================> */
1352 /* PER-Decoder for H223Capability (SEQUENCE) */
1353 /* <=========================================> */
Decode_H223Capability(PS_H223Capability x,PS_InStream stream)1354 void Decode_H223Capability(PS_H223Capability x, PS_InStream stream)
1355 {
1356 uint8 extension;
1357 PS_UnknownSigMap map;
1358
1359 extension = GetBoolean(stream);
1360 x->transportWithI_frames = GetBoolean(stream);
1361 x->videoWithAL1 = GetBoolean(stream);
1362 x->videoWithAL2 = GetBoolean(stream);
1363 x->videoWithAL3 = GetBoolean(stream);
1364 x->audioWithAL1 = GetBoolean(stream);
1365 x->audioWithAL2 = GetBoolean(stream);
1366 x->audioWithAL3 = GetBoolean(stream);
1367 x->dataWithAL1 = GetBoolean(stream);
1368 x->dataWithAL2 = GetBoolean(stream);
1369 x->dataWithAL3 = GetBoolean(stream);
1370 x->maximumAl2SDUSize = (uint16) GetInteger(0, 65535, stream);
1371 x->maximumAl3SDUSize = (uint16) GetInteger(0, 65535, stream);
1372 x->maximumDelayJitter = (uint16) GetInteger(0, 1023, stream);
1373 Decode_H223MultiplexTableCapability(&x->h223MultiplexTableCapability, stream);
1374 /* ------------------------------- */
1375 /* ---- Extension Begins Here ---- */
1376 /* ------------------------------- */
1377 x->option_of_maxMUXPDUSizeCapability = OFF;
1378 x->option_of_nsrpSupport = OFF;
1379 x->option_of_mobileOperationTransmitCapability = OFF;
1380 x->option_of_h223AnnexCCapability = OFF;
1381 if (extension)
1382 {
1383 map = GetUnknownSigMap(stream);
1384 x->option_of_maxMUXPDUSizeCapability = SigMapValue(0, map);
1385 if (x->option_of_maxMUXPDUSizeCapability)
1386 {
1387 ExtensionPrep(map, stream);
1388 x->maxMUXPDUSizeCapability = GetBoolean(stream);
1389 ReadRemainingBits(stream);
1390 }
1391 x->option_of_nsrpSupport = SigMapValue(1, map);
1392 if (x->option_of_nsrpSupport)
1393 {
1394 ExtensionPrep(map, stream);
1395 x->nsrpSupport = GetBoolean(stream);
1396 ReadRemainingBits(stream);
1397 }
1398 x->option_of_mobileOperationTransmitCapability = SigMapValue(2, map);
1399 if (x->option_of_mobileOperationTransmitCapability)
1400 {
1401 ExtensionPrep(map, stream);
1402 Decode_MobileOperationTransmitCapability(&x->mobileOperationTransmitCapability, stream);
1403 ReadRemainingBits(stream);
1404 }
1405 x->option_of_h223AnnexCCapability = SigMapValue(3, map);
1406 if (x->option_of_h223AnnexCCapability)
1407 {
1408 ExtensionPrep(map, stream);
1409 Decode_H223AnnexCCapability(&x->h223AnnexCCapability, stream);
1410 ReadRemainingBits(stream);
1411 }
1412 if (SkipUnreadExtensions(map, stream))
1413 {
1414 ErrorMessage("Decode_H223Capability: Unknown extensions (skipped)");
1415 }
1416 }
1417 }
1418
1419 /* <============================================================> */
1420 /* PER-Decoder for MobileOperationTransmitCapability (SEQUENCE) */
1421 /* <============================================================> */
Decode_MobileOperationTransmitCapability(PS_MobileOperationTransmitCapability x,PS_InStream stream)1422 void Decode_MobileOperationTransmitCapability(PS_MobileOperationTransmitCapability x, PS_InStream stream)
1423 {
1424 uint8 extension;
1425 PS_UnknownSigMap map;
1426
1427 extension = GetBoolean(stream);
1428 x->modeChangeCapability = GetBoolean(stream);
1429 x->h223AnnexA = GetBoolean(stream);
1430 x->h223AnnexADoubleFlag = GetBoolean(stream);
1431 x->h223AnnexB = GetBoolean(stream);
1432 x->h223AnnexBwithHeader = GetBoolean(stream);
1433 /* ------------------------------- */
1434 /* ---- Extension Begins Here ---- */
1435 /* ------------------------------- */
1436 if (extension)
1437 {
1438 map = GetUnknownSigMap(stream);
1439 if (SkipUnreadExtensions(map, stream))
1440 {
1441 ErrorMessage("Decode_MobileOperationTransmitCapability: Unknown extensions (skipped)");
1442 }
1443 }
1444 }
1445
1446 /* <=====================================================> */
1447 /* PER-Decoder for H223MultiplexTableCapability (CHOICE) */
1448 /* <=====================================================> */
Decode_H223MultiplexTableCapability(PS_H223MultiplexTableCapability x,PS_InStream stream)1449 void Decode_H223MultiplexTableCapability(PS_H223MultiplexTableCapability x, PS_InStream stream)
1450 {
1451 x->index = GetChoiceIndex(2, 0, stream);
1452 switch (x->index)
1453 {
1454 case 0:
1455 /* (basic is NULL) */
1456 break;
1457 case 1:
1458 x->enhanced = (PS_Enhanced) OSCL_DEFAULT_MALLOC(sizeof(S_Enhanced));
1459 Decode_Enhanced(x->enhanced, stream);
1460 break;
1461 default:
1462 ErrorMessageAndLeave("Decode_H223MultiplexTableCapability: Illegal CHOICE index");
1463 }
1464 }
1465
1466 /* <===================================> */
1467 /* PER-Decoder for Enhanced (SEQUENCE) */
1468 /* <===================================> */
Decode_Enhanced(PS_Enhanced x,PS_InStream stream)1469 void Decode_Enhanced(PS_Enhanced x, PS_InStream stream)
1470 {
1471 uint8 extension;
1472 PS_UnknownSigMap map;
1473
1474 extension = GetBoolean(stream);
1475 x->maximumNestingDepth = (uint8) GetInteger(1, 15, stream);
1476 x->maximumElementListSize = (uint8) GetInteger(2, 255, stream);
1477 x->maximumSubElementListSize = (uint8) GetInteger(2, 255, stream);
1478 /* ------------------------------- */
1479 /* ---- Extension Begins Here ---- */
1480 /* ------------------------------- */
1481 if (extension)
1482 {
1483 map = GetUnknownSigMap(stream);
1484 if (SkipUnreadExtensions(map, stream))
1485 {
1486 ErrorMessage("Decode_Enhanced: Unknown extensions (skipped)");
1487 }
1488 }
1489 }
1490
1491 /* <===============================================> */
1492 /* PER-Decoder for H223AnnexCCapability (SEQUENCE) */
1493 /* <===============================================> */
Decode_H223AnnexCCapability(PS_H223AnnexCCapability x,PS_InStream stream)1494 void Decode_H223AnnexCCapability(PS_H223AnnexCCapability x, PS_InStream stream)
1495 {
1496 uint8 extension;
1497 PS_UnknownSigMap map;
1498
1499 extension = GetBoolean(stream);
1500 x->videoWithAL1M = GetBoolean(stream);
1501 x->videoWithAL2M = GetBoolean(stream);
1502 x->videoWithAL3M = GetBoolean(stream);
1503 x->audioWithAL1M = GetBoolean(stream);
1504 x->audioWithAL2M = GetBoolean(stream);
1505 x->audioWithAL3M = GetBoolean(stream);
1506 x->dataWithAL1M = GetBoolean(stream);
1507 x->dataWithAL2M = GetBoolean(stream);
1508 x->dataWithAL3M = GetBoolean(stream);
1509 x->alpduInterleaving = GetBoolean(stream);
1510 x->maximumAL1MPDUSize = (uint16) GetInteger(0, 65535, stream);
1511 x->maximumAL2MSDUSize = (uint16) GetInteger(0, 65535, stream);
1512 x->maximumAL3MSDUSize = (uint16) GetInteger(0, 65535, stream);
1513 /* ------------------------------- */
1514 /* ---- Extension Begins Here ---- */
1515 /* ------------------------------- */
1516 x->option_of_rsCodeCapability = OFF;
1517 if (extension)
1518 {
1519 map = GetUnknownSigMap(stream);
1520 x->option_of_rsCodeCapability = SigMapValue(0, map);
1521 if (x->option_of_rsCodeCapability)
1522 {
1523 ExtensionPrep(map, stream);
1524 x->rsCodeCapability = GetBoolean(stream);
1525 ReadRemainingBits(stream);
1526 }
1527 if (SkipUnreadExtensions(map, stream))
1528 {
1529 ErrorMessage("Decode_H223AnnexCCapability: Unknown extensions (skipped)");
1530 }
1531 }
1532 }
1533
1534 /* <========================================> */
1535 /* PER-Decoder for V76Capability (SEQUENCE) */
1536 /* <========================================> */
Decode_V76Capability(PS_V76Capability x,PS_InStream stream)1537 void Decode_V76Capability(PS_V76Capability x, PS_InStream stream)
1538 {
1539 uint8 extension;
1540 PS_UnknownSigMap map;
1541
1542 extension = GetBoolean(stream);
1543 x->suspendResumeCapabilitywAddress = GetBoolean(stream);
1544 x->suspendResumeCapabilitywoAddress = GetBoolean(stream);
1545 x->rejCapability = GetBoolean(stream);
1546 x->sREJCapability = GetBoolean(stream);
1547 x->mREJCapability = GetBoolean(stream);
1548 x->crc8bitCapability = GetBoolean(stream);
1549 x->crc16bitCapability = GetBoolean(stream);
1550 x->crc32bitCapability = GetBoolean(stream);
1551 x->uihCapability = GetBoolean(stream);
1552 x->numOfDLCS = (uint16) GetInteger(2, 8191, stream);
1553 x->twoOctetAddressFieldCapability = GetBoolean(stream);
1554 x->loopBackTestCapability = GetBoolean(stream);
1555 x->n401Capability = (uint16) GetInteger(1, 4095, stream);
1556 x->maxWindowSizeCapability = (uint8) GetInteger(1, 127, stream);
1557 Decode_V75Capability(&x->v75Capability, stream);
1558 /* ------------------------------- */
1559 /* ---- Extension Begins Here ---- */
1560 /* ------------------------------- */
1561 if (extension)
1562 {
1563 map = GetUnknownSigMap(stream);
1564 if (SkipUnreadExtensions(map, stream))
1565 {
1566 ErrorMessage("Decode_V76Capability: Unknown extensions (skipped)");
1567 }
1568 }
1569 }
1570
1571 /* <========================================> */
1572 /* PER-Decoder for V75Capability (SEQUENCE) */
1573 /* <========================================> */
Decode_V75Capability(PS_V75Capability x,PS_InStream stream)1574 void Decode_V75Capability(PS_V75Capability x, PS_InStream stream)
1575 {
1576 uint8 extension;
1577 PS_UnknownSigMap map;
1578
1579 extension = GetBoolean(stream);
1580 x->audioHeader = GetBoolean(stream);
1581 /* ------------------------------- */
1582 /* ---- Extension Begins Here ---- */
1583 /* ------------------------------- */
1584 if (extension)
1585 {
1586 map = GetUnknownSigMap(stream);
1587 if (SkipUnreadExtensions(map, stream))
1588 {
1589 ErrorMessage("Decode_V75Capability: Unknown extensions (skipped)");
1590 }
1591 }
1592 }
1593
1594 /* <==========================================> */
1595 /* PER-Decoder for H2250Capability (SEQUENCE) */
1596 /* <==========================================> */
Decode_H2250Capability(PS_H2250Capability x,PS_InStream stream)1597 void Decode_H2250Capability(PS_H2250Capability x, PS_InStream stream)
1598 {
1599 uint16 i;
1600 uint8 extension;
1601 PS_UnknownSigMap map;
1602
1603 extension = GetBoolean(stream);
1604 x->maximumAudioDelayJitter = (uint16) GetInteger(0, 1023, stream);
1605 Decode_MultipointCapability(&x->receiveMultipointCapability, stream);
1606 Decode_MultipointCapability(&x->transmitMultipointCapability, stream);
1607 Decode_MultipointCapability(&x->receiveAndTransmitMultipointCapability, stream);
1608 Decode_McCapability(&x->mcCapability, stream);
1609 x->rtcpVideoControlCapability = GetBoolean(stream);
1610 Decode_MediaPacketizationCapability(&x->mediaPacketizationCapability, stream);
1611 /* ------------------------------- */
1612 /* ---- Extension Begins Here ---- */
1613 /* ------------------------------- */
1614 x->option_of_transportCapability = OFF;
1615 x->option_of_redundancyEncodingCapability = OFF;
1616 x->option_of_logicalChannelSwitchingCapability = OFF;
1617 x->option_of_t120DynamicPortCapability = OFF;
1618 if (extension)
1619 {
1620 map = GetUnknownSigMap(stream);
1621 x->option_of_transportCapability = SigMapValue(0, map);
1622 if (x->option_of_transportCapability)
1623 {
1624 ExtensionPrep(map, stream);
1625 Decode_TransportCapability(&x->transportCapability, stream);
1626 ReadRemainingBits(stream);
1627 }
1628 x->option_of_redundancyEncodingCapability = SigMapValue(1, map);
1629 if (x->option_of_redundancyEncodingCapability)
1630 {
1631 ExtensionPrep(map, stream);
1632 x->size_of_redundancyEncodingCapability = (uint16) GetInteger(1, 256, stream);
1633 x->redundancyEncodingCapability = (PS_RedundancyEncodingCapability)
1634 OSCL_DEFAULT_MALLOC(x->size_of_redundancyEncodingCapability * sizeof(S_RedundancyEncodingCapability));
1635 for (i = 0; i < x->size_of_redundancyEncodingCapability; ++i)
1636 {
1637 Decode_RedundancyEncodingCapability(x->redundancyEncodingCapability + i, stream);
1638 }
1639 ReadRemainingBits(stream);
1640 }
1641 x->option_of_logicalChannelSwitchingCapability = SigMapValue(2, map);
1642 if (x->option_of_logicalChannelSwitchingCapability)
1643 {
1644 ExtensionPrep(map, stream);
1645 x->logicalChannelSwitchingCapability = GetBoolean(stream);
1646 ReadRemainingBits(stream);
1647 }
1648 x->option_of_t120DynamicPortCapability = SigMapValue(3, map);
1649 if (x->option_of_t120DynamicPortCapability)
1650 {
1651 ExtensionPrep(map, stream);
1652 x->t120DynamicPortCapability = GetBoolean(stream);
1653 ReadRemainingBits(stream);
1654 }
1655 if (SkipUnreadExtensions(map, stream))
1656 {
1657 ErrorMessage("Decode_H2250Capability: Unknown extensions (skipped)");
1658 }
1659 }
1660 }
1661
1662 /* <=======================================> */
1663 /* PER-Decoder for McCapability (SEQUENCE) */
1664 /* <=======================================> */
Decode_McCapability(PS_McCapability x,PS_InStream stream)1665 void Decode_McCapability(PS_McCapability x, PS_InStream stream)
1666 {
1667 uint8 extension;
1668 PS_UnknownSigMap map;
1669
1670 extension = GetBoolean(stream);
1671 x->centralizedConferenceMC = GetBoolean(stream);
1672 x->decentralizedConferenceMC = GetBoolean(stream);
1673 /* ------------------------------- */
1674 /* ---- Extension Begins Here ---- */
1675 /* ------------------------------- */
1676 if (extension)
1677 {
1678 map = GetUnknownSigMap(stream);
1679 if (SkipUnreadExtensions(map, stream))
1680 {
1681 ErrorMessage("Decode_McCapability: Unknown extensions (skipped)");
1682 }
1683 }
1684 }
1685
1686 /* <=======================================================> */
1687 /* PER-Decoder for MediaPacketizationCapability (SEQUENCE) */
1688 /* <=======================================================> */
Decode_MediaPacketizationCapability(PS_MediaPacketizationCapability x,PS_InStream stream)1689 void Decode_MediaPacketizationCapability(PS_MediaPacketizationCapability x, PS_InStream stream)
1690 {
1691 uint16 i;
1692 uint8 extension;
1693 PS_UnknownSigMap map;
1694
1695 extension = GetBoolean(stream);
1696 x->h261aVideoPacketization = GetBoolean(stream);
1697 /* ------------------------------- */
1698 /* ---- Extension Begins Here ---- */
1699 /* ------------------------------- */
1700 x->option_of_rtpPayloadType = OFF;
1701 if (extension)
1702 {
1703 map = GetUnknownSigMap(stream);
1704 x->option_of_rtpPayloadType = SigMapValue(0, map);
1705 if (x->option_of_rtpPayloadType)
1706 {
1707 ExtensionPrep(map, stream);
1708 x->size_of_rtpPayloadType = (uint16) GetInteger(1, 256, stream);
1709 x->rtpPayloadType = (PS_RTPPayloadType)
1710 OSCL_DEFAULT_MALLOC(x->size_of_rtpPayloadType * sizeof(S_RTPPayloadType));
1711 for (i = 0; i < x->size_of_rtpPayloadType; ++i)
1712 {
1713 Decode_RTPPayloadType(x->rtpPayloadType + i, stream);
1714 }
1715 ReadRemainingBits(stream);
1716 }
1717 if (SkipUnreadExtensions(map, stream))
1718 {
1719 ErrorMessage("Decode_MediaPacketizationCapability: Unknown extensions (skipped)");
1720 }
1721 }
1722 }
1723
1724 /* <=========================================> */
1725 /* PER-Decoder for RSVPParameters (SEQUENCE) */
1726 /* <=========================================> */
Decode_RSVPParameters(PS_RSVPParameters x,PS_InStream stream)1727 void Decode_RSVPParameters(PS_RSVPParameters x, PS_InStream stream)
1728 {
1729 uint8 extension;
1730 PS_UnknownSigMap map;
1731
1732 extension = GetBoolean(stream);
1733 x->option_of_qosMode = GetBoolean(stream);
1734 x->option_of_tokenRate = GetBoolean(stream);
1735 x->option_of_bucketSize = GetBoolean(stream);
1736 x->option_of_peakRate = GetBoolean(stream);
1737 x->option_of_minPoliced = GetBoolean(stream);
1738 x->option_of_maxPktSize = GetBoolean(stream);
1739 if (x->option_of_qosMode)
1740 {
1741 Decode_QOSMode(&x->qosMode, stream);
1742 }
1743 if (x->option_of_tokenRate)
1744 {
1745 x->tokenRate = GetInteger(1, 0xffffffff, stream);
1746 }
1747 if (x->option_of_bucketSize)
1748 {
1749 x->bucketSize = GetInteger(1, 0xffffffff, stream);
1750 }
1751 if (x->option_of_peakRate)
1752 {
1753 x->peakRate = GetInteger(1, 0xffffffff, stream);
1754 }
1755 if (x->option_of_minPoliced)
1756 {
1757 x->minPoliced = GetInteger(1, 0xffffffff, stream);
1758 }
1759 if (x->option_of_maxPktSize)
1760 {
1761 x->maxPktSize = GetInteger(1, 0xffffffff, stream);
1762 }
1763 /* ------------------------------- */
1764 /* ---- Extension Begins Here ---- */
1765 /* ------------------------------- */
1766 if (extension)
1767 {
1768 map = GetUnknownSigMap(stream);
1769 if (SkipUnreadExtensions(map, stream))
1770 {
1771 ErrorMessage("Decode_RSVPParameters: Unknown extensions (skipped)");
1772 }
1773 }
1774 }
1775
1776 /* <================================> */
1777 /* PER-Decoder for QOSMode (CHOICE) */
1778 /* <================================> */
Decode_QOSMode(PS_QOSMode x,PS_InStream stream)1779 void Decode_QOSMode(PS_QOSMode x, PS_InStream stream)
1780 {
1781 x->index = GetChoiceIndex(2, 1, stream);
1782 switch (x->index)
1783 {
1784 case 0:
1785 /* (guaranteedQOS is NULL) */
1786 break;
1787 case 1:
1788 /* (controlledLoad is NULL) */
1789 break;
1790 /* ------------------------------- */
1791 /* ---- Extension Begins Here ---- */
1792 /* ------------------------------- */
1793 default:
1794 ErrorMessage("Decode_QOSMode: Unsupported extension (skipping)");
1795 SkipOneExtension(stream);
1796 }
1797 }
1798
1799 /* <========================================> */
1800 /* PER-Decoder for ATMParameters (SEQUENCE) */
1801 /* <========================================> */
Decode_ATMParameters(PS_ATMParameters x,PS_InStream stream)1802 void Decode_ATMParameters(PS_ATMParameters x, PS_InStream stream)
1803 {
1804 uint8 extension;
1805 PS_UnknownSigMap map;
1806
1807 extension = GetBoolean(stream);
1808 x->maxNTUSize = (uint16) GetInteger(0, 65535, stream);
1809 x->atmUBR = GetBoolean(stream);
1810 x->atmrtVBR = GetBoolean(stream);
1811 x->atmnrtVBR = GetBoolean(stream);
1812 x->atmABR = GetBoolean(stream);
1813 x->atmCBR = GetBoolean(stream);
1814 /* ------------------------------- */
1815 /* ---- Extension Begins Here ---- */
1816 /* ------------------------------- */
1817 if (extension)
1818 {
1819 map = GetUnknownSigMap(stream);
1820 if (SkipUnreadExtensions(map, stream))
1821 {
1822 ErrorMessage("Decode_ATMParameters: Unknown extensions (skipped)");
1823 }
1824 }
1825 }
1826
1827 /* <========================================> */
1828 /* PER-Decoder for QOSCapability (SEQUENCE) */
1829 /* <========================================> */
Decode_QOSCapability(PS_QOSCapability x,PS_InStream stream)1830 void Decode_QOSCapability(PS_QOSCapability x, PS_InStream stream)
1831 {
1832 uint8 extension;
1833 PS_UnknownSigMap map;
1834
1835 extension = GetBoolean(stream);
1836 x->option_of_nonStandardData = GetBoolean(stream);
1837 x->option_of_rsvpParameters = GetBoolean(stream);
1838 x->option_of_atmParameters = GetBoolean(stream);
1839 if (x->option_of_nonStandardData)
1840 {
1841 Decode_NonStandardParameter(&x->nonStandardData, stream);
1842 }
1843 if (x->option_of_rsvpParameters)
1844 {
1845 Decode_RSVPParameters(&x->rsvpParameters, stream);
1846 }
1847 if (x->option_of_atmParameters)
1848 {
1849 Decode_ATMParameters(&x->atmParameters, stream);
1850 }
1851 /* ------------------------------- */
1852 /* ---- Extension Begins Here ---- */
1853 /* ------------------------------- */
1854 if (extension)
1855 {
1856 map = GetUnknownSigMap(stream);
1857 if (SkipUnreadExtensions(map, stream))
1858 {
1859 ErrorMessage("Decode_QOSCapability: Unknown extensions (skipped)");
1860 }
1861 }
1862 }
1863
1864 /* <===========================================> */
1865 /* PER-Decoder for MediaTransportType (CHOICE) */
1866 /* <===========================================> */
Decode_MediaTransportType(PS_MediaTransportType x,PS_InStream stream)1867 void Decode_MediaTransportType(PS_MediaTransportType x, PS_InStream stream)
1868 {
1869 x->index = GetChoiceIndex(4, 1, stream);
1870 switch (x->index)
1871 {
1872 case 0:
1873 /* (ip_UDP is NULL) */
1874 break;
1875 case 1:
1876 /* (ip_TCP is NULL) */
1877 break;
1878 case 2:
1879 /* (atm_AAL5_UNIDIR is NULL) */
1880 break;
1881 case 3:
1882 /* (atm_AAL5_BIDIR is NULL) */
1883 break;
1884 /* ------------------------------- */
1885 /* ---- Extension Begins Here ---- */
1886 /* ------------------------------- */
1887 case 4:
1888 GetLengthDet(stream);
1889 x->atm_AAL5_compressed = (PS_Atm_AAL5_compressed) OSCL_DEFAULT_MALLOC(sizeof(S_Atm_AAL5_compressed));
1890 Decode_Atm_AAL5_compressed(x->atm_AAL5_compressed, stream);
1891 ReadRemainingBits(stream);
1892 break;
1893 default:
1894 ErrorMessage("Decode_MediaTransportType: Unsupported extension (skipping)");
1895 SkipOneExtension(stream);
1896 }
1897 }
1898
1899 /* <==============================================> */
1900 /* PER-Decoder for Atm_AAL5_compressed (SEQUENCE) */
1901 /* <==============================================> */
Decode_Atm_AAL5_compressed(PS_Atm_AAL5_compressed x,PS_InStream stream)1902 void Decode_Atm_AAL5_compressed(PS_Atm_AAL5_compressed x, PS_InStream stream)
1903 {
1904 uint8 extension;
1905 PS_UnknownSigMap map;
1906
1907 extension = GetBoolean(stream);
1908 x->variable_delta = GetBoolean(stream);
1909 /* ------------------------------- */
1910 /* ---- Extension Begins Here ---- */
1911 /* ------------------------------- */
1912 if (extension)
1913 {
1914 map = GetUnknownSigMap(stream);
1915 if (SkipUnreadExtensions(map, stream))
1916 {
1917 ErrorMessage("Decode_Atm_AAL5_compressed: Unknown extensions (skipped)");
1918 }
1919 }
1920 }
1921
1922 /* <=================================================> */
1923 /* PER-Decoder for MediaChannelCapability (SEQUENCE) */
1924 /* <=================================================> */
Decode_MediaChannelCapability(PS_MediaChannelCapability x,PS_InStream stream)1925 void Decode_MediaChannelCapability(PS_MediaChannelCapability x, PS_InStream stream)
1926 {
1927 uint8 extension;
1928 PS_UnknownSigMap map;
1929
1930 extension = GetBoolean(stream);
1931 x->option_of_mediaTransport = GetBoolean(stream);
1932 if (x->option_of_mediaTransport)
1933 {
1934 Decode_MediaTransportType(&x->mediaTransport, stream);
1935 }
1936 /* ------------------------------- */
1937 /* ---- Extension Begins Here ---- */
1938 /* ------------------------------- */
1939 if (extension)
1940 {
1941 map = GetUnknownSigMap(stream);
1942 if (SkipUnreadExtensions(map, stream))
1943 {
1944 ErrorMessage("Decode_MediaChannelCapability: Unknown extensions (skipped)");
1945 }
1946 }
1947 }
1948
1949 /* <==============================================> */
1950 /* PER-Decoder for TransportCapability (SEQUENCE) */
1951 /* <==============================================> */
Decode_TransportCapability(PS_TransportCapability x,PS_InStream stream)1952 void Decode_TransportCapability(PS_TransportCapability x, PS_InStream stream)
1953 {
1954 uint16 i;
1955 uint8 extension;
1956 PS_UnknownSigMap map;
1957
1958 extension = GetBoolean(stream);
1959 x->option_of_nonStandard = GetBoolean(stream);
1960 x->option_of_qOSCapabilities = GetBoolean(stream);
1961 x->option_of_mediaChannelCapabilities = GetBoolean(stream);
1962 if (x->option_of_nonStandard)
1963 {
1964 Decode_NonStandardParameter(&x->nonStandard, stream);
1965 }
1966 if (x->option_of_qOSCapabilities)
1967 {
1968 x->size_of_qOSCapabilities = (uint16) GetInteger(1, 256, stream);
1969 x->qOSCapabilities = (PS_QOSCapability)
1970 OSCL_DEFAULT_MALLOC(x->size_of_qOSCapabilities * sizeof(S_QOSCapability));
1971 for (i = 0; i < x->size_of_qOSCapabilities; ++i)
1972 {
1973 Decode_QOSCapability(x->qOSCapabilities + i, stream);
1974 }
1975 }
1976 if (x->option_of_mediaChannelCapabilities)
1977 {
1978 x->size_of_mediaChannelCapabilities = (uint16) GetInteger(1, 256, stream);
1979 x->mediaChannelCapabilities = (PS_MediaChannelCapability)
1980 OSCL_DEFAULT_MALLOC(x->size_of_mediaChannelCapabilities * sizeof(S_MediaChannelCapability));
1981 for (i = 0; i < x->size_of_mediaChannelCapabilities; ++i)
1982 {
1983 Decode_MediaChannelCapability(x->mediaChannelCapabilities + i, stream);
1984 }
1985 }
1986 /* ------------------------------- */
1987 /* ---- Extension Begins Here ---- */
1988 /* ------------------------------- */
1989 if (extension)
1990 {
1991 map = GetUnknownSigMap(stream);
1992 if (SkipUnreadExtensions(map, stream))
1993 {
1994 ErrorMessage("Decode_TransportCapability: Unknown extensions (skipped)");
1995 }
1996 }
1997 }
1998
1999 /* <=======================================================> */
2000 /* PER-Decoder for RedundancyEncodingCapability (SEQUENCE) */
2001 /* <=======================================================> */
Decode_RedundancyEncodingCapability(PS_RedundancyEncodingCapability x,PS_InStream stream)2002 void Decode_RedundancyEncodingCapability(PS_RedundancyEncodingCapability x, PS_InStream stream)
2003 {
2004 uint16 i;
2005 uint8 extension;
2006 PS_UnknownSigMap map;
2007
2008 extension = GetBoolean(stream);
2009 x->option_of_secondaryEncoding = GetBoolean(stream);
2010 Decode_RedundancyEncodingMethod(&x->redundancyEncodingMethod, stream);
2011 x->primaryEncoding = (uint16) GetInteger(1, 65535, stream);
2012 if (x->option_of_secondaryEncoding)
2013 {
2014 x->size_of_secondaryEncoding = (uint16) GetInteger(1, 256, stream);
2015 x->secondaryEncoding = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_secondaryEncoding * sizeof(uint32));
2016 for (i = 0; i < x->size_of_secondaryEncoding; ++i)
2017 {
2018 x->secondaryEncoding[i] = GetInteger(1, 65535, stream);
2019 }
2020 }
2021 /* ------------------------------- */
2022 /* ---- Extension Begins Here ---- */
2023 /* ------------------------------- */
2024 if (extension)
2025 {
2026 map = GetUnknownSigMap(stream);
2027 if (SkipUnreadExtensions(map, stream))
2028 {
2029 ErrorMessage("Decode_RedundancyEncodingCapability: Unknown extensions (skipped)");
2030 }
2031 }
2032 }
2033
2034 /* <=================================================> */
2035 /* PER-Decoder for RedundancyEncodingMethod (CHOICE) */
2036 /* <=================================================> */
Decode_RedundancyEncodingMethod(PS_RedundancyEncodingMethod x,PS_InStream stream)2037 void Decode_RedundancyEncodingMethod(PS_RedundancyEncodingMethod x, PS_InStream stream)
2038 {
2039 x->index = GetChoiceIndex(2, 1, stream);
2040 switch (x->index)
2041 {
2042 case 0:
2043 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
2044 Decode_NonStandardParameter(x->nonStandard, stream);
2045 break;
2046 case 1:
2047 /* (rtpAudioRedundancyEncoding is NULL) */
2048 break;
2049 /* ------------------------------- */
2050 /* ---- Extension Begins Here ---- */
2051 /* ------------------------------- */
2052 case 2:
2053 GetLengthDet(stream);
2054 x->rtpH263VideoRedundancyEncoding = (PS_RTPH263VideoRedundancyEncoding) OSCL_DEFAULT_MALLOC(sizeof(S_RTPH263VideoRedundancyEncoding));
2055 Decode_RTPH263VideoRedundancyEncoding(x->rtpH263VideoRedundancyEncoding, stream);
2056 ReadRemainingBits(stream);
2057 break;
2058 default:
2059 ErrorMessage("Decode_RedundancyEncodingMethod: Unsupported extension (skipping)");
2060 SkipOneExtension(stream);
2061 }
2062 }
2063
2064 /* <=========================================================> */
2065 /* PER-Decoder for RTPH263VideoRedundancyEncoding (SEQUENCE) */
2066 /* <=========================================================> */
Decode_RTPH263VideoRedundancyEncoding(PS_RTPH263VideoRedundancyEncoding x,PS_InStream stream)2067 void Decode_RTPH263VideoRedundancyEncoding(PS_RTPH263VideoRedundancyEncoding x, PS_InStream stream)
2068 {
2069 uint16 i;
2070 uint8 extension;
2071 PS_UnknownSigMap map;
2072
2073 extension = GetBoolean(stream);
2074 x->option_of_containedThreads = GetBoolean(stream);
2075 x->numberOfThreads = (uint8) GetInteger(1, 16, stream);
2076 x->framesBetweenSyncPoints = (uint16) GetInteger(1, 256, stream);
2077 Decode_FrameToThreadMapping(&x->frameToThreadMapping, stream);
2078 if (x->option_of_containedThreads)
2079 {
2080 x->size_of_containedThreads = (uint16) GetInteger(1, 256, stream);
2081 x->containedThreads = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_containedThreads * sizeof(uint32));
2082 for (i = 0; i < x->size_of_containedThreads; ++i)
2083 {
2084 x->containedThreads[i] = GetInteger(0, 15, stream);
2085 }
2086 }
2087 /* ------------------------------- */
2088 /* ---- Extension Begins Here ---- */
2089 /* ------------------------------- */
2090 if (extension)
2091 {
2092 map = GetUnknownSigMap(stream);
2093 if (SkipUnreadExtensions(map, stream))
2094 {
2095 ErrorMessage("Decode_RTPH263VideoRedundancyEncoding: Unknown extensions (skipped)");
2096 }
2097 }
2098 }
2099
2100 /* <=============================================> */
2101 /* PER-Decoder for FrameToThreadMapping (CHOICE) */
2102 /* <=============================================> */
Decode_FrameToThreadMapping(PS_FrameToThreadMapping x,PS_InStream stream)2103 void Decode_FrameToThreadMapping(PS_FrameToThreadMapping x, PS_InStream stream)
2104 {
2105 uint16 i;
2106 x->index = GetChoiceIndex(2, 1, stream);
2107 switch (x->index)
2108 {
2109 case 0:
2110 /* (roundrobin is NULL) */
2111 break;
2112 case 1:
2113 x->size = (uint16) GetInteger(1, 256, stream);
2114 x->custom = (PS_RTPH263VideoRedundancyFrameMapping)
2115 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_RTPH263VideoRedundancyFrameMapping));
2116 for (i = 0; i < x->size; ++i)
2117 {
2118 Decode_RTPH263VideoRedundancyFrameMapping(x->custom + i, stream);
2119 }
2120 break;
2121 /* ------------------------------- */
2122 /* ---- Extension Begins Here ---- */
2123 /* ------------------------------- */
2124 default:
2125 ErrorMessage("Decode_FrameToThreadMapping: Unsupported extension (skipping)");
2126 SkipOneExtension(stream);
2127 }
2128 }
2129
2130 /* <=============================================================> */
2131 /* PER-Decoder for RTPH263VideoRedundancyFrameMapping (SEQUENCE) */
2132 /* <=============================================================> */
Decode_RTPH263VideoRedundancyFrameMapping(PS_RTPH263VideoRedundancyFrameMapping x,PS_InStream stream)2133 void Decode_RTPH263VideoRedundancyFrameMapping(PS_RTPH263VideoRedundancyFrameMapping x, PS_InStream stream)
2134 {
2135 uint16 i;
2136 uint8 extension;
2137 PS_UnknownSigMap map;
2138
2139 extension = GetBoolean(stream);
2140 x->threadNumber = (uint8) GetInteger(0, 15, stream);
2141 x->size_of_frameSequence = (uint16) GetInteger(1, 256, stream);
2142 x->frameSequence = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_frameSequence * sizeof(uint32));
2143 for (i = 0; i < x->size_of_frameSequence; ++i)
2144 {
2145 x->frameSequence[i] = GetInteger(0, 255, stream);
2146 }
2147 /* ------------------------------- */
2148 /* ---- Extension Begins Here ---- */
2149 /* ------------------------------- */
2150 if (extension)
2151 {
2152 map = GetUnknownSigMap(stream);
2153 if (SkipUnreadExtensions(map, stream))
2154 {
2155 ErrorMessage("Decode_RTPH263VideoRedundancyFrameMapping: Unknown extensions (skipped)");
2156 }
2157 }
2158 }
2159
2160 /* <===============================================> */
2161 /* PER-Decoder for MultipointCapability (SEQUENCE) */
2162 /* <===============================================> */
Decode_MultipointCapability(PS_MultipointCapability x,PS_InStream stream)2163 void Decode_MultipointCapability(PS_MultipointCapability x, PS_InStream stream)
2164 {
2165 uint16 i;
2166 uint8 extension;
2167 PS_UnknownSigMap map;
2168
2169 extension = GetBoolean(stream);
2170 x->multicastCapability = GetBoolean(stream);
2171 x->multiUniCastConference = GetBoolean(stream);
2172 x->size_of_mediaDistributionCapability = (uint16) GetLengthDet(stream);
2173 x->mediaDistributionCapability = (PS_MediaDistributionCapability)
2174 OSCL_DEFAULT_MALLOC(x->size_of_mediaDistributionCapability * sizeof(S_MediaDistributionCapability));
2175 for (i = 0; i < x->size_of_mediaDistributionCapability; ++i)
2176 {
2177 Decode_MediaDistributionCapability(x->mediaDistributionCapability + i, stream);
2178 }
2179 /* ------------------------------- */
2180 /* ---- Extension Begins Here ---- */
2181 /* ------------------------------- */
2182 if (extension)
2183 {
2184 map = GetUnknownSigMap(stream);
2185 if (SkipUnreadExtensions(map, stream))
2186 {
2187 ErrorMessage("Decode_MultipointCapability: Unknown extensions (skipped)");
2188 }
2189 }
2190 }
2191
2192 /* <======================================================> */
2193 /* PER-Decoder for MediaDistributionCapability (SEQUENCE) */
2194 /* <======================================================> */
Decode_MediaDistributionCapability(PS_MediaDistributionCapability x,PS_InStream stream)2195 void Decode_MediaDistributionCapability(PS_MediaDistributionCapability x, PS_InStream stream)
2196 {
2197 uint16 i;
2198 uint8 extension;
2199 PS_UnknownSigMap map;
2200
2201 extension = GetBoolean(stream);
2202 x->option_of_centralizedData = GetBoolean(stream);
2203 x->option_of_distributedData = GetBoolean(stream);
2204 x->centralizedControl = GetBoolean(stream);
2205 x->distributedControl = GetBoolean(stream);
2206 x->centralizedAudio = GetBoolean(stream);
2207 x->distributedAudio = GetBoolean(stream);
2208 x->centralizedVideo = GetBoolean(stream);
2209 x->distributedVideo = GetBoolean(stream);
2210 if (x->option_of_centralizedData)
2211 {
2212 x->size_of_centralizedData = (uint16) GetLengthDet(stream);
2213 x->centralizedData = (PS_DataApplicationCapability)
2214 OSCL_DEFAULT_MALLOC(x->size_of_centralizedData * sizeof(S_DataApplicationCapability));
2215 for (i = 0; i < x->size_of_centralizedData; ++i)
2216 {
2217 Decode_DataApplicationCapability(x->centralizedData + i, stream);
2218 }
2219 }
2220 if (x->option_of_distributedData)
2221 {
2222 x->size_of_distributedData = (uint16) GetLengthDet(stream);
2223 x->distributedData = (PS_DataApplicationCapability)
2224 OSCL_DEFAULT_MALLOC(x->size_of_distributedData * sizeof(S_DataApplicationCapability));
2225 for (i = 0; i < x->size_of_distributedData; ++i)
2226 {
2227 Decode_DataApplicationCapability(x->distributedData + i, stream);
2228 }
2229 }
2230 /* ------------------------------- */
2231 /* ---- Extension Begins Here ---- */
2232 /* ------------------------------- */
2233 if (extension)
2234 {
2235 map = GetUnknownSigMap(stream);
2236 if (SkipUnreadExtensions(map, stream))
2237 {
2238 ErrorMessage("Decode_MediaDistributionCapability: Unknown extensions (skipped)");
2239 }
2240 }
2241 }
2242
2243 /* <========================================> */
2244 /* PER-Decoder for VideoCapability (CHOICE) */
2245 /* <========================================> */
Decode_VideoCapability(PS_VideoCapability x,PS_InStream stream)2246 void Decode_VideoCapability(PS_VideoCapability x, PS_InStream stream)
2247 {
2248 x->index = GetChoiceIndex(5, 1, stream);
2249 switch (x->index)
2250 {
2251 case 0:
2252 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
2253 Decode_NonStandardParameter(x->nonStandard, stream);
2254 break;
2255 case 1:
2256 x->h261VideoCapability = (PS_H261VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_H261VideoCapability));
2257 Decode_H261VideoCapability(x->h261VideoCapability, stream);
2258 break;
2259 case 2:
2260 x->h262VideoCapability = (PS_H262VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_H262VideoCapability));
2261 Decode_H262VideoCapability(x->h262VideoCapability, stream);
2262 break;
2263 case 3:
2264 x->h263VideoCapability = (PS_H263VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_H263VideoCapability));
2265 Decode_H263VideoCapability(x->h263VideoCapability, stream);
2266 break;
2267 case 4:
2268 x->is11172VideoCapability = (PS_IS11172VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_IS11172VideoCapability));
2269 Decode_IS11172VideoCapability(x->is11172VideoCapability, stream);
2270 break;
2271 /* ------------------------------- */
2272 /* ---- Extension Begins Here ---- */
2273 /* ------------------------------- */
2274 case 5:
2275 GetLengthDet(stream);
2276 x->genericVideoCapability = (PS_GenericCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GenericCapability));
2277 Decode_GenericCapability(x->genericVideoCapability, stream);
2278 ReadRemainingBits(stream);
2279 break;
2280 default:
2281 ErrorMessage("Decode_VideoCapability: Unsupported extension (skipping)");
2282 SkipOneExtension(stream);
2283 }
2284 }
2285
2286 /* <==============================================> */
2287 /* PER-Decoder for H261VideoCapability (SEQUENCE) */
2288 /* <==============================================> */
Decode_H261VideoCapability(PS_H261VideoCapability x,PS_InStream stream)2289 void Decode_H261VideoCapability(PS_H261VideoCapability x, PS_InStream stream)
2290 {
2291 uint8 extension;
2292 PS_UnknownSigMap map;
2293
2294 extension = GetBoolean(stream);
2295 x->option_of_qcifMPI = GetBoolean(stream);
2296 x->option_of_cifMPI = GetBoolean(stream);
2297 if (x->option_of_qcifMPI)
2298 {
2299 x->qcifMPI = (uint8) GetInteger(1, 4, stream);
2300 }
2301 if (x->option_of_cifMPI)
2302 {
2303 x->cifMPI = (uint8) GetInteger(1, 4, stream);
2304 }
2305 x->temporalSpatialTradeOffCapability = GetBoolean(stream);
2306 x->maxBitRate = (uint16) GetInteger(1, 19200, stream);
2307 x->stillImageTransmission = GetBoolean(stream);
2308 /* ------------------------------- */
2309 /* ---- Extension Begins Here ---- */
2310 /* ------------------------------- */
2311 if (extension)
2312 {
2313 map = GetUnknownSigMap(stream);
2314 if (SkipUnreadExtensions(map, stream))
2315 {
2316 ErrorMessage("Decode_H261VideoCapability: Unknown extensions (skipped)");
2317 }
2318 }
2319 }
2320
2321 /* <==============================================> */
2322 /* PER-Decoder for H262VideoCapability (SEQUENCE) */
2323 /* <==============================================> */
Decode_H262VideoCapability(PS_H262VideoCapability x,PS_InStream stream)2324 void Decode_H262VideoCapability(PS_H262VideoCapability x, PS_InStream stream)
2325 {
2326 uint8 extension;
2327 PS_UnknownSigMap map;
2328
2329 extension = GetBoolean(stream);
2330 x->option_of_videoBitRate = GetBoolean(stream);
2331 x->option_of_vbvBufferSize = GetBoolean(stream);
2332 x->option_of_samplesPerLine = GetBoolean(stream);
2333 x->option_of_linesPerFrame = GetBoolean(stream);
2334 x->option_of_framesPerSecond = GetBoolean(stream);
2335 x->option_of_luminanceSampleRate = GetBoolean(stream);
2336 x->profileAndLevel_SPatML = GetBoolean(stream);
2337 x->profileAndLevel_MPatLL = GetBoolean(stream);
2338 x->profileAndLevel_MPatML = GetBoolean(stream);
2339 x->profileAndLevel_MPatH_14 = GetBoolean(stream);
2340 x->profileAndLevel_MPatHL = GetBoolean(stream);
2341 x->profileAndLevel_SNRatLL = GetBoolean(stream);
2342 x->profileAndLevel_SNRatML = GetBoolean(stream);
2343 x->profileAndLevel_SpatialatH_14 = GetBoolean(stream);
2344 x->profileAndLevel_HPatML = GetBoolean(stream);
2345 x->profileAndLevel_HPatH_14 = GetBoolean(stream);
2346 x->profileAndLevel_HPatHL = GetBoolean(stream);
2347 if (x->option_of_videoBitRate)
2348 {
2349 x->videoBitRate = GetInteger(0, 1073741823, stream);
2350 }
2351 if (x->option_of_vbvBufferSize)
2352 {
2353 x->vbvBufferSize = GetInteger(0, 262143, stream);
2354 }
2355 if (x->option_of_samplesPerLine)
2356 {
2357 x->samplesPerLine = (uint16) GetInteger(0, 16383, stream);
2358 }
2359 if (x->option_of_linesPerFrame)
2360 {
2361 x->linesPerFrame = (uint16) GetInteger(0, 16383, stream);
2362 }
2363 if (x->option_of_framesPerSecond)
2364 {
2365 x->framesPerSecond = (uint8) GetInteger(0, 15, stream);
2366 }
2367 if (x->option_of_luminanceSampleRate)
2368 {
2369 x->luminanceSampleRate = GetInteger(0, 0xffffffff, stream);
2370 }
2371 /* ------------------------------- */
2372 /* ---- Extension Begins Here ---- */
2373 /* ------------------------------- */
2374 if (extension)
2375 {
2376 map = GetUnknownSigMap(stream);
2377 if (SkipUnreadExtensions(map, stream))
2378 {
2379 ErrorMessage("Decode_H262VideoCapability: Unknown extensions (skipped)");
2380 }
2381 }
2382 }
2383
2384 /* <==============================================> */
2385 /* PER-Decoder for H263VideoCapability (SEQUENCE) */
2386 /* <==============================================> */
Decode_H263VideoCapability(PS_H263VideoCapability x,PS_InStream stream)2387 void Decode_H263VideoCapability(PS_H263VideoCapability x, PS_InStream stream)
2388 {
2389 uint8 extension;
2390 PS_UnknownSigMap map;
2391
2392 extension = GetBoolean(stream);
2393 x->option_of_sqcifMPI = GetBoolean(stream);
2394 x->option_of_qcifMPI = GetBoolean(stream);
2395 x->option_of_cifMPI = GetBoolean(stream);
2396 x->option_of_cif4MPI = GetBoolean(stream);
2397 x->option_of_cif16MPI = GetBoolean(stream);
2398 x->option_of_hrd_B = GetBoolean(stream);
2399 x->option_of_bppMaxKb = GetBoolean(stream);
2400 if (x->option_of_sqcifMPI)
2401 {
2402 x->sqcifMPI = (uint8) GetInteger(1, 32, stream);
2403 }
2404 if (x->option_of_qcifMPI)
2405 {
2406 x->qcifMPI = (uint8) GetInteger(1, 32, stream);
2407 }
2408 if (x->option_of_cifMPI)
2409 {
2410 x->cifMPI = (uint8) GetInteger(1, 32, stream);
2411 }
2412 if (x->option_of_cif4MPI)
2413 {
2414 x->cif4MPI = (uint8) GetInteger(1, 32, stream);
2415 }
2416 if (x->option_of_cif16MPI)
2417 {
2418 x->cif16MPI = (uint8) GetInteger(1, 32, stream);
2419 }
2420 x->maxBitRate = GetInteger(1, 192400, stream);
2421 x->unrestrictedVector = GetBoolean(stream);
2422 x->arithmeticCoding = GetBoolean(stream);
2423 x->advancedPrediction = GetBoolean(stream);
2424 x->pbFrames = GetBoolean(stream);
2425 x->temporalSpatialTradeOffCapability = GetBoolean(stream);
2426 if (x->option_of_hrd_B)
2427 {
2428 x->hrd_B = GetInteger(0, 524287, stream);
2429 }
2430 if (x->option_of_bppMaxKb)
2431 {
2432 x->bppMaxKb = (uint16) GetInteger(0, 65535, stream);
2433 }
2434 /* ------------------------------- */
2435 /* ---- Extension Begins Here ---- */
2436 /* ------------------------------- */
2437 x->option_of_slowSqcifMPI = OFF;
2438 x->option_of_slowQcifMPI = OFF;
2439 x->option_of_slowCifMPI = OFF;
2440 x->option_of_slowCif4MPI = OFF;
2441 x->option_of_slowCif16MPI = OFF;
2442 x->option_of_errorCompensation = OFF;
2443 x->option_of_enhancementLayerInfo = OFF;
2444 x->option_of_h263Options = OFF;
2445 if (extension)
2446 {
2447 map = GetUnknownSigMap(stream);
2448 x->option_of_slowSqcifMPI = SigMapValue(0, map);
2449 if (x->option_of_slowSqcifMPI)
2450 {
2451 ExtensionPrep(map, stream);
2452 x->slowSqcifMPI = (uint16) GetInteger(1, 3600, stream);
2453 ReadRemainingBits(stream);
2454 }
2455 x->option_of_slowQcifMPI = SigMapValue(1, map);
2456 if (x->option_of_slowQcifMPI)
2457 {
2458 ExtensionPrep(map, stream);
2459 x->slowQcifMPI = (uint16) GetInteger(1, 3600, stream);
2460 ReadRemainingBits(stream);
2461 }
2462 x->option_of_slowCifMPI = SigMapValue(2, map);
2463 if (x->option_of_slowCifMPI)
2464 {
2465 ExtensionPrep(map, stream);
2466 x->slowCifMPI = (uint16) GetInteger(1, 3600, stream);
2467 ReadRemainingBits(stream);
2468 }
2469 x->option_of_slowCif4MPI = SigMapValue(3, map);
2470 if (x->option_of_slowCif4MPI)
2471 {
2472 ExtensionPrep(map, stream);
2473 x->slowCif4MPI = (uint16) GetInteger(1, 3600, stream);
2474 ReadRemainingBits(stream);
2475 }
2476 x->option_of_slowCif16MPI = SigMapValue(4, map);
2477 if (x->option_of_slowCif16MPI)
2478 {
2479 ExtensionPrep(map, stream);
2480 x->slowCif16MPI = (uint16) GetInteger(1, 3600, stream);
2481 ReadRemainingBits(stream);
2482 }
2483 x->option_of_errorCompensation = SigMapValue(5, map);
2484 if (x->option_of_errorCompensation)
2485 {
2486 ExtensionPrep(map, stream);
2487 x->errorCompensation = GetBoolean(stream);
2488 ReadRemainingBits(stream);
2489 }
2490 x->option_of_enhancementLayerInfo = SigMapValue(6, map);
2491 if (x->option_of_enhancementLayerInfo)
2492 {
2493 ExtensionPrep(map, stream);
2494 Decode_EnhancementLayerInfo(&x->enhancementLayerInfo, stream);
2495 ReadRemainingBits(stream);
2496 }
2497 x->option_of_h263Options = SigMapValue(7, map);
2498 if (x->option_of_h263Options)
2499 {
2500 ExtensionPrep(map, stream);
2501 Decode_H263Options(&x->h263Options, stream);
2502 ReadRemainingBits(stream);
2503 }
2504 if (SkipUnreadExtensions(map, stream))
2505 {
2506 ErrorMessage("Decode_H263VideoCapability: Unknown extensions (skipped)");
2507 }
2508 }
2509 }
2510
2511 /* <===============================================> */
2512 /* PER-Decoder for EnhancementLayerInfo (SEQUENCE) */
2513 /* <===============================================> */
Decode_EnhancementLayerInfo(PS_EnhancementLayerInfo x,PS_InStream stream)2514 void Decode_EnhancementLayerInfo(PS_EnhancementLayerInfo x, PS_InStream stream)
2515 {
2516 uint16 i;
2517 uint8 extension;
2518 PS_UnknownSigMap map;
2519
2520 extension = GetBoolean(stream);
2521 x->option_of_snrEnhancement = GetBoolean(stream);
2522 x->option_of_spatialEnhancement = GetBoolean(stream);
2523 x->option_of_bPictureEnhancement = GetBoolean(stream);
2524 x->baseBitRateConstrained = GetBoolean(stream);
2525 if (x->option_of_snrEnhancement)
2526 {
2527 x->size_of_snrEnhancement = (uint8) GetInteger(1, 14, stream);
2528 x->snrEnhancement = (PS_EnhancementOptions)
2529 OSCL_DEFAULT_MALLOC(x->size_of_snrEnhancement * sizeof(S_EnhancementOptions));
2530 for (i = 0; i < x->size_of_snrEnhancement; ++i)
2531 {
2532 Decode_EnhancementOptions(x->snrEnhancement + i, stream);
2533 }
2534 }
2535 if (x->option_of_spatialEnhancement)
2536 {
2537 x->size_of_spatialEnhancement = (uint8) GetInteger(1, 14, stream);
2538 x->spatialEnhancement = (PS_EnhancementOptions)
2539 OSCL_DEFAULT_MALLOC(x->size_of_spatialEnhancement * sizeof(S_EnhancementOptions));
2540 for (i = 0; i < x->size_of_spatialEnhancement; ++i)
2541 {
2542 Decode_EnhancementOptions(x->spatialEnhancement + i, stream);
2543 }
2544 }
2545 if (x->option_of_bPictureEnhancement)
2546 {
2547 x->size_of_bPictureEnhancement = (uint8) GetInteger(1, 14, stream);
2548 x->bPictureEnhancement = (PS_BEnhancementParameters)
2549 OSCL_DEFAULT_MALLOC(x->size_of_bPictureEnhancement * sizeof(S_BEnhancementParameters));
2550 for (i = 0; i < x->size_of_bPictureEnhancement; ++i)
2551 {
2552 Decode_BEnhancementParameters(x->bPictureEnhancement + i, stream);
2553 }
2554 }
2555 /* ------------------------------- */
2556 /* ---- Extension Begins Here ---- */
2557 /* ------------------------------- */
2558 if (extension)
2559 {
2560 map = GetUnknownSigMap(stream);
2561 if (SkipUnreadExtensions(map, stream))
2562 {
2563 ErrorMessage("Decode_EnhancementLayerInfo: Unknown extensions (skipped)");
2564 }
2565 }
2566 }
2567
2568 /* <=================================================> */
2569 /* PER-Decoder for BEnhancementParameters (SEQUENCE) */
2570 /* <=================================================> */
Decode_BEnhancementParameters(PS_BEnhancementParameters x,PS_InStream stream)2571 void Decode_BEnhancementParameters(PS_BEnhancementParameters x, PS_InStream stream)
2572 {
2573 uint8 extension;
2574 PS_UnknownSigMap map;
2575
2576 extension = GetBoolean(stream);
2577 Decode_EnhancementOptions(&x->enhancementOptions, stream);
2578 x->numberOfBPictures = (uint8) GetInteger(1, 64, stream);
2579 /* ------------------------------- */
2580 /* ---- Extension Begins Here ---- */
2581 /* ------------------------------- */
2582 if (extension)
2583 {
2584 map = GetUnknownSigMap(stream);
2585 if (SkipUnreadExtensions(map, stream))
2586 {
2587 ErrorMessage("Decode_BEnhancementParameters: Unknown extensions (skipped)");
2588 }
2589 }
2590 }
2591
2592 /* <=============================================> */
2593 /* PER-Decoder for EnhancementOptions (SEQUENCE) */
2594 /* <=============================================> */
Decode_EnhancementOptions(PS_EnhancementOptions x,PS_InStream stream)2595 void Decode_EnhancementOptions(PS_EnhancementOptions x, PS_InStream stream)
2596 {
2597 uint8 extension;
2598 PS_UnknownSigMap map;
2599
2600 extension = GetBoolean(stream);
2601 x->option_of_sqcifMPI = GetBoolean(stream);
2602 x->option_of_qcifMPI = GetBoolean(stream);
2603 x->option_of_cifMPI = GetBoolean(stream);
2604 x->option_of_cif4MPI = GetBoolean(stream);
2605 x->option_of_cif16MPI = GetBoolean(stream);
2606 x->option_of_slowSqcifMPI = GetBoolean(stream);
2607 x->option_of_slowQcifMPI = GetBoolean(stream);
2608 x->option_of_slowCifMPI = GetBoolean(stream);
2609 x->option_of_slowCif4MPI = GetBoolean(stream);
2610 x->option_of_slowCif16MPI = GetBoolean(stream);
2611 x->option_of_h263Options = GetBoolean(stream);
2612 if (x->option_of_sqcifMPI)
2613 {
2614 x->sqcifMPI = (uint8) GetInteger(1, 32, stream);
2615 }
2616 if (x->option_of_qcifMPI)
2617 {
2618 x->qcifMPI = (uint8) GetInteger(1, 32, stream);
2619 }
2620 if (x->option_of_cifMPI)
2621 {
2622 x->cifMPI = (uint8) GetInteger(1, 32, stream);
2623 }
2624 if (x->option_of_cif4MPI)
2625 {
2626 x->cif4MPI = (uint8) GetInteger(1, 32, stream);
2627 }
2628 if (x->option_of_cif16MPI)
2629 {
2630 x->cif16MPI = (uint8) GetInteger(1, 32, stream);
2631 }
2632 x->maxBitRate = GetInteger(1, 192400, stream);
2633 x->unrestrictedVector = GetBoolean(stream);
2634 x->arithmeticCoding = GetBoolean(stream);
2635 x->temporalSpatialTradeOffCapability = GetBoolean(stream);
2636 if (x->option_of_slowSqcifMPI)
2637 {
2638 x->slowSqcifMPI = (uint16) GetInteger(1, 3600, stream);
2639 }
2640 if (x->option_of_slowQcifMPI)
2641 {
2642 x->slowQcifMPI = (uint16) GetInteger(1, 3600, stream);
2643 }
2644 if (x->option_of_slowCifMPI)
2645 {
2646 x->slowCifMPI = (uint16) GetInteger(1, 3600, stream);
2647 }
2648 if (x->option_of_slowCif4MPI)
2649 {
2650 x->slowCif4MPI = (uint16) GetInteger(1, 3600, stream);
2651 }
2652 if (x->option_of_slowCif16MPI)
2653 {
2654 x->slowCif16MPI = (uint16) GetInteger(1, 3600, stream);
2655 }
2656 x->errorCompensation = GetBoolean(stream);
2657 if (x->option_of_h263Options)
2658 {
2659 Decode_H263Options(&x->h263Options, stream);
2660 }
2661 /* ------------------------------- */
2662 /* ---- Extension Begins Here ---- */
2663 /* ------------------------------- */
2664 if (extension)
2665 {
2666 map = GetUnknownSigMap(stream);
2667 if (SkipUnreadExtensions(map, stream))
2668 {
2669 ErrorMessage("Decode_EnhancementOptions: Unknown extensions (skipped)");
2670 }
2671 }
2672 }
2673
2674 /* <======================================> */
2675 /* PER-Decoder for H263Options (SEQUENCE) */
2676 /* <======================================> */
Decode_H263Options(PS_H263Options x,PS_InStream stream)2677 void Decode_H263Options(PS_H263Options x, PS_InStream stream)
2678 {
2679 uint16 i;
2680 uint8 extension;
2681 PS_UnknownSigMap map;
2682
2683 extension = GetBoolean(stream);
2684 x->option_of_transparencyParameters = GetBoolean(stream);
2685 x->option_of_refPictureSelection = GetBoolean(stream);
2686 x->option_of_customPictureClockFrequency = GetBoolean(stream);
2687 x->option_of_customPictureFormat = GetBoolean(stream);
2688 x->option_of_modeCombos = GetBoolean(stream);
2689 x->advancedIntraCodingMode = GetBoolean(stream);
2690 x->deblockingFilterMode = GetBoolean(stream);
2691 x->improvedPBFramesMode = GetBoolean(stream);
2692 x->unlimitedMotionVectors = GetBoolean(stream);
2693 x->fullPictureFreeze = GetBoolean(stream);
2694 x->partialPictureFreezeAndRelease = GetBoolean(stream);
2695 x->resizingPartPicFreezeAndRelease = GetBoolean(stream);
2696 x->fullPictureSnapshot = GetBoolean(stream);
2697 x->partialPictureSnapshot = GetBoolean(stream);
2698 x->videoSegmentTagging = GetBoolean(stream);
2699 x->progressiveRefinement = GetBoolean(stream);
2700 x->dynamicPictureResizingByFour = GetBoolean(stream);
2701 x->dynamicPictureResizingSixteenthPel = GetBoolean(stream);
2702 x->dynamicWarpingHalfPel = GetBoolean(stream);
2703 x->dynamicWarpingSixteenthPel = GetBoolean(stream);
2704 x->independentSegmentDecoding = GetBoolean(stream);
2705 x->slicesInOrder_NonRect = GetBoolean(stream);
2706 x->slicesInOrder_Rect = GetBoolean(stream);
2707 x->slicesNoOrder_NonRect = GetBoolean(stream);
2708 x->slicesNoOrder_Rect = GetBoolean(stream);
2709 x->alternateInterVLCMode = GetBoolean(stream);
2710 x->modifiedQuantizationMode = GetBoolean(stream);
2711 x->reducedResolutionUpdate = GetBoolean(stream);
2712 if (x->option_of_transparencyParameters)
2713 {
2714 Decode_TransparencyParameters(&x->transparencyParameters, stream);
2715 }
2716 x->separateVideoBackChannel = GetBoolean(stream);
2717 if (x->option_of_refPictureSelection)
2718 {
2719 Decode_RefPictureSelection(&x->refPictureSelection, stream);
2720 }
2721 if (x->option_of_customPictureClockFrequency)
2722 {
2723 x->size_of_customPictureClockFrequency = (uint8) GetInteger(1, 16, stream);
2724 x->customPictureClockFrequency = (PS_CustomPictureClockFrequency)
2725 OSCL_DEFAULT_MALLOC(x->size_of_customPictureClockFrequency * sizeof(S_CustomPictureClockFrequency));
2726 for (i = 0; i < x->size_of_customPictureClockFrequency; ++i)
2727 {
2728 Decode_CustomPictureClockFrequency(x->customPictureClockFrequency + i, stream);
2729 }
2730 }
2731 if (x->option_of_customPictureFormat)
2732 {
2733 x->size_of_customPictureFormat = (uint8) GetInteger(1, 16, stream);
2734 x->customPictureFormat = (PS_CustomPictureFormat)
2735 OSCL_DEFAULT_MALLOC(x->size_of_customPictureFormat * sizeof(S_CustomPictureFormat));
2736 for (i = 0; i < x->size_of_customPictureFormat; ++i)
2737 {
2738 Decode_CustomPictureFormat(x->customPictureFormat + i, stream);
2739 }
2740 }
2741 if (x->option_of_modeCombos)
2742 {
2743 x->size_of_modeCombos = (uint8) GetInteger(1, 16, stream);
2744 x->modeCombos = (PS_H263VideoModeCombos)
2745 OSCL_DEFAULT_MALLOC(x->size_of_modeCombos * sizeof(S_H263VideoModeCombos));
2746 for (i = 0; i < x->size_of_modeCombos; ++i)
2747 {
2748 Decode_H263VideoModeCombos(x->modeCombos + i, stream);
2749 }
2750 }
2751 /* ------------------------------- */
2752 /* ---- Extension Begins Here ---- */
2753 /* ------------------------------- */
2754 if (extension)
2755 {
2756 map = GetUnknownSigMap(stream);
2757 if (SkipUnreadExtensions(map, stream))
2758 {
2759 ErrorMessage("Decode_H263Options: Unknown extensions (skipped)");
2760 }
2761 }
2762 }
2763
2764 /* <=================================================> */
2765 /* PER-Decoder for TransparencyParameters (SEQUENCE) */
2766 /* <=================================================> */
Decode_TransparencyParameters(PS_TransparencyParameters x,PS_InStream stream)2767 void Decode_TransparencyParameters(PS_TransparencyParameters x, PS_InStream stream)
2768 {
2769 uint8 extension;
2770 PS_UnknownSigMap map;
2771
2772 extension = GetBoolean(stream);
2773 x->presentationOrder = (uint16) GetInteger(1, 256, stream);
2774 x->offset_x = GetSignedInteger(-262144, 262143, stream);
2775 x->offset_y = GetSignedInteger(-262144, 262143, stream);
2776 x->scale_x = (uint8) GetInteger(1, 255, stream);
2777 x->scale_y = (uint8) GetInteger(1, 255, stream);
2778 /* ------------------------------- */
2779 /* ---- Extension Begins Here ---- */
2780 /* ------------------------------- */
2781 if (extension)
2782 {
2783 map = GetUnknownSigMap(stream);
2784 if (SkipUnreadExtensions(map, stream))
2785 {
2786 ErrorMessage("Decode_TransparencyParameters: Unknown extensions (skipped)");
2787 }
2788 }
2789 }
2790
2791 /* <==============================================> */
2792 /* PER-Decoder for RefPictureSelection (SEQUENCE) */
2793 /* <==============================================> */
Decode_RefPictureSelection(PS_RefPictureSelection x,PS_InStream stream)2794 void Decode_RefPictureSelection(PS_RefPictureSelection x, PS_InStream stream)
2795 {
2796 uint8 extension;
2797 PS_UnknownSigMap map;
2798
2799 extension = GetBoolean(stream);
2800 x->option_of_additionalPictureMemory = GetBoolean(stream);
2801 if (x->option_of_additionalPictureMemory)
2802 {
2803 Decode_AdditionalPictureMemory(&x->additionalPictureMemory, stream);
2804 }
2805 x->videoMux = GetBoolean(stream);
2806 Decode_VideoBackChannelSend(&x->videoBackChannelSend, stream);
2807 /* ------------------------------- */
2808 /* ---- Extension Begins Here ---- */
2809 /* ------------------------------- */
2810 if (extension)
2811 {
2812 map = GetUnknownSigMap(stream);
2813 if (SkipUnreadExtensions(map, stream))
2814 {
2815 ErrorMessage("Decode_RefPictureSelection: Unknown extensions (skipped)");
2816 }
2817 }
2818 }
2819
2820 /* <=============================================> */
2821 /* PER-Decoder for VideoBackChannelSend (CHOICE) */
2822 /* <=============================================> */
Decode_VideoBackChannelSend(PS_VideoBackChannelSend x,PS_InStream stream)2823 void Decode_VideoBackChannelSend(PS_VideoBackChannelSend x, PS_InStream stream)
2824 {
2825 x->index = GetChoiceIndex(5, 1, stream);
2826 switch (x->index)
2827 {
2828 case 0:
2829 /* (none is NULL) */
2830 break;
2831 case 1:
2832 /* (ackMessageOnly is NULL) */
2833 break;
2834 case 2:
2835 /* (nackMessageOnly is NULL) */
2836 break;
2837 case 3:
2838 /* (ackOrNackMessageOnly is NULL) */
2839 break;
2840 case 4:
2841 /* (ackAndNackMessage is NULL) */
2842 break;
2843 /* ------------------------------- */
2844 /* ---- Extension Begins Here ---- */
2845 /* ------------------------------- */
2846 default:
2847 ErrorMessage("Decode_VideoBackChannelSend: Unsupported extension (skipping)");
2848 SkipOneExtension(stream);
2849 }
2850 }
2851
2852 /* <==================================================> */
2853 /* PER-Decoder for AdditionalPictureMemory (SEQUENCE) */
2854 /* <==================================================> */
Decode_AdditionalPictureMemory(PS_AdditionalPictureMemory x,PS_InStream stream)2855 void Decode_AdditionalPictureMemory(PS_AdditionalPictureMemory x, PS_InStream stream)
2856 {
2857 uint8 extension;
2858 PS_UnknownSigMap map;
2859
2860 extension = GetBoolean(stream);
2861 x->option_of_sqcifAdditionalPictureMemory = GetBoolean(stream);
2862 x->option_of_qcifAdditionalPictureMemory = GetBoolean(stream);
2863 x->option_of_cifAdditionalPictureMemory = GetBoolean(stream);
2864 x->option_of_cif4AdditionalPictureMemory = GetBoolean(stream);
2865 x->option_of_cif16AdditionalPictureMemory = GetBoolean(stream);
2866 x->option_of_bigCpfAdditionalPictureMemory = GetBoolean(stream);
2867 if (x->option_of_sqcifAdditionalPictureMemory)
2868 {
2869 x->sqcifAdditionalPictureMemory = (uint16) GetInteger(1, 256, stream);
2870 }
2871 if (x->option_of_qcifAdditionalPictureMemory)
2872 {
2873 x->qcifAdditionalPictureMemory = (uint16) GetInteger(1, 256, stream);
2874 }
2875 if (x->option_of_cifAdditionalPictureMemory)
2876 {
2877 x->cifAdditionalPictureMemory = (uint16) GetInteger(1, 256, stream);
2878 }
2879 if (x->option_of_cif4AdditionalPictureMemory)
2880 {
2881 x->cif4AdditionalPictureMemory = (uint16) GetInteger(1, 256, stream);
2882 }
2883 if (x->option_of_cif16AdditionalPictureMemory)
2884 {
2885 x->cif16AdditionalPictureMemory = (uint16) GetInteger(1, 256, stream);
2886 }
2887 if (x->option_of_bigCpfAdditionalPictureMemory)
2888 {
2889 x->bigCpfAdditionalPictureMemory = (uint16) GetInteger(1, 256, stream);
2890 }
2891 /* ------------------------------- */
2892 /* ---- Extension Begins Here ---- */
2893 /* ------------------------------- */
2894 if (extension)
2895 {
2896 map = GetUnknownSigMap(stream);
2897 if (SkipUnreadExtensions(map, stream))
2898 {
2899 ErrorMessage("Decode_AdditionalPictureMemory: Unknown extensions (skipped)");
2900 }
2901 }
2902 }
2903
2904 /* <======================================================> */
2905 /* PER-Decoder for CustomPictureClockFrequency (SEQUENCE) */
2906 /* <======================================================> */
Decode_CustomPictureClockFrequency(PS_CustomPictureClockFrequency x,PS_InStream stream)2907 void Decode_CustomPictureClockFrequency(PS_CustomPictureClockFrequency x, PS_InStream stream)
2908 {
2909 uint8 extension;
2910 PS_UnknownSigMap map;
2911
2912 extension = GetBoolean(stream);
2913 x->option_of_sqcifMPI = GetBoolean(stream);
2914 x->option_of_qcifMPI = GetBoolean(stream);
2915 x->option_of_cifMPI = GetBoolean(stream);
2916 x->option_of_cif4MPI = GetBoolean(stream);
2917 x->option_of_cif16MPI = GetBoolean(stream);
2918 x->clockConversionCode = (uint16) GetInteger(1000, 1001, stream);
2919 x->clockDivisor = (uint8) GetInteger(1, 127, stream);
2920 if (x->option_of_sqcifMPI)
2921 {
2922 x->sqcifMPI = (uint16) GetInteger(1, 2048, stream);
2923 }
2924 if (x->option_of_qcifMPI)
2925 {
2926 x->qcifMPI = (uint16) GetInteger(1, 2048, stream);
2927 }
2928 if (x->option_of_cifMPI)
2929 {
2930 x->cifMPI = (uint16) GetInteger(1, 2048, stream);
2931 }
2932 if (x->option_of_cif4MPI)
2933 {
2934 x->cif4MPI = (uint16) GetInteger(1, 2048, stream);
2935 }
2936 if (x->option_of_cif16MPI)
2937 {
2938 x->cif16MPI = (uint16) GetInteger(1, 2048, stream);
2939 }
2940 /* ------------------------------- */
2941 /* ---- Extension Begins Here ---- */
2942 /* ------------------------------- */
2943 if (extension)
2944 {
2945 map = GetUnknownSigMap(stream);
2946 if (SkipUnreadExtensions(map, stream))
2947 {
2948 ErrorMessage("Decode_CustomPictureClockFrequency: Unknown extensions (skipped)");
2949 }
2950 }
2951 }
2952
2953 /* <==============================================> */
2954 /* PER-Decoder for CustomPictureFormat (SEQUENCE) */
2955 /* <==============================================> */
Decode_CustomPictureFormat(PS_CustomPictureFormat x,PS_InStream stream)2956 void Decode_CustomPictureFormat(PS_CustomPictureFormat x, PS_InStream stream)
2957 {
2958 uint8 extension;
2959 PS_UnknownSigMap map;
2960
2961 extension = GetBoolean(stream);
2962 x->maxCustomPictureWidth = (uint16) GetInteger(1, 2048, stream);
2963 x->maxCustomPictureHeight = (uint16) GetInteger(1, 2048, stream);
2964 x->minCustomPictureWidth = (uint16) GetInteger(1, 2048, stream);
2965 x->minCustomPictureHeight = (uint16) GetInteger(1, 2048, stream);
2966 Decode_MPI(&x->mPI, stream);
2967 Decode_PixelAspectInformation(&x->pixelAspectInformation, stream);
2968 /* ------------------------------- */
2969 /* ---- Extension Begins Here ---- */
2970 /* ------------------------------- */
2971 if (extension)
2972 {
2973 map = GetUnknownSigMap(stream);
2974 if (SkipUnreadExtensions(map, stream))
2975 {
2976 ErrorMessage("Decode_CustomPictureFormat: Unknown extensions (skipped)");
2977 }
2978 }
2979 }
2980
2981 /* <===============================================> */
2982 /* PER-Decoder for PixelAspectInformation (CHOICE) */
2983 /* <===============================================> */
Decode_PixelAspectInformation(PS_PixelAspectInformation x,PS_InStream stream)2984 void Decode_PixelAspectInformation(PS_PixelAspectInformation x, PS_InStream stream)
2985 {
2986 uint16 i;
2987 x->index = GetChoiceIndex(3, 1, stream);
2988 switch (x->index)
2989 {
2990 case 0:
2991 x->anyPixelAspectRatio = GetBoolean(stream);
2992 break;
2993 case 1:
2994 x->size = (uint8) GetInteger(1, 14, stream);
2995 x->pixelAspectCode = (uint32*) OSCL_DEFAULT_MALLOC(x->size * sizeof(uint32));
2996 for (i = 0; i < x->size; ++i)
2997 {
2998 x->pixelAspectCode[i] = GetInteger(1, 14, stream);
2999 }
3000 break;
3001 case 2:
3002 x->size = (uint16) GetInteger(1, 256, stream);
3003 x->extendedPAR = (PS_ExtendedPARItem)
3004 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_ExtendedPARItem));
3005 for (i = 0; i < x->size; ++i)
3006 {
3007 Decode_ExtendedPARItem(x->extendedPAR + i, stream);
3008 }
3009 break;
3010 /* ------------------------------- */
3011 /* ---- Extension Begins Here ---- */
3012 /* ------------------------------- */
3013 default:
3014 ErrorMessage("Decode_PixelAspectInformation: Unsupported extension (skipping)");
3015 SkipOneExtension(stream);
3016 }
3017 }
3018
3019 /* <==========================================> */
3020 /* PER-Decoder for ExtendedPARItem (SEQUENCE) */
3021 /* <==========================================> */
Decode_ExtendedPARItem(PS_ExtendedPARItem x,PS_InStream stream)3022 void Decode_ExtendedPARItem(PS_ExtendedPARItem x, PS_InStream stream)
3023 {
3024 uint8 extension;
3025 PS_UnknownSigMap map;
3026
3027 extension = GetBoolean(stream);
3028 x->width = (uint8) GetInteger(1, 255, stream);
3029 x->height = (uint8) GetInteger(1, 255, stream);
3030 /* ------------------------------- */
3031 /* ---- Extension Begins Here ---- */
3032 /* ------------------------------- */
3033 if (extension)
3034 {
3035 map = GetUnknownSigMap(stream);
3036 if (SkipUnreadExtensions(map, stream))
3037 {
3038 ErrorMessage("Decode_ExtendedPARItem: Unknown extensions (skipped)");
3039 }
3040 }
3041 }
3042
3043 /* <==============================> */
3044 /* PER-Decoder for MPI (SEQUENCE) */
3045 /* <==============================> */
Decode_MPI(PS_MPI x,PS_InStream stream)3046 void Decode_MPI(PS_MPI x, PS_InStream stream)
3047 {
3048 uint16 i;
3049 uint8 extension;
3050 PS_UnknownSigMap map;
3051
3052 extension = GetBoolean(stream);
3053 x->option_of_standardMPI = GetBoolean(stream);
3054 x->option_of_customPCF = GetBoolean(stream);
3055 if (x->option_of_standardMPI)
3056 {
3057 x->standardMPI = (uint8) GetInteger(1, 31, stream);
3058 }
3059 if (x->option_of_customPCF)
3060 {
3061 x->size_of_customPCF = (uint8) GetInteger(1, 16, stream);
3062 x->customPCF = (PS_CustomPCFItem)
3063 OSCL_DEFAULT_MALLOC(x->size_of_customPCF * sizeof(S_CustomPCFItem));
3064 for (i = 0; i < x->size_of_customPCF; ++i)
3065 {
3066 Decode_CustomPCFItem(x->customPCF + i, stream);
3067 }
3068 }
3069 /* ------------------------------- */
3070 /* ---- Extension Begins Here ---- */
3071 /* ------------------------------- */
3072 if (extension)
3073 {
3074 map = GetUnknownSigMap(stream);
3075 if (SkipUnreadExtensions(map, stream))
3076 {
3077 ErrorMessage("Decode_MPI: Unknown extensions (skipped)");
3078 }
3079 }
3080 }
3081
3082 /* <========================================> */
3083 /* PER-Decoder for CustomPCFItem (SEQUENCE) */
3084 /* <========================================> */
Decode_CustomPCFItem(PS_CustomPCFItem x,PS_InStream stream)3085 void Decode_CustomPCFItem(PS_CustomPCFItem x, PS_InStream stream)
3086 {
3087 uint8 extension;
3088 PS_UnknownSigMap map;
3089
3090 extension = GetBoolean(stream);
3091 x->clockConversionCode = (uint16) GetInteger(1000, 1001, stream);
3092 x->clockDivisor = (uint8) GetInteger(1, 127, stream);
3093 x->customMPI = (uint16) GetInteger(1, 2048, stream);
3094 /* ------------------------------- */
3095 /* ---- Extension Begins Here ---- */
3096 /* ------------------------------- */
3097 if (extension)
3098 {
3099 map = GetUnknownSigMap(stream);
3100 if (SkipUnreadExtensions(map, stream))
3101 {
3102 ErrorMessage("Decode_CustomPCFItem: Unknown extensions (skipped)");
3103 }
3104 }
3105 }
3106
3107 /* <==============================================> */
3108 /* PER-Decoder for H263VideoModeCombos (SEQUENCE) */
3109 /* <==============================================> */
Decode_H263VideoModeCombos(PS_H263VideoModeCombos x,PS_InStream stream)3110 void Decode_H263VideoModeCombos(PS_H263VideoModeCombos x, PS_InStream stream)
3111 {
3112 uint16 i;
3113 uint8 extension;
3114 PS_UnknownSigMap map;
3115
3116 extension = GetBoolean(stream);
3117 Decode_H263ModeComboFlags(&x->h263VideoUncoupledModes, stream);
3118 x->size_of_h263VideoCoupledModes = (uint8) GetInteger(1, 16, stream);
3119 x->h263VideoCoupledModes = (PS_H263ModeComboFlags)
3120 OSCL_DEFAULT_MALLOC(x->size_of_h263VideoCoupledModes * sizeof(S_H263ModeComboFlags));
3121 for (i = 0; i < x->size_of_h263VideoCoupledModes; ++i)
3122 {
3123 Decode_H263ModeComboFlags(x->h263VideoCoupledModes + i, stream);
3124 }
3125 /* ------------------------------- */
3126 /* ---- Extension Begins Here ---- */
3127 /* ------------------------------- */
3128 if (extension)
3129 {
3130 map = GetUnknownSigMap(stream);
3131 if (SkipUnreadExtensions(map, stream))
3132 {
3133 ErrorMessage("Decode_H263VideoModeCombos: Unknown extensions (skipped)");
3134 }
3135 }
3136 }
3137
3138 /* <=============================================> */
3139 /* PER-Decoder for H263ModeComboFlags (SEQUENCE) */
3140 /* <=============================================> */
Decode_H263ModeComboFlags(PS_H263ModeComboFlags x,PS_InStream stream)3141 void Decode_H263ModeComboFlags(PS_H263ModeComboFlags x, PS_InStream stream)
3142 {
3143 uint8 extension;
3144 PS_UnknownSigMap map;
3145
3146 extension = GetBoolean(stream);
3147 x->unrestrictedVector = GetBoolean(stream);
3148 x->arithmeticCoding = GetBoolean(stream);
3149 x->advancedPrediction = GetBoolean(stream);
3150 x->pbFrames = GetBoolean(stream);
3151 x->advancedIntraCodingMode = GetBoolean(stream);
3152 x->deblockingFilterMode = GetBoolean(stream);
3153 x->unlimitedMotionVectors = GetBoolean(stream);
3154 x->slicesInOrder_NonRect = GetBoolean(stream);
3155 x->slicesInOrder_Rect = GetBoolean(stream);
3156 x->slicesNoOrder_NonRect = GetBoolean(stream);
3157 x->slicesNoOrder_Rect = GetBoolean(stream);
3158 x->improvedPBFramesMode = GetBoolean(stream);
3159 x->referencePicSelect = GetBoolean(stream);
3160 x->dynamicPictureResizingByFour = GetBoolean(stream);
3161 x->dynamicPictureResizingSixteenthPel = GetBoolean(stream);
3162 x->dynamicWarpingHalfPel = GetBoolean(stream);
3163 x->dynamicWarpingSixteenthPel = GetBoolean(stream);
3164 x->reducedResolutionUpdate = GetBoolean(stream);
3165 x->independentSegmentDecoding = GetBoolean(stream);
3166 x->alternateInterVLCMode = GetBoolean(stream);
3167 x->modifiedQuantizationMode = GetBoolean(stream);
3168 /* ------------------------------- */
3169 /* ---- Extension Begins Here ---- */
3170 /* ------------------------------- */
3171 if (extension)
3172 {
3173 map = GetUnknownSigMap(stream);
3174 if (SkipUnreadExtensions(map, stream))
3175 {
3176 ErrorMessage("Decode_H263ModeComboFlags: Unknown extensions (skipped)");
3177 }
3178 }
3179 }
3180
3181 /* <=================================================> */
3182 /* PER-Decoder for IS11172VideoCapability (SEQUENCE) */
3183 /* <=================================================> */
Decode_IS11172VideoCapability(PS_IS11172VideoCapability x,PS_InStream stream)3184 void Decode_IS11172VideoCapability(PS_IS11172VideoCapability x, PS_InStream stream)
3185 {
3186 uint8 extension;
3187 PS_UnknownSigMap map;
3188
3189 extension = GetBoolean(stream);
3190 x->option_of_videoBitRate = GetBoolean(stream);
3191 x->option_of_vbvBufferSize = GetBoolean(stream);
3192 x->option_of_samplesPerLine = GetBoolean(stream);
3193 x->option_of_linesPerFrame = GetBoolean(stream);
3194 x->option_of_pictureRate = GetBoolean(stream);
3195 x->option_of_luminanceSampleRate = GetBoolean(stream);
3196 x->constrainedBitstream = GetBoolean(stream);
3197 if (x->option_of_videoBitRate)
3198 {
3199 x->videoBitRate = GetInteger(0, 1073741823, stream);
3200 }
3201 if (x->option_of_vbvBufferSize)
3202 {
3203 x->vbvBufferSize = GetInteger(0, 262143, stream);
3204 }
3205 if (x->option_of_samplesPerLine)
3206 {
3207 x->samplesPerLine = (uint16) GetInteger(0, 16383, stream);
3208 }
3209 if (x->option_of_linesPerFrame)
3210 {
3211 x->linesPerFrame = (uint16) GetInteger(0, 16383, stream);
3212 }
3213 if (x->option_of_pictureRate)
3214 {
3215 x->pictureRate = (uint8) GetInteger(0, 15, stream);
3216 }
3217 if (x->option_of_luminanceSampleRate)
3218 {
3219 x->luminanceSampleRate = GetInteger(0, 0xffffffff, stream);
3220 }
3221 /* ------------------------------- */
3222 /* ---- Extension Begins Here ---- */
3223 /* ------------------------------- */
3224 if (extension)
3225 {
3226 map = GetUnknownSigMap(stream);
3227 if (SkipUnreadExtensions(map, stream))
3228 {
3229 ErrorMessage("Decode_IS11172VideoCapability: Unknown extensions (skipped)");
3230 }
3231 }
3232 }
3233
3234 /* <========================================> */
3235 /* PER-Decoder for AudioCapability (CHOICE) */
3236 /* <========================================> */
Decode_AudioCapability(PS_AudioCapability x,PS_InStream stream)3237 void Decode_AudioCapability(PS_AudioCapability x, PS_InStream stream)
3238 {
3239 x->index = GetChoiceIndex(14, 1, stream);
3240 switch (x->index)
3241 {
3242 case 0:
3243 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
3244 Decode_NonStandardParameter(x->nonStandard, stream);
3245 break;
3246 case 1:
3247 x->g711Alaw64k = (uint16) GetInteger(1, 256, stream);
3248 break;
3249 case 2:
3250 x->g711Alaw56k = (uint16) GetInteger(1, 256, stream);
3251 break;
3252 case 3:
3253 x->g711Ulaw64k = (uint16) GetInteger(1, 256, stream);
3254 break;
3255 case 4:
3256 x->g711Ulaw56k = (uint16) GetInteger(1, 256, stream);
3257 break;
3258 case 5:
3259 x->g722_64k = (uint16) GetInteger(1, 256, stream);
3260 break;
3261 case 6:
3262 x->g722_56k = (uint16) GetInteger(1, 256, stream);
3263 break;
3264 case 7:
3265 x->g722_48k = (uint16) GetInteger(1, 256, stream);
3266 break;
3267 case 8:
3268 x->g7231 = (PS_G7231) OSCL_DEFAULT_MALLOC(sizeof(S_G7231));
3269 Decode_G7231(x->g7231, stream);
3270 break;
3271 case 9:
3272 x->g728 = (uint16) GetInteger(1, 256, stream);
3273 break;
3274 case 10:
3275 x->g729 = (uint16) GetInteger(1, 256, stream);
3276 break;
3277 case 11:
3278 x->g729AnnexA = (uint16) GetInteger(1, 256, stream);
3279 break;
3280 case 12:
3281 x->is11172AudioCapability = (PS_IS11172AudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_IS11172AudioCapability));
3282 Decode_IS11172AudioCapability(x->is11172AudioCapability, stream);
3283 break;
3284 case 13:
3285 x->is13818AudioCapability = (PS_IS13818AudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_IS13818AudioCapability));
3286 Decode_IS13818AudioCapability(x->is13818AudioCapability, stream);
3287 break;
3288 /* ------------------------------- */
3289 /* ---- Extension Begins Here ---- */
3290 /* ------------------------------- */
3291 case 14:
3292 GetLengthDet(stream);
3293 x->g729wAnnexB = (uint16) GetInteger(1, 256, stream);
3294 ReadRemainingBits(stream);
3295 break;
3296 case 15:
3297 GetLengthDet(stream);
3298 x->g729AnnexAwAnnexB = (uint16) GetInteger(1, 256, stream);
3299 ReadRemainingBits(stream);
3300 break;
3301 case 16:
3302 GetLengthDet(stream);
3303 x->g7231AnnexCCapability = (PS_G7231AnnexCCapability) OSCL_DEFAULT_MALLOC(sizeof(S_G7231AnnexCCapability));
3304 Decode_G7231AnnexCCapability(x->g7231AnnexCCapability, stream);
3305 ReadRemainingBits(stream);
3306 break;
3307 case 17:
3308 GetLengthDet(stream);
3309 x->gsmFullRate = (PS_GSMAudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GSMAudioCapability));
3310 Decode_GSMAudioCapability(x->gsmFullRate, stream);
3311 ReadRemainingBits(stream);
3312 break;
3313 case 18:
3314 GetLengthDet(stream);
3315 x->gsmHalfRate = (PS_GSMAudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GSMAudioCapability));
3316 Decode_GSMAudioCapability(x->gsmHalfRate, stream);
3317 ReadRemainingBits(stream);
3318 break;
3319 case 19:
3320 GetLengthDet(stream);
3321 x->gsmEnhancedFullRate = (PS_GSMAudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GSMAudioCapability));
3322 Decode_GSMAudioCapability(x->gsmEnhancedFullRate, stream);
3323 ReadRemainingBits(stream);
3324 break;
3325 case 20:
3326 GetLengthDet(stream);
3327 x->genericAudioCapability = (PS_GenericCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GenericCapability));
3328 Decode_GenericCapability(x->genericAudioCapability, stream);
3329 ReadRemainingBits(stream);
3330 break;
3331 case 21:
3332 GetLengthDet(stream);
3333 x->g729Extensions = (PS_G729Extensions) OSCL_DEFAULT_MALLOC(sizeof(S_G729Extensions));
3334 Decode_G729Extensions(x->g729Extensions, stream);
3335 ReadRemainingBits(stream);
3336 break;
3337 default:
3338 ErrorMessage("Decode_AudioCapability: Unsupported extension (skipping)");
3339 SkipOneExtension(stream);
3340 }
3341 }
3342
3343 /* <================================> */
3344 /* PER-Decoder for G7231 (SEQUENCE) */
3345 /* <================================> */
Decode_G7231(PS_G7231 x,PS_InStream stream)3346 void Decode_G7231(PS_G7231 x, PS_InStream stream)
3347 {
3348 x->maxAl_sduAudioFrames = (uint16) GetInteger(1, 256, stream);
3349 x->silenceSuppression = GetBoolean(stream);
3350 }
3351
3352 /* <=========================================> */
3353 /* PER-Decoder for G729Extensions (SEQUENCE) */
3354 /* <=========================================> */
Decode_G729Extensions(PS_G729Extensions x,PS_InStream stream)3355 void Decode_G729Extensions(PS_G729Extensions x, PS_InStream stream)
3356 {
3357 uint8 extension;
3358 PS_UnknownSigMap map;
3359
3360 extension = GetBoolean(stream);
3361 x->option_of_audioUnit = GetBoolean(stream);
3362 if (x->option_of_audioUnit)
3363 {
3364 x->audioUnit = (uint16) GetInteger(1, 256, stream);
3365 }
3366 x->annexA = GetBoolean(stream);
3367 x->annexB = GetBoolean(stream);
3368 x->annexD = GetBoolean(stream);
3369 x->annexE = GetBoolean(stream);
3370 x->annexF = GetBoolean(stream);
3371 x->annexG = GetBoolean(stream);
3372 x->annexH = GetBoolean(stream);
3373 /* ------------------------------- */
3374 /* ---- Extension Begins Here ---- */
3375 /* ------------------------------- */
3376 if (extension)
3377 {
3378 map = GetUnknownSigMap(stream);
3379 if (SkipUnreadExtensions(map, stream))
3380 {
3381 ErrorMessage("Decode_G729Extensions: Unknown extensions (skipped)");
3382 }
3383 }
3384 }
3385
3386 /* <================================================> */
3387 /* PER-Decoder for G7231AnnexCCapability (SEQUENCE) */
3388 /* <================================================> */
Decode_G7231AnnexCCapability(PS_G7231AnnexCCapability x,PS_InStream stream)3389 void Decode_G7231AnnexCCapability(PS_G7231AnnexCCapability x, PS_InStream stream)
3390 {
3391 uint8 extension;
3392 PS_UnknownSigMap map;
3393
3394 extension = GetBoolean(stream);
3395 x->option_of_g723AnnexCAudioMode = GetBoolean(stream);
3396 x->maxAl_sduAudioFrames = (uint16) GetInteger(1, 256, stream);
3397 x->silenceSuppression = GetBoolean(stream);
3398 if (x->option_of_g723AnnexCAudioMode)
3399 {
3400 Decode_G723AnnexCAudioMode(&x->g723AnnexCAudioMode, stream);
3401 }
3402 /* ------------------------------- */
3403 /* ---- Extension Begins Here ---- */
3404 /* ------------------------------- */
3405 if (extension)
3406 {
3407 map = GetUnknownSigMap(stream);
3408 if (SkipUnreadExtensions(map, stream))
3409 {
3410 ErrorMessage("Decode_G7231AnnexCCapability: Unknown extensions (skipped)");
3411 }
3412 }
3413 }
3414
3415 /* <==============================================> */
3416 /* PER-Decoder for G723AnnexCAudioMode (SEQUENCE) */
3417 /* <==============================================> */
Decode_G723AnnexCAudioMode(PS_G723AnnexCAudioMode x,PS_InStream stream)3418 void Decode_G723AnnexCAudioMode(PS_G723AnnexCAudioMode x, PS_InStream stream)
3419 {
3420 uint8 extension;
3421 PS_UnknownSigMap map;
3422
3423 extension = GetBoolean(stream);
3424 x->highRateMode0 = (uint8) GetInteger(27, 78, stream);
3425 x->highRateMode1 = (uint8) GetInteger(27, 78, stream);
3426 x->lowRateMode0 = (uint8) GetInteger(23, 66, stream);
3427 x->lowRateMode1 = (uint8) GetInteger(23, 66, stream);
3428 x->sidMode0 = (uint8) GetInteger(6, 17, stream);
3429 x->sidMode1 = (uint8) GetInteger(6, 17, stream);
3430 /* ------------------------------- */
3431 /* ---- Extension Begins Here ---- */
3432 /* ------------------------------- */
3433 if (extension)
3434 {
3435 map = GetUnknownSigMap(stream);
3436 if (SkipUnreadExtensions(map, stream))
3437 {
3438 ErrorMessage("Decode_G723AnnexCAudioMode: Unknown extensions (skipped)");
3439 }
3440 }
3441 }
3442
3443 /* <=================================================> */
3444 /* PER-Decoder for IS11172AudioCapability (SEQUENCE) */
3445 /* <=================================================> */
Decode_IS11172AudioCapability(PS_IS11172AudioCapability x,PS_InStream stream)3446 void Decode_IS11172AudioCapability(PS_IS11172AudioCapability x, PS_InStream stream)
3447 {
3448 uint8 extension;
3449 PS_UnknownSigMap map;
3450
3451 extension = GetBoolean(stream);
3452 x->audioLayer1 = GetBoolean(stream);
3453 x->audioLayer2 = GetBoolean(stream);
3454 x->audioLayer3 = GetBoolean(stream);
3455 x->audioSampling32k = GetBoolean(stream);
3456 x->audioSampling44k1 = GetBoolean(stream);
3457 x->audioSampling48k = GetBoolean(stream);
3458 x->singleChannel = GetBoolean(stream);
3459 x->twoChannels = GetBoolean(stream);
3460 x->bitRate = (uint16) GetInteger(1, 448, stream);
3461 /* ------------------------------- */
3462 /* ---- Extension Begins Here ---- */
3463 /* ------------------------------- */
3464 if (extension)
3465 {
3466 map = GetUnknownSigMap(stream);
3467 if (SkipUnreadExtensions(map, stream))
3468 {
3469 ErrorMessage("Decode_IS11172AudioCapability: Unknown extensions (skipped)");
3470 }
3471 }
3472 }
3473
3474 /* <=================================================> */
3475 /* PER-Decoder for IS13818AudioCapability (SEQUENCE) */
3476 /* <=================================================> */
Decode_IS13818AudioCapability(PS_IS13818AudioCapability x,PS_InStream stream)3477 void Decode_IS13818AudioCapability(PS_IS13818AudioCapability x, PS_InStream stream)
3478 {
3479 uint8 extension;
3480 PS_UnknownSigMap map;
3481
3482 extension = GetBoolean(stream);
3483 x->audioLayer1 = GetBoolean(stream);
3484 x->audioLayer2 = GetBoolean(stream);
3485 x->audioLayer3 = GetBoolean(stream);
3486 x->audioSampling16k = GetBoolean(stream);
3487 x->audioSampling22k05 = GetBoolean(stream);
3488 x->audioSampling24k = GetBoolean(stream);
3489 x->audioSampling32k = GetBoolean(stream);
3490 x->audioSampling44k1 = GetBoolean(stream);
3491 x->audioSampling48k = GetBoolean(stream);
3492 x->singleChannel = GetBoolean(stream);
3493 x->twoChannels = GetBoolean(stream);
3494 x->threeChannels2_1 = GetBoolean(stream);
3495 x->threeChannels3_0 = GetBoolean(stream);
3496 x->fourChannels2_0_2_0 = GetBoolean(stream);
3497 x->fourChannels2_2 = GetBoolean(stream);
3498 x->fourChannels3_1 = GetBoolean(stream);
3499 x->fiveChannels3_0_2_0 = GetBoolean(stream);
3500 x->fiveChannels3_2 = GetBoolean(stream);
3501 x->lowFrequencyEnhancement = GetBoolean(stream);
3502 x->multilingual = GetBoolean(stream);
3503 x->bitRate = (uint16) GetInteger(1, 1130, stream);
3504 /* ------------------------------- */
3505 /* ---- Extension Begins Here ---- */
3506 /* ------------------------------- */
3507 if (extension)
3508 {
3509 map = GetUnknownSigMap(stream);
3510 if (SkipUnreadExtensions(map, stream))
3511 {
3512 ErrorMessage("Decode_IS13818AudioCapability: Unknown extensions (skipped)");
3513 }
3514 }
3515 }
3516
3517 /* <=============================================> */
3518 /* PER-Decoder for GSMAudioCapability (SEQUENCE) */
3519 /* <=============================================> */
Decode_GSMAudioCapability(PS_GSMAudioCapability x,PS_InStream stream)3520 void Decode_GSMAudioCapability(PS_GSMAudioCapability x, PS_InStream stream)
3521 {
3522 uint8 extension;
3523 PS_UnknownSigMap map;
3524
3525 extension = GetBoolean(stream);
3526 x->audioUnitSize = (uint16) GetInteger(1, 256, stream);
3527 x->comfortNoise = GetBoolean(stream);
3528 x->scrambled = GetBoolean(stream);
3529 /* ------------------------------- */
3530 /* ---- Extension Begins Here ---- */
3531 /* ------------------------------- */
3532 if (extension)
3533 {
3534 map = GetUnknownSigMap(stream);
3535 if (SkipUnreadExtensions(map, stream))
3536 {
3537 ErrorMessage("Decode_GSMAudioCapability: Unknown extensions (skipped)");
3538 }
3539 }
3540 }
3541
3542 /* <====================================================> */
3543 /* PER-Decoder for DataApplicationCapability (SEQUENCE) */
3544 /* <====================================================> */
Decode_DataApplicationCapability(PS_DataApplicationCapability x,PS_InStream stream)3545 void Decode_DataApplicationCapability(PS_DataApplicationCapability x, PS_InStream stream)
3546 {
3547 uint8 extension;
3548 PS_UnknownSigMap map;
3549
3550 extension = GetBoolean(stream);
3551 Decode_Application(&x->application, stream);
3552 x->maxBitRate = GetInteger(0, 0xffffffff, stream);
3553 /* ------------------------------- */
3554 /* ---- Extension Begins Here ---- */
3555 /* ------------------------------- */
3556 if (extension)
3557 {
3558 map = GetUnknownSigMap(stream);
3559 if (SkipUnreadExtensions(map, stream))
3560 {
3561 ErrorMessage("Decode_DataApplicationCapability: Unknown extensions (skipped)");
3562 }
3563 }
3564 }
3565
3566 /* <====================================> */
3567 /* PER-Decoder for Application (CHOICE) */
3568 /* <====================================> */
Decode_Application(PS_Application x,PS_InStream stream)3569 void Decode_Application(PS_Application x, PS_InStream stream)
3570 {
3571 x->index = GetChoiceIndex(10, 1, stream);
3572 switch (x->index)
3573 {
3574 case 0:
3575 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
3576 Decode_NonStandardParameter(x->nonStandard, stream);
3577 break;
3578 case 1:
3579 x->t120 = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
3580 Decode_DataProtocolCapability(x->t120, stream);
3581 break;
3582 case 2:
3583 x->dsm_cc = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
3584 Decode_DataProtocolCapability(x->dsm_cc, stream);
3585 break;
3586 case 3:
3587 x->userData = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
3588 Decode_DataProtocolCapability(x->userData, stream);
3589 break;
3590 case 4:
3591 x->t84 = (PS_T84) OSCL_DEFAULT_MALLOC(sizeof(S_T84));
3592 Decode_T84(x->t84, stream);
3593 break;
3594 case 5:
3595 x->t434 = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
3596 Decode_DataProtocolCapability(x->t434, stream);
3597 break;
3598 case 6:
3599 x->h224 = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
3600 Decode_DataProtocolCapability(x->h224, stream);
3601 break;
3602 case 7:
3603 x->nlpid = (PS_Nlpid) OSCL_DEFAULT_MALLOC(sizeof(S_Nlpid));
3604 Decode_Nlpid(x->nlpid, stream);
3605 break;
3606 case 8:
3607 /* (dsvdControl is NULL) */
3608 break;
3609 case 9:
3610 x->h222DataPartitioning = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
3611 Decode_DataProtocolCapability(x->h222DataPartitioning, stream);
3612 break;
3613 /* ------------------------------- */
3614 /* ---- Extension Begins Here ---- */
3615 /* ------------------------------- */
3616 case 10:
3617 GetLengthDet(stream);
3618 x->t30fax = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
3619 Decode_DataProtocolCapability(x->t30fax, stream);
3620 ReadRemainingBits(stream);
3621 break;
3622 case 11:
3623 GetLengthDet(stream);
3624 x->t140 = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
3625 Decode_DataProtocolCapability(x->t140, stream);
3626 ReadRemainingBits(stream);
3627 break;
3628 case 12:
3629 GetLengthDet(stream);
3630 x->t38fax = (PS_T38fax) OSCL_DEFAULT_MALLOC(sizeof(S_T38fax));
3631 Decode_T38fax(x->t38fax, stream);
3632 ReadRemainingBits(stream);
3633 break;
3634 case 13:
3635 GetLengthDet(stream);
3636 x->genericDataCapability = (PS_GenericCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GenericCapability));
3637 Decode_GenericCapability(x->genericDataCapability, stream);
3638 ReadRemainingBits(stream);
3639 break;
3640 default:
3641 ErrorMessage("Decode_Application: Unsupported extension (skipping)");
3642 SkipOneExtension(stream);
3643 }
3644 }
3645
3646 /* <=================================> */
3647 /* PER-Decoder for T38fax (SEQUENCE) */
3648 /* <=================================> */
Decode_T38fax(PS_T38fax x,PS_InStream stream)3649 void Decode_T38fax(PS_T38fax x, PS_InStream stream)
3650 {
3651 Decode_DataProtocolCapability(&x->t38FaxProtocol, stream);
3652 Decode_T38FaxProfile(&x->t38FaxProfile, stream);
3653 }
3654
3655 /* <================================> */
3656 /* PER-Decoder for Nlpid (SEQUENCE) */
3657 /* <================================> */
Decode_Nlpid(PS_Nlpid x,PS_InStream stream)3658 void Decode_Nlpid(PS_Nlpid x, PS_InStream stream)
3659 {
3660 Decode_DataProtocolCapability(&x->nlpidProtocol, stream);
3661 GetOctetString(1, 0, 0, &x->nlpidData, stream);
3662 }
3663
3664 /* <==============================> */
3665 /* PER-Decoder for T84 (SEQUENCE) */
3666 /* <==============================> */
Decode_T84(PS_T84 x,PS_InStream stream)3667 void Decode_T84(PS_T84 x, PS_InStream stream)
3668 {
3669 Decode_DataProtocolCapability(&x->t84Protocol, stream);
3670 Decode_T84Profile(&x->t84Profile, stream);
3671 }
3672
3673 /* <===============================================> */
3674 /* PER-Decoder for DataProtocolCapability (CHOICE) */
3675 /* <===============================================> */
Decode_DataProtocolCapability(PS_DataProtocolCapability x,PS_InStream stream)3676 void Decode_DataProtocolCapability(PS_DataProtocolCapability x, PS_InStream stream)
3677 {
3678 x->index = GetChoiceIndex(7, 1, stream);
3679 switch (x->index)
3680 {
3681 case 0:
3682 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
3683 Decode_NonStandardParameter(x->nonStandard, stream);
3684 break;
3685 case 1:
3686 /* (v14buffered is NULL) */
3687 break;
3688 case 2:
3689 /* (v42lapm is NULL) */
3690 break;
3691 case 3:
3692 /* (hdlcFrameTunnelling is NULL) */
3693 break;
3694 case 4:
3695 /* (h310SeparateVCStack is NULL) */
3696 break;
3697 case 5:
3698 /* (h310SingleVCStack is NULL) */
3699 break;
3700 case 6:
3701 /* (transparent is NULL) */
3702 break;
3703 /* ------------------------------- */
3704 /* ---- Extension Begins Here ---- */
3705 /* ------------------------------- */
3706 case 7:
3707 GetLengthDet(stream);
3708 /* (segmentationAndReassembly is NULL) */
3709 SkipOneOctet(stream);
3710 break;
3711 case 8:
3712 GetLengthDet(stream);
3713 /* (hdlcFrameTunnelingwSAR is NULL) */
3714 SkipOneOctet(stream);
3715 break;
3716 case 9:
3717 GetLengthDet(stream);
3718 /* (v120 is NULL) */
3719 SkipOneOctet(stream);
3720 break;
3721 case 10:
3722 GetLengthDet(stream);
3723 /* (separateLANStack is NULL) */
3724 SkipOneOctet(stream);
3725 break;
3726 case 11:
3727 GetLengthDet(stream);
3728 x->v76wCompression = (PS_V76wCompression) OSCL_DEFAULT_MALLOC(sizeof(S_V76wCompression));
3729 Decode_V76wCompression(x->v76wCompression, stream);
3730 ReadRemainingBits(stream);
3731 break;
3732 case 12:
3733 GetLengthDet(stream);
3734 /* (tcp is NULL) */
3735 SkipOneOctet(stream);
3736 break;
3737 case 13:
3738 GetLengthDet(stream);
3739 /* (udp is NULL) */
3740 SkipOneOctet(stream);
3741 break;
3742 default:
3743 ErrorMessage("Decode_DataProtocolCapability: Unsupported extension (skipping)");
3744 SkipOneExtension(stream);
3745 }
3746 }
3747
3748 /* <========================================> */
3749 /* PER-Decoder for V76wCompression (CHOICE) */
3750 /* <========================================> */
Decode_V76wCompression(PS_V76wCompression x,PS_InStream stream)3751 void Decode_V76wCompression(PS_V76wCompression x, PS_InStream stream)
3752 {
3753 x->index = GetChoiceIndex(3, 1, stream);
3754 switch (x->index)
3755 {
3756 case 0:
3757 x->transmitCompression = (PS_CompressionType) OSCL_DEFAULT_MALLOC(sizeof(S_CompressionType));
3758 Decode_CompressionType(x->transmitCompression, stream);
3759 break;
3760 case 1:
3761 x->receiveCompression = (PS_CompressionType) OSCL_DEFAULT_MALLOC(sizeof(S_CompressionType));
3762 Decode_CompressionType(x->receiveCompression, stream);
3763 break;
3764 case 2:
3765 x->transmitAndReceiveCompression = (PS_CompressionType) OSCL_DEFAULT_MALLOC(sizeof(S_CompressionType));
3766 Decode_CompressionType(x->transmitAndReceiveCompression, stream);
3767 break;
3768 /* ------------------------------- */
3769 /* ---- Extension Begins Here ---- */
3770 /* ------------------------------- */
3771 default:
3772 ErrorMessage("Decode_V76wCompression: Unsupported extension (skipping)");
3773 SkipOneExtension(stream);
3774 }
3775 }
3776
3777 /* <========================================> */
3778 /* PER-Decoder for CompressionType (CHOICE) */
3779 /* <========================================> */
Decode_CompressionType(PS_CompressionType x,PS_InStream stream)3780 void Decode_CompressionType(PS_CompressionType x, PS_InStream stream)
3781 {
3782 x->index = GetChoiceIndex(1, 1, stream);
3783 switch (x->index)
3784 {
3785 case 0:
3786 x->v42bis = (PS_V42bis) OSCL_DEFAULT_MALLOC(sizeof(S_V42bis));
3787 Decode_V42bis(x->v42bis, stream);
3788 break;
3789 /* ------------------------------- */
3790 /* ---- Extension Begins Here ---- */
3791 /* ------------------------------- */
3792 default:
3793 ErrorMessage("Decode_CompressionType: Unsupported extension (skipping)");
3794 SkipOneExtension(stream);
3795 }
3796 }
3797
3798 /* <=================================> */
3799 /* PER-Decoder for V42bis (SEQUENCE) */
3800 /* <=================================> */
Decode_V42bis(PS_V42bis x,PS_InStream stream)3801 void Decode_V42bis(PS_V42bis x, PS_InStream stream)
3802 {
3803 uint8 extension;
3804 PS_UnknownSigMap map;
3805
3806 extension = GetBoolean(stream);
3807 x->numberOfCodewords = GetInteger(1, 65536, stream);
3808 x->maximumStringLength = (uint16) GetInteger(1, 256, stream);
3809 /* ------------------------------- */
3810 /* ---- Extension Begins Here ---- */
3811 /* ------------------------------- */
3812 if (extension)
3813 {
3814 map = GetUnknownSigMap(stream);
3815 if (SkipUnreadExtensions(map, stream))
3816 {
3817 ErrorMessage("Decode_V42bis: Unknown extensions (skipped)");
3818 }
3819 }
3820 }
3821
3822 /* <===================================> */
3823 /* PER-Decoder for T84Profile (CHOICE) */
3824 /* <===================================> */
Decode_T84Profile(PS_T84Profile x,PS_InStream stream)3825 void Decode_T84Profile(PS_T84Profile x, PS_InStream stream)
3826 {
3827 x->index = GetChoiceIndex(2, 0, stream);
3828 switch (x->index)
3829 {
3830 case 0:
3831 /* (t84Unrestricted is NULL) */
3832 break;
3833 case 1:
3834 x->t84Restricted = (PS_T84Restricted) OSCL_DEFAULT_MALLOC(sizeof(S_T84Restricted));
3835 Decode_T84Restricted(x->t84Restricted, stream);
3836 break;
3837 default:
3838 ErrorMessageAndLeave("Decode_T84Profile: Illegal CHOICE index");
3839 }
3840 }
3841
3842 /* <========================================> */
3843 /* PER-Decoder for T84Restricted (SEQUENCE) */
3844 /* <========================================> */
Decode_T84Restricted(PS_T84Restricted x,PS_InStream stream)3845 void Decode_T84Restricted(PS_T84Restricted x, PS_InStream stream)
3846 {
3847 uint8 extension;
3848 PS_UnknownSigMap map;
3849
3850 extension = GetBoolean(stream);
3851 x->qcif = GetBoolean(stream);
3852 x->cif = GetBoolean(stream);
3853 x->ccir601Seq = GetBoolean(stream);
3854 x->ccir601Prog = GetBoolean(stream);
3855 x->hdtvSeq = GetBoolean(stream);
3856 x->hdtvProg = GetBoolean(stream);
3857 x->g3FacsMH200x100 = GetBoolean(stream);
3858 x->g3FacsMH200x200 = GetBoolean(stream);
3859 x->g4FacsMMR200x100 = GetBoolean(stream);
3860 x->g4FacsMMR200x200 = GetBoolean(stream);
3861 x->jbig200x200Seq = GetBoolean(stream);
3862 x->jbig200x200Prog = GetBoolean(stream);
3863 x->jbig300x300Seq = GetBoolean(stream);
3864 x->jbig300x300Prog = GetBoolean(stream);
3865 x->digPhotoLow = GetBoolean(stream);
3866 x->digPhotoMedSeq = GetBoolean(stream);
3867 x->digPhotoMedProg = GetBoolean(stream);
3868 x->digPhotoHighSeq = GetBoolean(stream);
3869 x->digPhotoHighProg = GetBoolean(stream);
3870 /* ------------------------------- */
3871 /* ---- Extension Begins Here ---- */
3872 /* ------------------------------- */
3873 if (extension)
3874 {
3875 map = GetUnknownSigMap(stream);
3876 if (SkipUnreadExtensions(map, stream))
3877 {
3878 ErrorMessage("Decode_T84Restricted: Unknown extensions (skipped)");
3879 }
3880 }
3881 }
3882
3883 /* <========================================> */
3884 /* PER-Decoder for T38FaxProfile (SEQUENCE) */
3885 /* <========================================> */
Decode_T38FaxProfile(PS_T38FaxProfile x,PS_InStream stream)3886 void Decode_T38FaxProfile(PS_T38FaxProfile x, PS_InStream stream)
3887 {
3888 uint8 extension;
3889 PS_UnknownSigMap map;
3890
3891 extension = GetBoolean(stream);
3892 x->fillBitRemoval = GetBoolean(stream);
3893 x->transcodingJBIG = GetBoolean(stream);
3894 x->transcodingMMR = GetBoolean(stream);
3895 /* ------------------------------- */
3896 /* ---- Extension Begins Here ---- */
3897 /* ------------------------------- */
3898 x->option_of_version = OFF;
3899 x->option_of_t38FaxRateManagement = OFF;
3900 x->option_of_t38FaxUdpOptions = OFF;
3901 if (extension)
3902 {
3903 map = GetUnknownSigMap(stream);
3904 x->option_of_version = SigMapValue(0, map);
3905 if (x->option_of_version)
3906 {
3907 ExtensionPrep(map, stream);
3908 x->version = (uint8) GetInteger(0, 255, stream);
3909 ReadRemainingBits(stream);
3910 }
3911 x->option_of_t38FaxRateManagement = SigMapValue(1, map);
3912 if (x->option_of_t38FaxRateManagement)
3913 {
3914 ExtensionPrep(map, stream);
3915 Decode_T38FaxRateManagement(&x->t38FaxRateManagement, stream);
3916 ReadRemainingBits(stream);
3917 }
3918 x->option_of_t38FaxUdpOptions = SigMapValue(2, map);
3919 if (x->option_of_t38FaxUdpOptions)
3920 {
3921 ExtensionPrep(map, stream);
3922 Decode_T38FaxUdpOptions(&x->t38FaxUdpOptions, stream);
3923 ReadRemainingBits(stream);
3924 }
3925 if (SkipUnreadExtensions(map, stream))
3926 {
3927 ErrorMessage("Decode_T38FaxProfile: Unknown extensions (skipped)");
3928 }
3929 }
3930 }
3931
3932 /* <=============================================> */
3933 /* PER-Decoder for T38FaxRateManagement (CHOICE) */
3934 /* <=============================================> */
Decode_T38FaxRateManagement(PS_T38FaxRateManagement x,PS_InStream stream)3935 void Decode_T38FaxRateManagement(PS_T38FaxRateManagement x, PS_InStream stream)
3936 {
3937 x->index = GetChoiceIndex(2, 1, stream);
3938 switch (x->index)
3939 {
3940 case 0:
3941 /* (localTCF is NULL) */
3942 break;
3943 case 1:
3944 /* (transferredTCF is NULL) */
3945 break;
3946 /* ------------------------------- */
3947 /* ---- Extension Begins Here ---- */
3948 /* ------------------------------- */
3949 default:
3950 ErrorMessage("Decode_T38FaxRateManagement: Unsupported extension (skipping)");
3951 SkipOneExtension(stream);
3952 }
3953 }
3954
3955 /* <===========================================> */
3956 /* PER-Decoder for T38FaxUdpOptions (SEQUENCE) */
3957 /* <===========================================> */
Decode_T38FaxUdpOptions(PS_T38FaxUdpOptions x,PS_InStream stream)3958 void Decode_T38FaxUdpOptions(PS_T38FaxUdpOptions x, PS_InStream stream)
3959 {
3960 x->option_of_t38FaxMaxBuffer = GetBoolean(stream);
3961 x->option_of_t38FaxMaxDatagram = GetBoolean(stream);
3962 if (x->option_of_t38FaxMaxBuffer)
3963 {
3964 x->t38FaxMaxBuffer = GetUnboundedInteger(stream);
3965 }
3966 if (x->option_of_t38FaxMaxDatagram)
3967 {
3968 x->t38FaxMaxDatagram = GetUnboundedInteger(stream);
3969 }
3970 Decode_T38FaxUdpEC(&x->t38FaxUdpEC, stream);
3971 }
3972
3973 /* <====================================> */
3974 /* PER-Decoder for T38FaxUdpEC (CHOICE) */
3975 /* <====================================> */
Decode_T38FaxUdpEC(PS_T38FaxUdpEC x,PS_InStream stream)3976 void Decode_T38FaxUdpEC(PS_T38FaxUdpEC x, PS_InStream stream)
3977 {
3978 x->index = GetChoiceIndex(2, 1, stream);
3979 switch (x->index)
3980 {
3981 case 0:
3982 /* (t38UDPFEC is NULL) */
3983 break;
3984 case 1:
3985 /* (t38UDPRedundancy is NULL) */
3986 break;
3987 /* ------------------------------- */
3988 /* ---- Extension Begins Here ---- */
3989 /* ------------------------------- */
3990 default:
3991 ErrorMessage("Decode_T38FaxUdpEC: Unsupported extension (skipping)");
3992 SkipOneExtension(stream);
3993 }
3994 }
3995
3996 /* <===============================================================> */
3997 /* PER-Decoder for EncryptionAuthenticationAndIntegrity (SEQUENCE) */
3998 /* <===============================================================> */
Decode_EncryptionAuthenticationAndIntegrity(PS_EncryptionAuthenticationAndIntegrity x,PS_InStream stream)3999 void Decode_EncryptionAuthenticationAndIntegrity(PS_EncryptionAuthenticationAndIntegrity x, PS_InStream stream)
4000 {
4001 uint8 extension;
4002 PS_UnknownSigMap map;
4003
4004 extension = GetBoolean(stream);
4005 x->option_of_encryptionCapability = GetBoolean(stream);
4006 x->option_of_authenticationCapability = GetBoolean(stream);
4007 x->option_of_integrityCapability = GetBoolean(stream);
4008 if (x->option_of_encryptionCapability)
4009 {
4010 Decode_EncryptionCapability(&x->encryptionCapability, stream);
4011 }
4012 if (x->option_of_authenticationCapability)
4013 {
4014 Decode_AuthenticationCapability(&x->authenticationCapability, stream);
4015 }
4016 if (x->option_of_integrityCapability)
4017 {
4018 Decode_IntegrityCapability(&x->integrityCapability, stream);
4019 }
4020 /* ------------------------------- */
4021 /* ---- Extension Begins Here ---- */
4022 /* ------------------------------- */
4023 if (extension)
4024 {
4025 map = GetUnknownSigMap(stream);
4026 if (SkipUnreadExtensions(map, stream))
4027 {
4028 ErrorMessage("Decode_EncryptionAuthenticationAndIntegrity: Unknown extensions (skipped)");
4029 }
4030 }
4031 }
4032
4033 /* <==================================================> */
4034 /* PER-Decoder for EncryptionCapability (SEQUENCE-OF) */
4035 /* <==================================================> */
Decode_EncryptionCapability(PS_EncryptionCapability x,PS_InStream stream)4036 void Decode_EncryptionCapability(PS_EncryptionCapability x, PS_InStream stream)
4037 {
4038 uint16 i;
4039 x->size = (uint16) GetInteger(1, 256, stream);
4040 x->item = (PS_MediaEncryptionAlgorithm)
4041 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_MediaEncryptionAlgorithm));
4042 for (i = 0; i < x->size; ++i)
4043 {
4044 Decode_MediaEncryptionAlgorithm(x->item + i, stream);
4045 }
4046 }
4047
4048 /* <=================================================> */
4049 /* PER-Decoder for MediaEncryptionAlgorithm (CHOICE) */
4050 /* <=================================================> */
Decode_MediaEncryptionAlgorithm(PS_MediaEncryptionAlgorithm x,PS_InStream stream)4051 void Decode_MediaEncryptionAlgorithm(PS_MediaEncryptionAlgorithm x, PS_InStream stream)
4052 {
4053 x->index = GetChoiceIndex(2, 1, stream);
4054 switch (x->index)
4055 {
4056 case 0:
4057 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
4058 Decode_NonStandardParameter(x->nonStandard, stream);
4059 break;
4060 case 1:
4061 x->algorithm = (PS_OBJECTIDENT) OSCL_DEFAULT_MALLOC(sizeof(S_OBJECTIDENT));
4062 GetObjectID(x->algorithm, stream);
4063 break;
4064 /* ------------------------------- */
4065 /* ---- Extension Begins Here ---- */
4066 /* ------------------------------- */
4067 default:
4068 ErrorMessage("Decode_MediaEncryptionAlgorithm: Unsupported extension (skipping)");
4069 SkipOneExtension(stream);
4070 }
4071 }
4072
4073 /* <===================================================> */
4074 /* PER-Decoder for AuthenticationCapability (SEQUENCE) */
4075 /* <===================================================> */
Decode_AuthenticationCapability(PS_AuthenticationCapability x,PS_InStream stream)4076 void Decode_AuthenticationCapability(PS_AuthenticationCapability x, PS_InStream stream)
4077 {
4078 uint8 extension;
4079 PS_UnknownSigMap map;
4080
4081 extension = GetBoolean(stream);
4082 x->option_of_nonStandard = GetBoolean(stream);
4083 if (x->option_of_nonStandard)
4084 {
4085 Decode_NonStandardParameter(&x->nonStandard, stream);
4086 }
4087 /* ------------------------------- */
4088 /* ---- Extension Begins Here ---- */
4089 /* ------------------------------- */
4090 if (extension)
4091 {
4092 map = GetUnknownSigMap(stream);
4093 if (SkipUnreadExtensions(map, stream))
4094 {
4095 ErrorMessage("Decode_AuthenticationCapability: Unknown extensions (skipped)");
4096 }
4097 }
4098 }
4099
4100 /* <==============================================> */
4101 /* PER-Decoder for IntegrityCapability (SEQUENCE) */
4102 /* <==============================================> */
Decode_IntegrityCapability(PS_IntegrityCapability x,PS_InStream stream)4103 void Decode_IntegrityCapability(PS_IntegrityCapability x, PS_InStream stream)
4104 {
4105 uint8 extension;
4106 PS_UnknownSigMap map;
4107
4108 extension = GetBoolean(stream);
4109 x->option_of_nonStandard = GetBoolean(stream);
4110 if (x->option_of_nonStandard)
4111 {
4112 Decode_NonStandardParameter(&x->nonStandard, stream);
4113 }
4114 /* ------------------------------- */
4115 /* ---- Extension Begins Here ---- */
4116 /* ------------------------------- */
4117 if (extension)
4118 {
4119 map = GetUnknownSigMap(stream);
4120 if (SkipUnreadExtensions(map, stream))
4121 {
4122 ErrorMessage("Decode_IntegrityCapability: Unknown extensions (skipped)");
4123 }
4124 }
4125 }
4126
4127 /* <============================================> */
4128 /* PER-Decoder for UserInputCapability (CHOICE) */
4129 /* <============================================> */
Decode_UserInputCapability(PS_UserInputCapability x,PS_InStream stream)4130 void Decode_UserInputCapability(PS_UserInputCapability x, PS_InStream stream)
4131 {
4132 uint16 i;
4133 x->index = GetChoiceIndex(6, 1, stream);
4134 switch (x->index)
4135 {
4136 case 0:
4137 x->size = (uint8) GetInteger(1, 16, stream);
4138 x->nonStandard = (PS_NonStandardParameter)
4139 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_NonStandardParameter));
4140 for (i = 0; i < x->size; ++i)
4141 {
4142 Decode_NonStandardParameter(x->nonStandard + i, stream);
4143 }
4144 break;
4145 case 1:
4146 /* (basicString is NULL) */
4147 break;
4148 case 2:
4149 /* (iA5String is NULL) */
4150 break;
4151 case 3:
4152 /* (generalString is NULL) */
4153 break;
4154 case 4:
4155 /* (dtmf is NULL) */
4156 break;
4157 case 5:
4158 /* (hookflash is NULL) */
4159 break;
4160 /* ------------------------------- */
4161 /* ---- Extension Begins Here ---- */
4162 /* ------------------------------- */
4163 default:
4164 ErrorMessage("Decode_UserInputCapability: Unsupported extension (skipping)");
4165 SkipOneExtension(stream);
4166 }
4167 }
4168
4169 /* <===============================================> */
4170 /* PER-Decoder for ConferenceCapability (SEQUENCE) */
4171 /* <===============================================> */
Decode_ConferenceCapability(PS_ConferenceCapability x,PS_InStream stream)4172 void Decode_ConferenceCapability(PS_ConferenceCapability x, PS_InStream stream)
4173 {
4174 uint16 i;
4175 uint8 extension;
4176 PS_UnknownSigMap map;
4177
4178 extension = GetBoolean(stream);
4179 x->option_of_nonStandardData = GetBoolean(stream);
4180 if (x->option_of_nonStandardData)
4181 {
4182 x->size_of_nonStandardData = (uint16) GetLengthDet(stream);
4183 x->nonStandardData = (PS_NonStandardParameter)
4184 OSCL_DEFAULT_MALLOC(x->size_of_nonStandardData * sizeof(S_NonStandardParameter));
4185 for (i = 0; i < x->size_of_nonStandardData; ++i)
4186 {
4187 Decode_NonStandardParameter(x->nonStandardData + i, stream);
4188 }
4189 }
4190 x->chairControlCapability = GetBoolean(stream);
4191 /* ------------------------------- */
4192 /* ---- Extension Begins Here ---- */
4193 /* ------------------------------- */
4194 x->option_of_VideoIndicateMixingCapability = OFF;
4195 x->option_of_multipointVisualizationCapability = OFF;
4196 if (extension)
4197 {
4198 map = GetUnknownSigMap(stream);
4199 x->option_of_VideoIndicateMixingCapability = SigMapValue(0, map);
4200 if (x->option_of_VideoIndicateMixingCapability)
4201 {
4202 ExtensionPrep(map, stream);
4203 x->VideoIndicateMixingCapability = GetBoolean(stream);
4204 ReadRemainingBits(stream);
4205 }
4206 x->option_of_multipointVisualizationCapability = SigMapValue(1, map);
4207 if (x->option_of_multipointVisualizationCapability)
4208 {
4209 ExtensionPrep(map, stream);
4210 x->multipointVisualizationCapability = GetBoolean(stream);
4211 ReadRemainingBits(stream);
4212 }
4213 if (SkipUnreadExtensions(map, stream))
4214 {
4215 ErrorMessage("Decode_ConferenceCapability: Unknown extensions (skipped)");
4216 }
4217 }
4218 }
4219
4220 /* <============================================> */
4221 /* PER-Decoder for GenericCapability (SEQUENCE) */
4222 /* <============================================> */
Decode_GenericCapability(PS_GenericCapability x,PS_InStream stream)4223 void Decode_GenericCapability(PS_GenericCapability x, PS_InStream stream)
4224 {
4225 uint16 i;
4226 uint8 extension;
4227 PS_UnknownSigMap map;
4228
4229 extension = GetBoolean(stream);
4230 x->option_of_maxBitRate = GetBoolean(stream);
4231 x->option_of_collapsing = GetBoolean(stream);
4232 x->option_of_nonCollapsing = GetBoolean(stream);
4233 x->option_of_nonCollapsingRaw = GetBoolean(stream);
4234 x->option_of_transport = GetBoolean(stream);
4235 Decode_CapabilityIdentifier(&x->capabilityIdentifier, stream);
4236 if (x->option_of_maxBitRate)
4237 {
4238 x->maxBitRate = GetInteger(0, 0xffffffff, stream);
4239 }
4240 if (x->option_of_collapsing)
4241 {
4242 x->size_of_collapsing = (uint16) GetLengthDet(stream);
4243 x->collapsing = (PS_GenericParameter)
4244 OSCL_DEFAULT_MALLOC(x->size_of_collapsing * sizeof(S_GenericParameter));
4245 for (i = 0; i < x->size_of_collapsing; ++i)
4246 {
4247 Decode_GenericParameter(x->collapsing + i, stream);
4248 }
4249 }
4250 if (x->option_of_nonCollapsing)
4251 {
4252 x->size_of_nonCollapsing = (uint16) GetLengthDet(stream);
4253 x->nonCollapsing = (PS_GenericParameter)
4254 OSCL_DEFAULT_MALLOC(x->size_of_nonCollapsing * sizeof(S_GenericParameter));
4255 for (i = 0; i < x->size_of_nonCollapsing; ++i)
4256 {
4257 Decode_GenericParameter(x->nonCollapsing + i, stream);
4258 }
4259 }
4260 if (x->option_of_nonCollapsingRaw)
4261 {
4262 GetOctetString(1, 0, 0, &x->nonCollapsingRaw, stream);
4263 }
4264 if (x->option_of_transport)
4265 {
4266 Decode_DataProtocolCapability(&x->transport, stream);
4267 }
4268 /* ------------------------------- */
4269 /* ---- Extension Begins Here ---- */
4270 /* ------------------------------- */
4271 if (extension)
4272 {
4273 map = GetUnknownSigMap(stream);
4274 if (SkipUnreadExtensions(map, stream))
4275 {
4276 ErrorMessage("Decode_GenericCapability: Unknown extensions (skipped)");
4277 }
4278 }
4279 }
4280
4281 /* <=============================================> */
4282 /* PER-Decoder for CapabilityIdentifier (CHOICE) */
4283 /* <=============================================> */
Decode_CapabilityIdentifier(PS_CapabilityIdentifier x,PS_InStream stream)4284 void Decode_CapabilityIdentifier(PS_CapabilityIdentifier x, PS_InStream stream)
4285 {
4286 x->index = GetChoiceIndex(4, 1, stream);
4287 switch (x->index)
4288 {
4289 case 0:
4290 x->standard = (PS_OBJECTIDENT) OSCL_DEFAULT_MALLOC(sizeof(S_OBJECTIDENT));
4291 GetObjectID(x->standard, stream);
4292 break;
4293 case 1:
4294 x->h221NonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
4295 Decode_NonStandardParameter(x->h221NonStandard, stream);
4296 break;
4297 case 2:
4298 x->uuid = (PS_OCTETSTRING) OSCL_DEFAULT_MALLOC(sizeof(S_OCTETSTRING));
4299 GetOctetString(0, 16, 16, x->uuid, stream);
4300 break;
4301 case 3:
4302 x->domainBased = (PS_int8STRING) OSCL_DEFAULT_MALLOC(sizeof(S_int8STRING));
4303 GetCharString("IA5String", 0, 1, 64, NULL, x->domainBased, stream);
4304 break;
4305 /* ------------------------------- */
4306 /* ---- Extension Begins Here ---- */
4307 /* ------------------------------- */
4308 default:
4309 ErrorMessage("Decode_CapabilityIdentifier: Unsupported extension (skipping)");
4310 SkipOneExtension(stream);
4311 }
4312 }
4313
4314 /* <===========================================> */
4315 /* PER-Decoder for GenericParameter (SEQUENCE) */
4316 /* <===========================================> */
Decode_GenericParameter(PS_GenericParameter x,PS_InStream stream)4317 void Decode_GenericParameter(PS_GenericParameter x, PS_InStream stream)
4318 {
4319 uint16 i;
4320 uint8 extension;
4321 PS_UnknownSigMap map;
4322
4323 extension = GetBoolean(stream);
4324 x->option_of_supersedes = GetBoolean(stream);
4325 Decode_ParameterIdentifier(&x->parameterIdentifier, stream);
4326 Decode_ParameterValue(&x->parameterValue, stream);
4327 if (x->option_of_supersedes)
4328 {
4329 x->size_of_supersedes = (uint16) GetLengthDet(stream);
4330 x->supersedes = (PS_ParameterIdentifier)
4331 OSCL_DEFAULT_MALLOC(x->size_of_supersedes * sizeof(S_ParameterIdentifier));
4332 for (i = 0; i < x->size_of_supersedes; ++i)
4333 {
4334 Decode_ParameterIdentifier(x->supersedes + i, stream);
4335 }
4336 }
4337 /* ------------------------------- */
4338 /* ---- Extension Begins Here ---- */
4339 /* ------------------------------- */
4340 if (extension)
4341 {
4342 map = GetUnknownSigMap(stream);
4343 if (SkipUnreadExtensions(map, stream))
4344 {
4345 ErrorMessage("Decode_GenericParameter: Unknown extensions (skipped)");
4346 }
4347 }
4348 }
4349
4350 /* <============================================> */
4351 /* PER-Decoder for ParameterIdentifier (CHOICE) */
4352 /* <============================================> */
Decode_ParameterIdentifier(PS_ParameterIdentifier x,PS_InStream stream)4353 void Decode_ParameterIdentifier(PS_ParameterIdentifier x, PS_InStream stream)
4354 {
4355 x->index = GetChoiceIndex(4, 1, stream);
4356 switch (x->index)
4357 {
4358 case 0:
4359 x->standard = (uint8) GetInteger(0, 127, stream);
4360 break;
4361 case 1:
4362 x->h221NonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
4363 Decode_NonStandardParameter(x->h221NonStandard, stream);
4364 break;
4365 case 2:
4366 x->uuid = (PS_OCTETSTRING) OSCL_DEFAULT_MALLOC(sizeof(S_OCTETSTRING));
4367 GetOctetString(0, 16, 16, x->uuid, stream);
4368 break;
4369 case 3:
4370 x->domainBased = (PS_int8STRING) OSCL_DEFAULT_MALLOC(sizeof(S_int8STRING));
4371 GetCharString("IA5String", 0, 1, 64, NULL, x->domainBased, stream);
4372 break;
4373 /* ------------------------------- */
4374 /* ---- Extension Begins Here ---- */
4375 /* ------------------------------- */
4376 default:
4377 ErrorMessage("Decode_ParameterIdentifier: Unsupported extension (skipping)");
4378 SkipOneExtension(stream);
4379 }
4380 }
4381
4382 /* <=======================================> */
4383 /* PER-Decoder for ParameterValue (CHOICE) */
4384 /* <=======================================> */
Decode_ParameterValue(PS_ParameterValue x,PS_InStream stream)4385 void Decode_ParameterValue(PS_ParameterValue x, PS_InStream stream)
4386 {
4387 uint16 i;
4388 x->index = GetChoiceIndex(8, 1, stream);
4389 switch (x->index)
4390 {
4391 case 0:
4392 /* (logical is NULL) */
4393 break;
4394 case 1:
4395 x->booleanArray = (uint8) GetInteger(0, 255, stream);
4396 break;
4397 case 2:
4398 x->unsignedMin = (uint16) GetInteger(0, 65535, stream);
4399 break;
4400 case 3:
4401 x->unsignedMax = (uint16) GetInteger(0, 65535, stream);
4402 break;
4403 case 4:
4404 x->unsigned32Min = GetInteger(0, 0xffffffff, stream);
4405 break;
4406 case 5:
4407 x->unsigned32Max = GetInteger(0, 0xffffffff, stream);
4408 break;
4409 case 6:
4410 x->octetString = (PS_OCTETSTRING) OSCL_DEFAULT_MALLOC(sizeof(S_OCTETSTRING));
4411 GetOctetString(1, 0, 0, x->octetString, stream);
4412 break;
4413 case 7:
4414 x->size = (uint16) GetLengthDet(stream);
4415 x->genericParameter = (PS_GenericParameter)
4416 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_GenericParameter));
4417 for (i = 0; i < x->size; ++i)
4418 {
4419 Decode_GenericParameter(x->genericParameter + i, stream);
4420 }
4421 break;
4422 /* ------------------------------- */
4423 /* ---- Extension Begins Here ---- */
4424 /* ------------------------------- */
4425 default:
4426 ErrorMessage("Decode_ParameterValue: Unsupported extension (skipping)");
4427 SkipOneExtension(stream);
4428 }
4429 }
4430
4431 /* <=============================================> */
4432 /* PER-Decoder for OpenLogicalChannel (SEQUENCE) */
4433 /* <=============================================> */
Decode_OpenLogicalChannel(PS_OpenLogicalChannel x,PS_InStream stream)4434 void Decode_OpenLogicalChannel(PS_OpenLogicalChannel x, PS_InStream stream)
4435 {
4436 uint8 extension;
4437 PS_UnknownSigMap map;
4438
4439 extension = GetBoolean(stream);
4440 x->option_of_reverseLogicalChannelParameters = GetBoolean(stream);
4441 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
4442 Decode_ForwardLogicalChannelParameters(&x->forwardLogicalChannelParameters, stream);
4443 if (x->option_of_reverseLogicalChannelParameters)
4444 {
4445 Decode_ReverseLogicalChannelParameters(&x->reverseLogicalChannelParameters, stream);
4446 }
4447 /* ------------------------------- */
4448 /* ---- Extension Begins Here ---- */
4449 /* ------------------------------- */
4450 x->option_of_separateStack = OFF;
4451 x->option_of_encryptionSync = OFF;
4452 if (extension)
4453 {
4454 map = GetUnknownSigMap(stream);
4455 x->option_of_separateStack = SigMapValue(0, map);
4456 if (x->option_of_separateStack)
4457 {
4458 ExtensionPrep(map, stream);
4459 Decode_NetworkAccessParameters(&x->separateStack, stream);
4460 ReadRemainingBits(stream);
4461 }
4462 x->option_of_encryptionSync = SigMapValue(1, map);
4463 if (x->option_of_encryptionSync)
4464 {
4465 ExtensionPrep(map, stream);
4466 Decode_EncryptionSync(&x->encryptionSync, stream);
4467 ReadRemainingBits(stream);
4468 }
4469 if (SkipUnreadExtensions(map, stream))
4470 {
4471 ErrorMessage("Decode_OpenLogicalChannel: Unknown extensions (skipped)");
4472 }
4473 }
4474 }
4475
4476 /* <==========================================================> */
4477 /* PER-Decoder for ReverseLogicalChannelParameters (SEQUENCE) */
4478 /* <==========================================================> */
Decode_ReverseLogicalChannelParameters(PS_ReverseLogicalChannelParameters x,PS_InStream stream)4479 void Decode_ReverseLogicalChannelParameters(PS_ReverseLogicalChannelParameters x, PS_InStream stream)
4480 {
4481 uint8 extension;
4482 PS_UnknownSigMap map;
4483
4484 extension = GetBoolean(stream);
4485 x->option_of_rlcMultiplexParameters = GetBoolean(stream);
4486 Decode_DataType(&x->dataType, stream);
4487 if (x->option_of_rlcMultiplexParameters)
4488 {
4489 Decode_RlcMultiplexParameters(&x->rlcMultiplexParameters, stream);
4490 }
4491 /* ------------------------------- */
4492 /* ---- Extension Begins Here ---- */
4493 /* ------------------------------- */
4494 x->option_of_reverseLogicalChannelDependency = OFF;
4495 x->option_of_replacementFor = OFF;
4496 if (extension)
4497 {
4498 map = GetUnknownSigMap(stream);
4499 x->option_of_reverseLogicalChannelDependency = SigMapValue(0, map);
4500 if (x->option_of_reverseLogicalChannelDependency)
4501 {
4502 ExtensionPrep(map, stream);
4503 x->reverseLogicalChannelDependency = (uint16) GetInteger(1, 65535, stream);
4504 ReadRemainingBits(stream);
4505 }
4506 x->option_of_replacementFor = SigMapValue(1, map);
4507 if (x->option_of_replacementFor)
4508 {
4509 ExtensionPrep(map, stream);
4510 x->replacementFor = (uint16) GetInteger(1, 65535, stream);
4511 ReadRemainingBits(stream);
4512 }
4513 if (SkipUnreadExtensions(map, stream))
4514 {
4515 ErrorMessage("Decode_ReverseLogicalChannelParameters: Unknown extensions (skipped)");
4516 }
4517 }
4518 }
4519
4520 /* <===============================================> */
4521 /* PER-Decoder for RlcMultiplexParameters (CHOICE) */
4522 /* <===============================================> */
Decode_RlcMultiplexParameters(PS_RlcMultiplexParameters x,PS_InStream stream)4523 void Decode_RlcMultiplexParameters(PS_RlcMultiplexParameters x, PS_InStream stream)
4524 {
4525 x->index = GetChoiceIndex(2, 1, stream);
4526 switch (x->index)
4527 {
4528 case 0:
4529 x->h223LogicalChannelParameters = (PS_H223LogicalChannelParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223LogicalChannelParameters));
4530 Decode_H223LogicalChannelParameters(x->h223LogicalChannelParameters, stream);
4531 break;
4532 case 1:
4533 x->v76LogicalChannelParameters = (PS_V76LogicalChannelParameters) OSCL_DEFAULT_MALLOC(sizeof(S_V76LogicalChannelParameters));
4534 Decode_V76LogicalChannelParameters(x->v76LogicalChannelParameters, stream);
4535 break;
4536 /* ------------------------------- */
4537 /* ---- Extension Begins Here ---- */
4538 /* ------------------------------- */
4539 case 2:
4540 GetLengthDet(stream);
4541 x->h2250LogicalChannelParameters = (PS_H2250LogicalChannelParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H2250LogicalChannelParameters));
4542 Decode_H2250LogicalChannelParameters(x->h2250LogicalChannelParameters, stream);
4543 ReadRemainingBits(stream);
4544 break;
4545 default:
4546 ErrorMessage("Decode_RlcMultiplexParameters: Unsupported extension (skipping)");
4547 SkipOneExtension(stream);
4548 }
4549 }
4550
4551 /* <==========================================================> */
4552 /* PER-Decoder for ForwardLogicalChannelParameters (SEQUENCE) */
4553 /* <==========================================================> */
Decode_ForwardLogicalChannelParameters(PS_ForwardLogicalChannelParameters x,PS_InStream stream)4554 void Decode_ForwardLogicalChannelParameters(PS_ForwardLogicalChannelParameters x, PS_InStream stream)
4555 {
4556 uint8 extension;
4557 PS_UnknownSigMap map;
4558
4559 extension = GetBoolean(stream);
4560 x->option_of_portNumber = GetBoolean(stream);
4561 if (x->option_of_portNumber)
4562 {
4563 x->portNumber = (uint16) GetInteger(0, 65535, stream);
4564 }
4565 Decode_DataType(&x->dataType, stream);
4566 Decode_MultiplexParameters(&x->multiplexParameters, stream);
4567 /* ------------------------------- */
4568 /* ---- Extension Begins Here ---- */
4569 /* ------------------------------- */
4570 x->option_of_forwardLogicalChannelDependency = OFF;
4571 x->option_of_replacementFor = OFF;
4572 if (extension)
4573 {
4574 map = GetUnknownSigMap(stream);
4575 x->option_of_forwardLogicalChannelDependency = SigMapValue(0, map);
4576 if (x->option_of_forwardLogicalChannelDependency)
4577 {
4578 ExtensionPrep(map, stream);
4579 x->forwardLogicalChannelDependency = (uint16) GetInteger(1, 65535, stream);
4580 ReadRemainingBits(stream);
4581 }
4582 x->option_of_replacementFor = SigMapValue(1, map);
4583 if (x->option_of_replacementFor)
4584 {
4585 ExtensionPrep(map, stream);
4586 x->replacementFor = (uint16) GetInteger(1, 65535, stream);
4587 ReadRemainingBits(stream);
4588 }
4589 if (SkipUnreadExtensions(map, stream))
4590 {
4591 ErrorMessage("Decode_ForwardLogicalChannelParameters: Unknown extensions (skipped)");
4592 }
4593 }
4594 }
4595
4596 /* <============================================> */
4597 /* PER-Decoder for MultiplexParameters (CHOICE) */
4598 /* <============================================> */
Decode_MultiplexParameters(PS_MultiplexParameters x,PS_InStream stream)4599 void Decode_MultiplexParameters(PS_MultiplexParameters x, PS_InStream stream)
4600 {
4601 x->index = GetChoiceIndex(3, 1, stream);
4602 switch (x->index)
4603 {
4604 case 0:
4605 x->h222LogicalChannelParameters = (PS_H222LogicalChannelParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H222LogicalChannelParameters));
4606 Decode_H222LogicalChannelParameters(x->h222LogicalChannelParameters, stream);
4607 break;
4608 case 1:
4609 x->h223LogicalChannelParameters = (PS_H223LogicalChannelParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223LogicalChannelParameters));
4610 Decode_H223LogicalChannelParameters(x->h223LogicalChannelParameters, stream);
4611 break;
4612 case 2:
4613 x->v76LogicalChannelParameters = (PS_V76LogicalChannelParameters) OSCL_DEFAULT_MALLOC(sizeof(S_V76LogicalChannelParameters));
4614 Decode_V76LogicalChannelParameters(x->v76LogicalChannelParameters, stream);
4615 break;
4616 /* ------------------------------- */
4617 /* ---- Extension Begins Here ---- */
4618 /* ------------------------------- */
4619 case 3:
4620 GetLengthDet(stream);
4621 x->h2250LogicalChannelParameters = (PS_H2250LogicalChannelParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H2250LogicalChannelParameters));
4622 Decode_H2250LogicalChannelParameters(x->h2250LogicalChannelParameters, stream);
4623 ReadRemainingBits(stream);
4624 break;
4625 case 4:
4626 GetLengthDet(stream);
4627 /* (none is NULL) */
4628 SkipOneOctet(stream);
4629 break;
4630 default:
4631 ErrorMessage("Decode_MultiplexParameters: Unsupported extension (skipping)");
4632 SkipOneExtension(stream);
4633 }
4634 }
4635
4636 /* <==================================================> */
4637 /* PER-Decoder for NetworkAccessParameters (SEQUENCE) */
4638 /* <==================================================> */
Decode_NetworkAccessParameters(PS_NetworkAccessParameters x,PS_InStream stream)4639 void Decode_NetworkAccessParameters(PS_NetworkAccessParameters x, PS_InStream stream)
4640 {
4641 uint8 extension;
4642 PS_UnknownSigMap map;
4643
4644 extension = GetBoolean(stream);
4645 x->option_of_distribution = GetBoolean(stream);
4646 x->option_of_externalReference = GetBoolean(stream);
4647 if (x->option_of_distribution)
4648 {
4649 Decode_Distribution(&x->distribution, stream);
4650 }
4651 Decode_NetworkAddress(&x->networkAddress, stream);
4652 x->associateConference = GetBoolean(stream);
4653 if (x->option_of_externalReference)
4654 {
4655 GetOctetString(0, 1, 255, &x->externalReference, stream);
4656 }
4657 /* ------------------------------- */
4658 /* ---- Extension Begins Here ---- */
4659 /* ------------------------------- */
4660 x->option_of_t120SetupProcedure = OFF;
4661 if (extension)
4662 {
4663 map = GetUnknownSigMap(stream);
4664 x->option_of_t120SetupProcedure = SigMapValue(0, map);
4665 if (x->option_of_t120SetupProcedure)
4666 {
4667 ExtensionPrep(map, stream);
4668 Decode_T120SetupProcedure(&x->t120SetupProcedure, stream);
4669 ReadRemainingBits(stream);
4670 }
4671 if (SkipUnreadExtensions(map, stream))
4672 {
4673 ErrorMessage("Decode_NetworkAccessParameters: Unknown extensions (skipped)");
4674 }
4675 }
4676 }
4677
4678 /* <===========================================> */
4679 /* PER-Decoder for T120SetupProcedure (CHOICE) */
4680 /* <===========================================> */
Decode_T120SetupProcedure(PS_T120SetupProcedure x,PS_InStream stream)4681 void Decode_T120SetupProcedure(PS_T120SetupProcedure x, PS_InStream stream)
4682 {
4683 x->index = GetChoiceIndex(3, 1, stream);
4684 switch (x->index)
4685 {
4686 case 0:
4687 /* (originateCall is NULL) */
4688 break;
4689 case 1:
4690 /* (waitForCall is NULL) */
4691 break;
4692 case 2:
4693 /* (issueQuery is NULL) */
4694 break;
4695 /* ------------------------------- */
4696 /* ---- Extension Begins Here ---- */
4697 /* ------------------------------- */
4698 default:
4699 ErrorMessage("Decode_T120SetupProcedure: Unsupported extension (skipping)");
4700 SkipOneExtension(stream);
4701 }
4702 }
4703
4704 /* <=======================================> */
4705 /* PER-Decoder for NetworkAddress (CHOICE) */
4706 /* <=======================================> */
Decode_NetworkAddress(PS_NetworkAddress x,PS_InStream stream)4707 void Decode_NetworkAddress(PS_NetworkAddress x, PS_InStream stream)
4708 {
4709 x->index = GetChoiceIndex(3, 1, stream);
4710 switch (x->index)
4711 {
4712 case 0:
4713 x->q2931Address = (PS_Q2931Address) OSCL_DEFAULT_MALLOC(sizeof(S_Q2931Address));
4714 Decode_Q2931Address(x->q2931Address, stream);
4715 break;
4716 case 1:
4717 x->e164Address = (PS_int8STRING) OSCL_DEFAULT_MALLOC(sizeof(S_int8STRING));
4718 GetCharString("IA5String(SIZE(1..128))", 0, 1, 128, "0123456789#*,", x->e164Address, stream);
4719 break;
4720 case 2:
4721 x->localAreaAddress = (PS_TransportAddress) OSCL_DEFAULT_MALLOC(sizeof(S_TransportAddress));
4722 Decode_TransportAddress(x->localAreaAddress, stream);
4723 break;
4724 /* ------------------------------- */
4725 /* ---- Extension Begins Here ---- */
4726 /* ------------------------------- */
4727 default:
4728 ErrorMessage("Decode_NetworkAddress: Unsupported extension (skipping)");
4729 SkipOneExtension(stream);
4730 }
4731 }
4732
4733 /* <=====================================> */
4734 /* PER-Decoder for Distribution (CHOICE) */
4735 /* <=====================================> */
Decode_Distribution(PS_Distribution x,PS_InStream stream)4736 void Decode_Distribution(PS_Distribution x, PS_InStream stream)
4737 {
4738 x->index = GetChoiceIndex(2, 1, stream);
4739 switch (x->index)
4740 {
4741 case 0:
4742 /* (unicast is NULL) */
4743 break;
4744 case 1:
4745 /* (multicast is NULL) */
4746 break;
4747 /* ------------------------------- */
4748 /* ---- Extension Begins Here ---- */
4749 /* ------------------------------- */
4750 default:
4751 ErrorMessage("Decode_Distribution: Unsupported extension (skipping)");
4752 SkipOneExtension(stream);
4753 }
4754 }
4755
4756 /* <=======================================> */
4757 /* PER-Decoder for Q2931Address (SEQUENCE) */
4758 /* <=======================================> */
Decode_Q2931Address(PS_Q2931Address x,PS_InStream stream)4759 void Decode_Q2931Address(PS_Q2931Address x, PS_InStream stream)
4760 {
4761 uint8 extension;
4762 PS_UnknownSigMap map;
4763
4764 extension = GetBoolean(stream);
4765 x->option_of_subaddress = GetBoolean(stream);
4766 Decode_Address(&x->address, stream);
4767 if (x->option_of_subaddress)
4768 {
4769 GetOctetString(0, 1, 20, &x->subaddress, stream);
4770 }
4771 /* ------------------------------- */
4772 /* ---- Extension Begins Here ---- */
4773 /* ------------------------------- */
4774 if (extension)
4775 {
4776 map = GetUnknownSigMap(stream);
4777 if (SkipUnreadExtensions(map, stream))
4778 {
4779 ErrorMessage("Decode_Q2931Address: Unknown extensions (skipped)");
4780 }
4781 }
4782 }
4783
4784 /* <================================> */
4785 /* PER-Decoder for Address (CHOICE) */
4786 /* <================================> */
Decode_Address(PS_Address x,PS_InStream stream)4787 void Decode_Address(PS_Address x, PS_InStream stream)
4788 {
4789 x->index = GetChoiceIndex(2, 1, stream);
4790 switch (x->index)
4791 {
4792 case 0:
4793 x->internationalNumber = (PS_int8STRING) OSCL_DEFAULT_MALLOC(sizeof(S_int8STRING));
4794 GetCharString("NumericString(SIZE(1..16))", 0, 1, 16, NULL, x->internationalNumber, stream);
4795 break;
4796 case 1:
4797 x->nsapAddress = (PS_OCTETSTRING) OSCL_DEFAULT_MALLOC(sizeof(S_OCTETSTRING));
4798 GetOctetString(0, 1, 20, x->nsapAddress, stream);
4799 break;
4800 /* ------------------------------- */
4801 /* ---- Extension Begins Here ---- */
4802 /* ------------------------------- */
4803 default:
4804 ErrorMessage("Decode_Address: Unsupported extension (skipping)");
4805 SkipOneExtension(stream);
4806 }
4807 }
4808
4809 /* <========================================> */
4810 /* PER-Decoder for V75Parameters (SEQUENCE) */
4811 /* <========================================> */
Decode_V75Parameters(PS_V75Parameters x,PS_InStream stream)4812 void Decode_V75Parameters(PS_V75Parameters x, PS_InStream stream)
4813 {
4814 uint8 extension;
4815 PS_UnknownSigMap map;
4816
4817 extension = GetBoolean(stream);
4818 x->audioHeaderPresent = GetBoolean(stream);
4819 /* ------------------------------- */
4820 /* ---- Extension Begins Here ---- */
4821 /* ------------------------------- */
4822 if (extension)
4823 {
4824 map = GetUnknownSigMap(stream);
4825 if (SkipUnreadExtensions(map, stream))
4826 {
4827 ErrorMessage("Decode_V75Parameters: Unknown extensions (skipped)");
4828 }
4829 }
4830 }
4831
4832 /* <=================================> */
4833 /* PER-Decoder for DataType (CHOICE) */
4834 /* <=================================> */
Decode_DataType(PS_DataType x,PS_InStream stream)4835 void Decode_DataType(PS_DataType x, PS_InStream stream)
4836 {
4837 x->index = GetChoiceIndex(6, 1, stream);
4838 switch (x->index)
4839 {
4840 case 0:
4841 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
4842 Decode_NonStandardParameter(x->nonStandard, stream);
4843 break;
4844 case 1:
4845 /* (nullData is NULL) */
4846 break;
4847 case 2:
4848 x->videoData = (PS_VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_VideoCapability));
4849 Decode_VideoCapability(x->videoData, stream);
4850 break;
4851 case 3:
4852 x->audioData = (PS_AudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_AudioCapability));
4853 Decode_AudioCapability(x->audioData, stream);
4854 break;
4855 case 4:
4856 x->data = (PS_DataApplicationCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataApplicationCapability));
4857 Decode_DataApplicationCapability(x->data, stream);
4858 break;
4859 case 5:
4860 x->encryptionData = (PS_EncryptionMode) OSCL_DEFAULT_MALLOC(sizeof(S_EncryptionMode));
4861 Decode_EncryptionMode(x->encryptionData, stream);
4862 break;
4863 /* ------------------------------- */
4864 /* ---- Extension Begins Here ---- */
4865 /* ------------------------------- */
4866 case 6:
4867 GetLengthDet(stream);
4868 x->h235Control = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
4869 Decode_NonStandardParameter(x->h235Control, stream);
4870 ReadRemainingBits(stream);
4871 break;
4872 case 7:
4873 GetLengthDet(stream);
4874 x->h235Media = (PS_H235Media) OSCL_DEFAULT_MALLOC(sizeof(S_H235Media));
4875 Decode_H235Media(x->h235Media, stream);
4876 ReadRemainingBits(stream);
4877 break;
4878 default:
4879 ErrorMessage("Decode_DataType: Unsupported extension (skipping)");
4880 SkipOneExtension(stream);
4881 }
4882 }
4883
4884 /* <====================================> */
4885 /* PER-Decoder for H235Media (SEQUENCE) */
4886 /* <====================================> */
Decode_H235Media(PS_H235Media x,PS_InStream stream)4887 void Decode_H235Media(PS_H235Media x, PS_InStream stream)
4888 {
4889 uint8 extension;
4890 PS_UnknownSigMap map;
4891
4892 extension = GetBoolean(stream);
4893 Decode_EncryptionAuthenticationAndIntegrity(&x->encryptionAuthenticationAndIntegrity, stream);
4894 Decode_MediaType(&x->mediaType, stream);
4895 /* ------------------------------- */
4896 /* ---- Extension Begins Here ---- */
4897 /* ------------------------------- */
4898 if (extension)
4899 {
4900 map = GetUnknownSigMap(stream);
4901 if (SkipUnreadExtensions(map, stream))
4902 {
4903 ErrorMessage("Decode_H235Media: Unknown extensions (skipped)");
4904 }
4905 }
4906 }
4907
4908 /* <==================================> */
4909 /* PER-Decoder for MediaType (CHOICE) */
4910 /* <==================================> */
Decode_MediaType(PS_MediaType x,PS_InStream stream)4911 void Decode_MediaType(PS_MediaType x, PS_InStream stream)
4912 {
4913 x->index = GetChoiceIndex(4, 1, stream);
4914 switch (x->index)
4915 {
4916 case 0:
4917 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
4918 Decode_NonStandardParameter(x->nonStandard, stream);
4919 break;
4920 case 1:
4921 x->videoData = (PS_VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_VideoCapability));
4922 Decode_VideoCapability(x->videoData, stream);
4923 break;
4924 case 2:
4925 x->audioData = (PS_AudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_AudioCapability));
4926 Decode_AudioCapability(x->audioData, stream);
4927 break;
4928 case 3:
4929 x->data = (PS_DataApplicationCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataApplicationCapability));
4930 Decode_DataApplicationCapability(x->data, stream);
4931 break;
4932 /* ------------------------------- */
4933 /* ---- Extension Begins Here ---- */
4934 /* ------------------------------- */
4935 default:
4936 ErrorMessage("Decode_MediaType: Unsupported extension (skipping)");
4937 SkipOneExtension(stream);
4938 }
4939 }
4940
4941 /* <=======================================================> */
4942 /* PER-Decoder for H222LogicalChannelParameters (SEQUENCE) */
4943 /* <=======================================================> */
Decode_H222LogicalChannelParameters(PS_H222LogicalChannelParameters x,PS_InStream stream)4944 void Decode_H222LogicalChannelParameters(PS_H222LogicalChannelParameters x, PS_InStream stream)
4945 {
4946 uint8 extension;
4947 PS_UnknownSigMap map;
4948
4949 extension = GetBoolean(stream);
4950 x->option_of_pcr_pid = GetBoolean(stream);
4951 x->option_of_programDescriptors = GetBoolean(stream);
4952 x->option_of_streamDescriptors = GetBoolean(stream);
4953 x->resourceID = (uint16) GetInteger(0, 65535, stream);
4954 x->subChannelID = (uint16) GetInteger(0, 8191, stream);
4955 if (x->option_of_pcr_pid)
4956 {
4957 x->pcr_pid = (uint16) GetInteger(0, 8191, stream);
4958 }
4959 if (x->option_of_programDescriptors)
4960 {
4961 GetOctetString(1, 0, 0, &x->programDescriptors, stream);
4962 }
4963 if (x->option_of_streamDescriptors)
4964 {
4965 GetOctetString(1, 0, 0, &x->streamDescriptors, stream);
4966 }
4967 /* ------------------------------- */
4968 /* ---- Extension Begins Here ---- */
4969 /* ------------------------------- */
4970 if (extension)
4971 {
4972 map = GetUnknownSigMap(stream);
4973 if (SkipUnreadExtensions(map, stream))
4974 {
4975 ErrorMessage("Decode_H222LogicalChannelParameters: Unknown extensions (skipped)");
4976 }
4977 }
4978 }
4979
4980 /* <=======================================================> */
4981 /* PER-Decoder for H223LogicalChannelParameters (SEQUENCE) */
4982 /* <=======================================================> */
Decode_H223LogicalChannelParameters(PS_H223LogicalChannelParameters x,PS_InStream stream)4983 void Decode_H223LogicalChannelParameters(PS_H223LogicalChannelParameters x, PS_InStream stream)
4984 {
4985 uint8 extension;
4986 PS_UnknownSigMap map;
4987
4988 extension = GetBoolean(stream);
4989 Decode_AdaptationLayerType(&x->adaptationLayerType, stream);
4990 x->segmentableFlag = GetBoolean(stream);
4991 /* ------------------------------- */
4992 /* ---- Extension Begins Here ---- */
4993 /* ------------------------------- */
4994 if (extension)
4995 {
4996 map = GetUnknownSigMap(stream);
4997 if (SkipUnreadExtensions(map, stream))
4998 {
4999 ErrorMessage("Decode_H223LogicalChannelParameters: Unknown extensions (skipped)");
5000 }
5001 }
5002 }
5003
5004 /* <============================================> */
5005 /* PER-Decoder for AdaptationLayerType (CHOICE) */
5006 /* <============================================> */
Decode_AdaptationLayerType(PS_AdaptationLayerType x,PS_InStream stream)5007 void Decode_AdaptationLayerType(PS_AdaptationLayerType x, PS_InStream stream)
5008 {
5009 x->index = GetChoiceIndex(6, 1, stream);
5010 switch (x->index)
5011 {
5012 case 0:
5013 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
5014 Decode_NonStandardParameter(x->nonStandard, stream);
5015 break;
5016 case 1:
5017 /* (al1Framed is NULL) */
5018 break;
5019 case 2:
5020 /* (al1NotFramed is NULL) */
5021 break;
5022 case 3:
5023 /* (al2WithoutSequenceNumbers is NULL) */
5024 break;
5025 case 4:
5026 /* (al2WithSequenceNumbers is NULL) */
5027 break;
5028 case 5:
5029 x->al3 = (PS_Al3) OSCL_DEFAULT_MALLOC(sizeof(S_Al3));
5030 Decode_Al3(x->al3, stream);
5031 break;
5032 /* ------------------------------- */
5033 /* ---- Extension Begins Here ---- */
5034 /* ------------------------------- */
5035 case 6:
5036 GetLengthDet(stream);
5037 x->al1M = (PS_H223AL1MParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AL1MParameters));
5038 Decode_H223AL1MParameters(x->al1M, stream);
5039 ReadRemainingBits(stream);
5040 break;
5041 case 7:
5042 GetLengthDet(stream);
5043 x->al2M = (PS_H223AL2MParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AL2MParameters));
5044 Decode_H223AL2MParameters(x->al2M, stream);
5045 ReadRemainingBits(stream);
5046 break;
5047 case 8:
5048 GetLengthDet(stream);
5049 x->al3M = (PS_H223AL3MParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AL3MParameters));
5050 Decode_H223AL3MParameters(x->al3M, stream);
5051 ReadRemainingBits(stream);
5052 break;
5053 default:
5054 ErrorMessage("Decode_AdaptationLayerType: Unsupported extension (skipping)");
5055 SkipOneExtension(stream);
5056 }
5057 }
5058
5059 /* <==============================> */
5060 /* PER-Decoder for Al3 (SEQUENCE) */
5061 /* <==============================> */
Decode_Al3(PS_Al3 x,PS_InStream stream)5062 void Decode_Al3(PS_Al3 x, PS_InStream stream)
5063 {
5064 x->controlFieldOctets = (uint8) GetInteger(0, 2, stream);
5065 x->sendBufferSize = GetInteger(0, 16777215, stream);
5066 }
5067
5068 /* <=============================================> */
5069 /* PER-Decoder for H223AL1MParameters (SEQUENCE) */
5070 /* <=============================================> */
Decode_H223AL1MParameters(PS_H223AL1MParameters x,PS_InStream stream)5071 void Decode_H223AL1MParameters(PS_H223AL1MParameters x, PS_InStream stream)
5072 {
5073 uint8 extension;
5074 PS_UnknownSigMap map;
5075
5076 extension = GetBoolean(stream);
5077 Decode_TransferMode(&x->transferMode, stream);
5078 Decode_HeaderFEC(&x->headerFEC, stream);
5079 Decode_CrcLength(&x->crcLength, stream);
5080 x->rcpcCodeRate = (uint8) GetInteger(8, 32, stream);
5081 Decode_ArqType(&x->arqType, stream);
5082 x->alpduInterleaving = GetBoolean(stream);
5083 x->alsduSplitting = GetBoolean(stream);
5084 /* ------------------------------- */
5085 /* ---- Extension Begins Here ---- */
5086 /* ------------------------------- */
5087 x->option_of_rsCodeCorrection = OFF;
5088 if (extension)
5089 {
5090 map = GetUnknownSigMap(stream);
5091 x->option_of_rsCodeCorrection = SigMapValue(0, map);
5092 if (x->option_of_rsCodeCorrection)
5093 {
5094 ExtensionPrep(map, stream);
5095 x->rsCodeCorrection = (uint8) GetInteger(0, 127, stream);
5096 ReadRemainingBits(stream);
5097 }
5098 if (SkipUnreadExtensions(map, stream))
5099 {
5100 ErrorMessage("Decode_H223AL1MParameters: Unknown extensions (skipped)");
5101 }
5102 }
5103 }
5104
5105 /* <================================> */
5106 /* PER-Decoder for ArqType (CHOICE) */
5107 /* <================================> */
Decode_ArqType(PS_ArqType x,PS_InStream stream)5108 void Decode_ArqType(PS_ArqType x, PS_InStream stream)
5109 {
5110 x->index = GetChoiceIndex(3, 1, stream);
5111 switch (x->index)
5112 {
5113 case 0:
5114 /* (noArq is NULL) */
5115 break;
5116 case 1:
5117 x->typeIArq = (PS_H223AnnexCArqParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AnnexCArqParameters));
5118 Decode_H223AnnexCArqParameters(x->typeIArq, stream);
5119 break;
5120 case 2:
5121 x->typeIIArq = (PS_H223AnnexCArqParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AnnexCArqParameters));
5122 Decode_H223AnnexCArqParameters(x->typeIIArq, stream);
5123 break;
5124 /* ------------------------------- */
5125 /* ---- Extension Begins Here ---- */
5126 /* ------------------------------- */
5127 default:
5128 ErrorMessage("Decode_ArqType: Unsupported extension (skipping)");
5129 SkipOneExtension(stream);
5130 }
5131 }
5132
5133 /* <==================================> */
5134 /* PER-Decoder for CrcLength (CHOICE) */
5135 /* <==================================> */
Decode_CrcLength(PS_CrcLength x,PS_InStream stream)5136 void Decode_CrcLength(PS_CrcLength x, PS_InStream stream)
5137 {
5138 x->index = GetChoiceIndex(4, 1, stream);
5139 switch (x->index)
5140 {
5141 case 0:
5142 /* (crc4bit is NULL) */
5143 break;
5144 case 1:
5145 /* (crc12bit is NULL) */
5146 break;
5147 case 2:
5148 /* (crc20bit is NULL) */
5149 break;
5150 case 3:
5151 /* (crc28bit is NULL) */
5152 break;
5153 /* ------------------------------- */
5154 /* ---- Extension Begins Here ---- */
5155 /* ------------------------------- */
5156 case 4:
5157 GetLengthDet(stream);
5158 /* (crc8bit is NULL) */
5159 SkipOneOctet(stream);
5160 break;
5161 case 5:
5162 GetLengthDet(stream);
5163 /* (crc16bit is NULL) */
5164 SkipOneOctet(stream);
5165 break;
5166 case 6:
5167 GetLengthDet(stream);
5168 /* (crc32bit is NULL) */
5169 SkipOneOctet(stream);
5170 break;
5171 case 7:
5172 GetLengthDet(stream);
5173 /* (crcNotUsed is NULL) */
5174 SkipOneOctet(stream);
5175 break;
5176 default:
5177 ErrorMessage("Decode_CrcLength: Unsupported extension (skipping)");
5178 SkipOneExtension(stream);
5179 }
5180 }
5181
5182 /* <==================================> */
5183 /* PER-Decoder for HeaderFEC (CHOICE) */
5184 /* <==================================> */
Decode_HeaderFEC(PS_HeaderFEC x,PS_InStream stream)5185 void Decode_HeaderFEC(PS_HeaderFEC x, PS_InStream stream)
5186 {
5187 x->index = GetChoiceIndex(2, 1, stream);
5188 switch (x->index)
5189 {
5190 case 0:
5191 /* (sebch16_7 is NULL) */
5192 break;
5193 case 1:
5194 /* (golay24_12 is NULL) */
5195 break;
5196 /* ------------------------------- */
5197 /* ---- Extension Begins Here ---- */
5198 /* ------------------------------- */
5199 default:
5200 ErrorMessage("Decode_HeaderFEC: Unsupported extension (skipping)");
5201 SkipOneExtension(stream);
5202 }
5203 }
5204
5205 /* <=====================================> */
5206 /* PER-Decoder for TransferMode (CHOICE) */
5207 /* <=====================================> */
Decode_TransferMode(PS_TransferMode x,PS_InStream stream)5208 void Decode_TransferMode(PS_TransferMode x, PS_InStream stream)
5209 {
5210 x->index = GetChoiceIndex(2, 1, stream);
5211 switch (x->index)
5212 {
5213 case 0:
5214 /* (framed is NULL) */
5215 break;
5216 case 1:
5217 /* (unframed is NULL) */
5218 break;
5219 /* ------------------------------- */
5220 /* ---- Extension Begins Here ---- */
5221 /* ------------------------------- */
5222 default:
5223 ErrorMessage("Decode_TransferMode: Unsupported extension (skipping)");
5224 SkipOneExtension(stream);
5225 }
5226 }
5227
5228 /* <=============================================> */
5229 /* PER-Decoder for H223AL2MParameters (SEQUENCE) */
5230 /* <=============================================> */
Decode_H223AL2MParameters(PS_H223AL2MParameters x,PS_InStream stream)5231 void Decode_H223AL2MParameters(PS_H223AL2MParameters x, PS_InStream stream)
5232 {
5233 uint8 extension;
5234 PS_UnknownSigMap map;
5235
5236 extension = GetBoolean(stream);
5237 Decode_Al2HeaderFEC(&x->al2HeaderFEC, stream);
5238 x->alpduInterleaving = GetBoolean(stream);
5239 /* ------------------------------- */
5240 /* ---- Extension Begins Here ---- */
5241 /* ------------------------------- */
5242 if (extension)
5243 {
5244 map = GetUnknownSigMap(stream);
5245 if (SkipUnreadExtensions(map, stream))
5246 {
5247 ErrorMessage("Decode_H223AL2MParameters: Unknown extensions (skipped)");
5248 }
5249 }
5250 }
5251
5252 /* <=====================================> */
5253 /* PER-Decoder for Al2HeaderFEC (CHOICE) */
5254 /* <=====================================> */
Decode_Al2HeaderFEC(PS_Al2HeaderFEC x,PS_InStream stream)5255 void Decode_Al2HeaderFEC(PS_Al2HeaderFEC x, PS_InStream stream)
5256 {
5257 x->index = GetChoiceIndex(2, 1, stream);
5258 switch (x->index)
5259 {
5260 case 0:
5261 /* (sebch16_5 is NULL) */
5262 break;
5263 case 1:
5264 /* (golay24_12 is NULL) */
5265 break;
5266 /* ------------------------------- */
5267 /* ---- Extension Begins Here ---- */
5268 /* ------------------------------- */
5269 default:
5270 ErrorMessage("Decode_Al2HeaderFEC: Unsupported extension (skipping)");
5271 SkipOneExtension(stream);
5272 }
5273 }
5274
5275 /* <=============================================> */
5276 /* PER-Decoder for H223AL3MParameters (SEQUENCE) */
5277 /* <=============================================> */
Decode_H223AL3MParameters(PS_H223AL3MParameters x,PS_InStream stream)5278 void Decode_H223AL3MParameters(PS_H223AL3MParameters x, PS_InStream stream)
5279 {
5280 uint8 extension;
5281 PS_UnknownSigMap map;
5282
5283 extension = GetBoolean(stream);
5284 Decode_HeaderFormat(&x->headerFormat, stream);
5285 Decode_Al3CrcLength(&x->al3CrcLength, stream);
5286 x->rcpcCodeRate = (uint8) GetInteger(8, 32, stream);
5287 Decode_Al3ArqType(&x->al3ArqType, stream);
5288 x->alpduInterleaving = GetBoolean(stream);
5289 /* ------------------------------- */
5290 /* ---- Extension Begins Here ---- */
5291 /* ------------------------------- */
5292 x->option_of_rsCodeCorrection = OFF;
5293 if (extension)
5294 {
5295 map = GetUnknownSigMap(stream);
5296 x->option_of_rsCodeCorrection = SigMapValue(0, map);
5297 if (x->option_of_rsCodeCorrection)
5298 {
5299 ExtensionPrep(map, stream);
5300 x->rsCodeCorrection = (uint8) GetInteger(0, 127, stream);
5301 ReadRemainingBits(stream);
5302 }
5303 if (SkipUnreadExtensions(map, stream))
5304 {
5305 ErrorMessage("Decode_H223AL3MParameters: Unknown extensions (skipped)");
5306 }
5307 }
5308 }
5309
5310 /* <===================================> */
5311 /* PER-Decoder for Al3ArqType (CHOICE) */
5312 /* <===================================> */
Decode_Al3ArqType(PS_Al3ArqType x,PS_InStream stream)5313 void Decode_Al3ArqType(PS_Al3ArqType x, PS_InStream stream)
5314 {
5315 x->index = GetChoiceIndex(3, 1, stream);
5316 switch (x->index)
5317 {
5318 case 0:
5319 /* (noArq is NULL) */
5320 break;
5321 case 1:
5322 x->typeIArq = (PS_H223AnnexCArqParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AnnexCArqParameters));
5323 Decode_H223AnnexCArqParameters(x->typeIArq, stream);
5324 break;
5325 case 2:
5326 x->typeIIArq = (PS_H223AnnexCArqParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AnnexCArqParameters));
5327 Decode_H223AnnexCArqParameters(x->typeIIArq, stream);
5328 break;
5329 /* ------------------------------- */
5330 /* ---- Extension Begins Here ---- */
5331 /* ------------------------------- */
5332 default:
5333 ErrorMessage("Decode_Al3ArqType: Unsupported extension (skipping)");
5334 SkipOneExtension(stream);
5335 }
5336 }
5337
5338 /* <=====================================> */
5339 /* PER-Decoder for Al3CrcLength (CHOICE) */
5340 /* <=====================================> */
Decode_Al3CrcLength(PS_Al3CrcLength x,PS_InStream stream)5341 void Decode_Al3CrcLength(PS_Al3CrcLength x, PS_InStream stream)
5342 {
5343 x->index = GetChoiceIndex(4, 1, stream);
5344 switch (x->index)
5345 {
5346 case 0:
5347 /* (crc4bit is NULL) */
5348 break;
5349 case 1:
5350 /* (crc12bit is NULL) */
5351 break;
5352 case 2:
5353 /* (crc20bit is NULL) */
5354 break;
5355 case 3:
5356 /* (crc28bit is NULL) */
5357 break;
5358 /* ------------------------------- */
5359 /* ---- Extension Begins Here ---- */
5360 /* ------------------------------- */
5361 case 4:
5362 GetLengthDet(stream);
5363 /* (crc8bit is NULL) */
5364 SkipOneOctet(stream);
5365 break;
5366 case 5:
5367 GetLengthDet(stream);
5368 /* (crc16bit is NULL) */
5369 SkipOneOctet(stream);
5370 break;
5371 case 6:
5372 GetLengthDet(stream);
5373 /* (crc32bit is NULL) */
5374 SkipOneOctet(stream);
5375 break;
5376 case 7:
5377 GetLengthDet(stream);
5378 /* (crcNotUsed is NULL) */
5379 SkipOneOctet(stream);
5380 break;
5381 default:
5382 ErrorMessage("Decode_Al3CrcLength: Unsupported extension (skipping)");
5383 SkipOneExtension(stream);
5384 }
5385 }
5386
5387 /* <=====================================> */
5388 /* PER-Decoder for HeaderFormat (CHOICE) */
5389 /* <=====================================> */
Decode_HeaderFormat(PS_HeaderFormat x,PS_InStream stream)5390 void Decode_HeaderFormat(PS_HeaderFormat x, PS_InStream stream)
5391 {
5392 x->index = GetChoiceIndex(2, 1, stream);
5393 switch (x->index)
5394 {
5395 case 0:
5396 /* (sebch16_7 is NULL) */
5397 break;
5398 case 1:
5399 /* (golay24_12 is NULL) */
5400 break;
5401 /* ------------------------------- */
5402 /* ---- Extension Begins Here ---- */
5403 /* ------------------------------- */
5404 default:
5405 ErrorMessage("Decode_HeaderFormat: Unsupported extension (skipping)");
5406 SkipOneExtension(stream);
5407 }
5408 }
5409
5410 /* <==================================================> */
5411 /* PER-Decoder for H223AnnexCArqParameters (SEQUENCE) */
5412 /* <==================================================> */
Decode_H223AnnexCArqParameters(PS_H223AnnexCArqParameters x,PS_InStream stream)5413 void Decode_H223AnnexCArqParameters(PS_H223AnnexCArqParameters x, PS_InStream stream)
5414 {
5415 uint8 extension;
5416 PS_UnknownSigMap map;
5417
5418 extension = GetBoolean(stream);
5419 Decode_NumberOfRetransmissions(&x->numberOfRetransmissions, stream);
5420 x->sendBufferSize = GetInteger(0, 16777215, stream);
5421 /* ------------------------------- */
5422 /* ---- Extension Begins Here ---- */
5423 /* ------------------------------- */
5424 if (extension)
5425 {
5426 map = GetUnknownSigMap(stream);
5427 if (SkipUnreadExtensions(map, stream))
5428 {
5429 ErrorMessage("Decode_H223AnnexCArqParameters: Unknown extensions (skipped)");
5430 }
5431 }
5432 }
5433
5434 /* <================================================> */
5435 /* PER-Decoder for NumberOfRetransmissions (CHOICE) */
5436 /* <================================================> */
Decode_NumberOfRetransmissions(PS_NumberOfRetransmissions x,PS_InStream stream)5437 void Decode_NumberOfRetransmissions(PS_NumberOfRetransmissions x, PS_InStream stream)
5438 {
5439 x->index = GetChoiceIndex(2, 1, stream);
5440 switch (x->index)
5441 {
5442 case 0:
5443 x->finite = (uint8) GetInteger(0, 16, stream);
5444 break;
5445 case 1:
5446 /* (infinite is NULL) */
5447 break;
5448 /* ------------------------------- */
5449 /* ---- Extension Begins Here ---- */
5450 /* ------------------------------- */
5451 default:
5452 ErrorMessage("Decode_NumberOfRetransmissions: Unsupported extension (skipping)");
5453 SkipOneExtension(stream);
5454 }
5455 }
5456
5457 /* <======================================================> */
5458 /* PER-Decoder for V76LogicalChannelParameters (SEQUENCE) */
5459 /* <======================================================> */
Decode_V76LogicalChannelParameters(PS_V76LogicalChannelParameters x,PS_InStream stream)5460 void Decode_V76LogicalChannelParameters(PS_V76LogicalChannelParameters x, PS_InStream stream)
5461 {
5462 uint8 extension;
5463 PS_UnknownSigMap map;
5464
5465 extension = GetBoolean(stream);
5466 Decode_V76HDLCParameters(&x->hdlcParameters, stream);
5467 Decode_SuspendResume(&x->suspendResume, stream);
5468 x->uIH = GetBoolean(stream);
5469 Decode_Mode(&x->mode, stream);
5470 Decode_V75Parameters(&x->v75Parameters, stream);
5471 /* ------------------------------- */
5472 /* ---- Extension Begins Here ---- */
5473 /* ------------------------------- */
5474 if (extension)
5475 {
5476 map = GetUnknownSigMap(stream);
5477 if (SkipUnreadExtensions(map, stream))
5478 {
5479 ErrorMessage("Decode_V76LogicalChannelParameters: Unknown extensions (skipped)");
5480 }
5481 }
5482 }
5483
5484 /* <=============================> */
5485 /* PER-Decoder for Mode (CHOICE) */
5486 /* <=============================> */
Decode_Mode(PS_Mode x,PS_InStream stream)5487 void Decode_Mode(PS_Mode x, PS_InStream stream)
5488 {
5489 x->index = GetChoiceIndex(2, 1, stream);
5490 switch (x->index)
5491 {
5492 case 0:
5493 x->eRM = (PS_ERM) OSCL_DEFAULT_MALLOC(sizeof(S_ERM));
5494 Decode_ERM(x->eRM, stream);
5495 break;
5496 case 1:
5497 /* (uNERM is NULL) */
5498 break;
5499 /* ------------------------------- */
5500 /* ---- Extension Begins Here ---- */
5501 /* ------------------------------- */
5502 default:
5503 ErrorMessage("Decode_Mode: Unsupported extension (skipping)");
5504 SkipOneExtension(stream);
5505 }
5506 }
5507
5508 /* <==============================> */
5509 /* PER-Decoder for ERM (SEQUENCE) */
5510 /* <==============================> */
Decode_ERM(PS_ERM x,PS_InStream stream)5511 void Decode_ERM(PS_ERM x, PS_InStream stream)
5512 {
5513 uint8 extension;
5514 PS_UnknownSigMap map;
5515
5516 extension = GetBoolean(stream);
5517 x->windowSize = (uint8) GetInteger(1, 127, stream);
5518 Decode_Recovery(&x->recovery, stream);
5519 /* ------------------------------- */
5520 /* ---- Extension Begins Here ---- */
5521 /* ------------------------------- */
5522 if (extension)
5523 {
5524 map = GetUnknownSigMap(stream);
5525 if (SkipUnreadExtensions(map, stream))
5526 {
5527 ErrorMessage("Decode_ERM: Unknown extensions (skipped)");
5528 }
5529 }
5530 }
5531
5532 /* <=================================> */
5533 /* PER-Decoder for Recovery (CHOICE) */
5534 /* <=================================> */
Decode_Recovery(PS_Recovery x,PS_InStream stream)5535 void Decode_Recovery(PS_Recovery x, PS_InStream stream)
5536 {
5537 x->index = GetChoiceIndex(3, 1, stream);
5538 switch (x->index)
5539 {
5540 case 0:
5541 /* (rej is NULL) */
5542 break;
5543 case 1:
5544 /* (sREJ is NULL) */
5545 break;
5546 case 2:
5547 /* (mSREJ is NULL) */
5548 break;
5549 /* ------------------------------- */
5550 /* ---- Extension Begins Here ---- */
5551 /* ------------------------------- */
5552 default:
5553 ErrorMessage("Decode_Recovery: Unsupported extension (skipping)");
5554 SkipOneExtension(stream);
5555 }
5556 }
5557
5558 /* <======================================> */
5559 /* PER-Decoder for SuspendResume (CHOICE) */
5560 /* <======================================> */
Decode_SuspendResume(PS_SuspendResume x,PS_InStream stream)5561 void Decode_SuspendResume(PS_SuspendResume x, PS_InStream stream)
5562 {
5563 x->index = GetChoiceIndex(3, 1, stream);
5564 switch (x->index)
5565 {
5566 case 0:
5567 /* (noSuspendResume is NULL) */
5568 break;
5569 case 1:
5570 /* (suspendResumewAddress is NULL) */
5571 break;
5572 case 2:
5573 /* (suspendResumewoAddress is NULL) */
5574 break;
5575 /* ------------------------------- */
5576 /* ---- Extension Begins Here ---- */
5577 /* ------------------------------- */
5578 default:
5579 ErrorMessage("Decode_SuspendResume: Unsupported extension (skipping)");
5580 SkipOneExtension(stream);
5581 }
5582 }
5583
5584 /* <============================================> */
5585 /* PER-Decoder for V76HDLCParameters (SEQUENCE) */
5586 /* <============================================> */
Decode_V76HDLCParameters(PS_V76HDLCParameters x,PS_InStream stream)5587 void Decode_V76HDLCParameters(PS_V76HDLCParameters x, PS_InStream stream)
5588 {
5589 uint8 extension;
5590 PS_UnknownSigMap map;
5591
5592 extension = GetBoolean(stream);
5593 Decode_CRCLength(&x->crcLength, stream);
5594 x->n401 = (uint16) GetInteger(1, 4095, stream);
5595 x->loopbackTestProcedure = GetBoolean(stream);
5596 /* ------------------------------- */
5597 /* ---- Extension Begins Here ---- */
5598 /* ------------------------------- */
5599 if (extension)
5600 {
5601 map = GetUnknownSigMap(stream);
5602 if (SkipUnreadExtensions(map, stream))
5603 {
5604 ErrorMessage("Decode_V76HDLCParameters: Unknown extensions (skipped)");
5605 }
5606 }
5607 }
5608
5609 /* <==================================> */
5610 /* PER-Decoder for CRCLength (CHOICE) */
5611 /* <==================================> */
Decode_CRCLength(PS_CRCLength x,PS_InStream stream)5612 void Decode_CRCLength(PS_CRCLength x, PS_InStream stream)
5613 {
5614 x->index = GetChoiceIndex(3, 1, stream);
5615 switch (x->index)
5616 {
5617 case 0:
5618 /* (crc8bit is NULL) */
5619 break;
5620 case 1:
5621 /* (crc16bit is NULL) */
5622 break;
5623 case 2:
5624 /* (crc32bit is NULL) */
5625 break;
5626 /* ------------------------------- */
5627 /* ---- Extension Begins Here ---- */
5628 /* ------------------------------- */
5629 default:
5630 ErrorMessage("Decode_CRCLength: Unsupported extension (skipping)");
5631 SkipOneExtension(stream);
5632 }
5633 }
5634
5635 /* <========================================================> */
5636 /* PER-Decoder for H2250LogicalChannelParameters (SEQUENCE) */
5637 /* <========================================================> */
Decode_H2250LogicalChannelParameters(PS_H2250LogicalChannelParameters x,PS_InStream stream)5638 void Decode_H2250LogicalChannelParameters(PS_H2250LogicalChannelParameters x, PS_InStream stream)
5639 {
5640 uint16 i;
5641 uint8 extension;
5642 PS_UnknownSigMap map;
5643
5644 extension = GetBoolean(stream);
5645 x->option_of_nonStandard = GetBoolean(stream);
5646 x->option_of_associatedSessionID = GetBoolean(stream);
5647 x->option_of_mediaChannel = GetBoolean(stream);
5648 x->option_of_mediaGuaranteedDelivery = GetBoolean(stream);
5649 x->option_of_mediaControlChannel = GetBoolean(stream);
5650 x->option_of_mediaControlGuaranteedDelivery = GetBoolean(stream);
5651 x->option_of_silenceSuppression = GetBoolean(stream);
5652 x->option_of_destination = GetBoolean(stream);
5653 x->option_of_dynamicRTPPayloadType = GetBoolean(stream);
5654 x->option_of_mediaPacketization = GetBoolean(stream);
5655 if (x->option_of_nonStandard)
5656 {
5657 x->size_of_nonStandard = (uint16) GetLengthDet(stream);
5658 x->nonStandard = (PS_NonStandardParameter)
5659 OSCL_DEFAULT_MALLOC(x->size_of_nonStandard * sizeof(S_NonStandardParameter));
5660 for (i = 0; i < x->size_of_nonStandard; ++i)
5661 {
5662 Decode_NonStandardParameter(x->nonStandard + i, stream);
5663 }
5664 }
5665 x->sessionID = (uint8) GetInteger(0, 255, stream);
5666 if (x->option_of_associatedSessionID)
5667 {
5668 x->associatedSessionID = (uint8) GetInteger(1, 255, stream);
5669 }
5670 if (x->option_of_mediaChannel)
5671 {
5672 Decode_TransportAddress(&x->mediaChannel, stream);
5673 }
5674 if (x->option_of_mediaGuaranteedDelivery)
5675 {
5676 x->mediaGuaranteedDelivery = GetBoolean(stream);
5677 }
5678 if (x->option_of_mediaControlChannel)
5679 {
5680 Decode_TransportAddress(&x->mediaControlChannel, stream);
5681 }
5682 if (x->option_of_mediaControlGuaranteedDelivery)
5683 {
5684 x->mediaControlGuaranteedDelivery = GetBoolean(stream);
5685 }
5686 if (x->option_of_silenceSuppression)
5687 {
5688 x->silenceSuppression = GetBoolean(stream);
5689 }
5690 if (x->option_of_destination)
5691 {
5692 Decode_TerminalLabel(&x->destination, stream);
5693 }
5694 if (x->option_of_dynamicRTPPayloadType)
5695 {
5696 x->dynamicRTPPayloadType = (uint8) GetInteger(96, 127, stream);
5697 }
5698 if (x->option_of_mediaPacketization)
5699 {
5700 Decode_MediaPacketization(&x->mediaPacketization, stream);
5701 }
5702 /* ------------------------------- */
5703 /* ---- Extension Begins Here ---- */
5704 /* ------------------------------- */
5705 x->option_of_transportCapability = OFF;
5706 x->option_of_redundancyEncoding = OFF;
5707 x->option_of_source = OFF;
5708 x->option_of_symmetricMediaAddress = OFF;
5709 if (extension)
5710 {
5711 map = GetUnknownSigMap(stream);
5712 x->option_of_transportCapability = SigMapValue(0, map);
5713 if (x->option_of_transportCapability)
5714 {
5715 ExtensionPrep(map, stream);
5716 Decode_TransportCapability(&x->transportCapability, stream);
5717 ReadRemainingBits(stream);
5718 }
5719 x->option_of_redundancyEncoding = SigMapValue(1, map);
5720 if (x->option_of_redundancyEncoding)
5721 {
5722 ExtensionPrep(map, stream);
5723 Decode_RedundancyEncoding(&x->redundancyEncoding, stream);
5724 ReadRemainingBits(stream);
5725 }
5726 x->option_of_source = SigMapValue(2, map);
5727 if (x->option_of_source)
5728 {
5729 ExtensionPrep(map, stream);
5730 Decode_TerminalLabel(&x->source, stream);
5731 ReadRemainingBits(stream);
5732 }
5733 x->option_of_symmetricMediaAddress = SigMapValue(3, map);
5734 if (x->option_of_symmetricMediaAddress)
5735 {
5736 ExtensionPrep(map, stream);
5737 x->symmetricMediaAddress = GetBoolean(stream);
5738 ReadRemainingBits(stream);
5739 }
5740 if (SkipUnreadExtensions(map, stream))
5741 {
5742 ErrorMessage("Decode_H2250LogicalChannelParameters: Unknown extensions (skipped)");
5743 }
5744 }
5745 }
5746
5747 /* <===========================================> */
5748 /* PER-Decoder for MediaPacketization (CHOICE) */
5749 /* <===========================================> */
Decode_MediaPacketization(PS_MediaPacketization x,PS_InStream stream)5750 void Decode_MediaPacketization(PS_MediaPacketization x, PS_InStream stream)
5751 {
5752 x->index = GetChoiceIndex(1, 1, stream);
5753 switch (x->index)
5754 {
5755 case 0:
5756 /* (h261aVideoPacketization is NULL) */
5757 break;
5758 /* ------------------------------- */
5759 /* ---- Extension Begins Here ---- */
5760 /* ------------------------------- */
5761 case 1:
5762 GetLengthDet(stream);
5763 x->rtpPayloadType = (PS_RTPPayloadType) OSCL_DEFAULT_MALLOC(sizeof(S_RTPPayloadType));
5764 Decode_RTPPayloadType(x->rtpPayloadType, stream);
5765 ReadRemainingBits(stream);
5766 break;
5767 default:
5768 ErrorMessage("Decode_MediaPacketization: Unsupported extension (skipping)");
5769 SkipOneExtension(stream);
5770 }
5771 }
5772
5773 /* <=========================================> */
5774 /* PER-Decoder for RTPPayloadType (SEQUENCE) */
5775 /* <=========================================> */
Decode_RTPPayloadType(PS_RTPPayloadType x,PS_InStream stream)5776 void Decode_RTPPayloadType(PS_RTPPayloadType x, PS_InStream stream)
5777 {
5778 uint8 extension;
5779 PS_UnknownSigMap map;
5780
5781 extension = GetBoolean(stream);
5782 x->option_of_payloadType = GetBoolean(stream);
5783 Decode_PayloadDescriptor(&x->payloadDescriptor, stream);
5784 if (x->option_of_payloadType)
5785 {
5786 x->payloadType = (uint8) GetInteger(0, 127, stream);
5787 }
5788 /* ------------------------------- */
5789 /* ---- Extension Begins Here ---- */
5790 /* ------------------------------- */
5791 if (extension)
5792 {
5793 map = GetUnknownSigMap(stream);
5794 if (SkipUnreadExtensions(map, stream))
5795 {
5796 ErrorMessage("Decode_RTPPayloadType: Unknown extensions (skipped)");
5797 }
5798 }
5799 }
5800
5801 /* <==========================================> */
5802 /* PER-Decoder for PayloadDescriptor (CHOICE) */
5803 /* <==========================================> */
Decode_PayloadDescriptor(PS_PayloadDescriptor x,PS_InStream stream)5804 void Decode_PayloadDescriptor(PS_PayloadDescriptor x, PS_InStream stream)
5805 {
5806 x->index = GetChoiceIndex(3, 1, stream);
5807 switch (x->index)
5808 {
5809 case 0:
5810 x->nonStandardIdentifier = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
5811 Decode_NonStandardParameter(x->nonStandardIdentifier, stream);
5812 break;
5813 case 1:
5814 x->rfc_number = (uint16) GetExtendedInteger(1, 32768, stream);
5815 break;
5816 case 2:
5817 x->oid = (PS_OBJECTIDENT) OSCL_DEFAULT_MALLOC(sizeof(S_OBJECTIDENT));
5818 GetObjectID(x->oid, stream);
5819 break;
5820 /* ------------------------------- */
5821 /* ---- Extension Begins Here ---- */
5822 /* ------------------------------- */
5823 default:
5824 ErrorMessage("Decode_PayloadDescriptor: Unsupported extension (skipping)");
5825 SkipOneExtension(stream);
5826 }
5827 }
5828
5829 /* <=============================================> */
5830 /* PER-Decoder for RedundancyEncoding (SEQUENCE) */
5831 /* <=============================================> */
Decode_RedundancyEncoding(PS_RedundancyEncoding x,PS_InStream stream)5832 void Decode_RedundancyEncoding(PS_RedundancyEncoding x, PS_InStream stream)
5833 {
5834 uint8 extension;
5835 PS_UnknownSigMap map;
5836
5837 extension = GetBoolean(stream);
5838 x->option_of_secondaryEncoding = GetBoolean(stream);
5839 Decode_RedundancyEncodingMethod(&x->redundancyEncodingMethod, stream);
5840 if (x->option_of_secondaryEncoding)
5841 {
5842 Decode_DataType(&x->secondaryEncoding, stream);
5843 }
5844 /* ------------------------------- */
5845 /* ---- Extension Begins Here ---- */
5846 /* ------------------------------- */
5847 if (extension)
5848 {
5849 map = GetUnknownSigMap(stream);
5850 if (SkipUnreadExtensions(map, stream))
5851 {
5852 ErrorMessage("Decode_RedundancyEncoding: Unknown extensions (skipped)");
5853 }
5854 }
5855 }
5856
5857 /* <=========================================> */
5858 /* PER-Decoder for TransportAddress (CHOICE) */
5859 /* <=========================================> */
Decode_TransportAddress(PS_TransportAddress x,PS_InStream stream)5860 void Decode_TransportAddress(PS_TransportAddress x, PS_InStream stream)
5861 {
5862 x->index = GetChoiceIndex(2, 1, stream);
5863 switch (x->index)
5864 {
5865 case 0:
5866 x->unicastAddress = (PS_UnicastAddress) OSCL_DEFAULT_MALLOC(sizeof(S_UnicastAddress));
5867 Decode_UnicastAddress(x->unicastAddress, stream);
5868 break;
5869 case 1:
5870 x->multicastAddress = (PS_MulticastAddress) OSCL_DEFAULT_MALLOC(sizeof(S_MulticastAddress));
5871 Decode_MulticastAddress(x->multicastAddress, stream);
5872 break;
5873 /* ------------------------------- */
5874 /* ---- Extension Begins Here ---- */
5875 /* ------------------------------- */
5876 default:
5877 ErrorMessage("Decode_TransportAddress: Unsupported extension (skipping)");
5878 SkipOneExtension(stream);
5879 }
5880 }
5881
5882 /* <=======================================> */
5883 /* PER-Decoder for UnicastAddress (CHOICE) */
5884 /* <=======================================> */
Decode_UnicastAddress(PS_UnicastAddress x,PS_InStream stream)5885 void Decode_UnicastAddress(PS_UnicastAddress x, PS_InStream stream)
5886 {
5887 x->index = GetChoiceIndex(5, 1, stream);
5888 switch (x->index)
5889 {
5890 case 0:
5891 x->iPAddress = (PS_IPAddress) OSCL_DEFAULT_MALLOC(sizeof(S_IPAddress));
5892 Decode_IPAddress(x->iPAddress, stream);
5893 break;
5894 case 1:
5895 x->iPXAddress = (PS_IPXAddress) OSCL_DEFAULT_MALLOC(sizeof(S_IPXAddress));
5896 Decode_IPXAddress(x->iPXAddress, stream);
5897 break;
5898 case 2:
5899 x->iP6Address = (PS_IP6Address) OSCL_DEFAULT_MALLOC(sizeof(S_IP6Address));
5900 Decode_IP6Address(x->iP6Address, stream);
5901 break;
5902 case 3:
5903 x->netBios = (PS_OCTETSTRING) OSCL_DEFAULT_MALLOC(sizeof(S_OCTETSTRING));
5904 GetOctetString(0, 16, 16, x->netBios, stream);
5905 break;
5906 case 4:
5907 x->iPSourceRouteAddress = (PS_IPSourceRouteAddress) OSCL_DEFAULT_MALLOC(sizeof(S_IPSourceRouteAddress));
5908 Decode_IPSourceRouteAddress(x->iPSourceRouteAddress, stream);
5909 break;
5910 /* ------------------------------- */
5911 /* ---- Extension Begins Here ---- */
5912 /* ------------------------------- */
5913 case 5:
5914 GetLengthDet(stream);
5915 x->nsap = (PS_OCTETSTRING) OSCL_DEFAULT_MALLOC(sizeof(S_OCTETSTRING));
5916 GetOctetString(0, 1, 20, x->nsap, stream);
5917 ReadRemainingBits(stream);
5918 break;
5919 case 6:
5920 GetLengthDet(stream);
5921 x->nonStandardAddress = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
5922 Decode_NonStandardParameter(x->nonStandardAddress, stream);
5923 ReadRemainingBits(stream);
5924 break;
5925 default:
5926 ErrorMessage("Decode_UnicastAddress: Unsupported extension (skipping)");
5927 SkipOneExtension(stream);
5928 }
5929 }
5930
5931 /* <===============================================> */
5932 /* PER-Decoder for IPSourceRouteAddress (SEQUENCE) */
5933 /* <===============================================> */
Decode_IPSourceRouteAddress(PS_IPSourceRouteAddress x,PS_InStream stream)5934 void Decode_IPSourceRouteAddress(PS_IPSourceRouteAddress x, PS_InStream stream)
5935 {
5936 uint16 i;
5937 uint8 extension;
5938 PS_UnknownSigMap map;
5939
5940 extension = GetBoolean(stream);
5941 Decode_Routing(&x->routing, stream);
5942 GetOctetString(0, 4, 4, &x->network, stream);
5943 x->tsapIdentifier = (uint16) GetInteger(0, 65535, stream);
5944 x->size_of_route = (uint16) GetLengthDet(stream);
5945 x->route = (PS_OCTETSTRING)
5946 OSCL_DEFAULT_MALLOC(x->size_of_route * sizeof(S_OCTETSTRING));
5947 for (i = 0; i < x->size_of_route; ++i)
5948 {
5949 GetOctetString(0, 4, 4, x->route + i, stream);
5950 }
5951 /* ------------------------------- */
5952 /* ---- Extension Begins Here ---- */
5953 /* ------------------------------- */
5954 if (extension)
5955 {
5956 map = GetUnknownSigMap(stream);
5957 if (SkipUnreadExtensions(map, stream))
5958 {
5959 ErrorMessage("Decode_IPSourceRouteAddress: Unknown extensions (skipped)");
5960 }
5961 }
5962 }
5963
5964 /* <================================> */
5965 /* PER-Decoder for Routing (CHOICE) */
5966 /* <================================> */
Decode_Routing(PS_Routing x,PS_InStream stream)5967 void Decode_Routing(PS_Routing x, PS_InStream stream)
5968 {
5969 x->index = GetChoiceIndex(2, 0, stream);
5970 switch (x->index)
5971 {
5972 case 0:
5973 /* (strict is NULL) */
5974 break;
5975 case 1:
5976 /* (loose is NULL) */
5977 break;
5978 default:
5979 ErrorMessageAndLeave("Decode_Routing: Illegal CHOICE index");
5980 }
5981 }
5982
5983 /* <=====================================> */
5984 /* PER-Decoder for IP6Address (SEQUENCE) */
5985 /* <=====================================> */
Decode_IP6Address(PS_IP6Address x,PS_InStream stream)5986 void Decode_IP6Address(PS_IP6Address x, PS_InStream stream)
5987 {
5988 uint8 extension;
5989 PS_UnknownSigMap map;
5990
5991 extension = GetBoolean(stream);
5992 GetOctetString(0, 16, 16, &x->network, stream);
5993 x->tsapIdentifier = (uint16) GetInteger(0, 65535, stream);
5994 /* ------------------------------- */
5995 /* ---- Extension Begins Here ---- */
5996 /* ------------------------------- */
5997 if (extension)
5998 {
5999 map = GetUnknownSigMap(stream);
6000 if (SkipUnreadExtensions(map, stream))
6001 {
6002 ErrorMessage("Decode_IP6Address: Unknown extensions (skipped)");
6003 }
6004 }
6005 }
6006
6007 /* <=====================================> */
6008 /* PER-Decoder for IPXAddress (SEQUENCE) */
6009 /* <=====================================> */
Decode_IPXAddress(PS_IPXAddress x,PS_InStream stream)6010 void Decode_IPXAddress(PS_IPXAddress x, PS_InStream stream)
6011 {
6012 uint8 extension;
6013 PS_UnknownSigMap map;
6014
6015 extension = GetBoolean(stream);
6016 GetOctetString(0, 6, 6, &x->node, stream);
6017 GetOctetString(0, 4, 4, &x->netnum, stream);
6018 GetOctetString(0, 2, 2, &x->tsapIdentifier, stream);
6019 /* ------------------------------- */
6020 /* ---- Extension Begins Here ---- */
6021 /* ------------------------------- */
6022 if (extension)
6023 {
6024 map = GetUnknownSigMap(stream);
6025 if (SkipUnreadExtensions(map, stream))
6026 {
6027 ErrorMessage("Decode_IPXAddress: Unknown extensions (skipped)");
6028 }
6029 }
6030 }
6031
6032 /* <====================================> */
6033 /* PER-Decoder for IPAddress (SEQUENCE) */
6034 /* <====================================> */
Decode_IPAddress(PS_IPAddress x,PS_InStream stream)6035 void Decode_IPAddress(PS_IPAddress x, PS_InStream stream)
6036 {
6037 uint8 extension;
6038 PS_UnknownSigMap map;
6039
6040 extension = GetBoolean(stream);
6041 GetOctetString(0, 4, 4, &x->network, stream);
6042 x->tsapIdentifier = (uint16) GetInteger(0, 65535, stream);
6043 /* ------------------------------- */
6044 /* ---- Extension Begins Here ---- */
6045 /* ------------------------------- */
6046 if (extension)
6047 {
6048 map = GetUnknownSigMap(stream);
6049 if (SkipUnreadExtensions(map, stream))
6050 {
6051 ErrorMessage("Decode_IPAddress: Unknown extensions (skipped)");
6052 }
6053 }
6054 }
6055
6056 /* <=========================================> */
6057 /* PER-Decoder for MulticastAddress (CHOICE) */
6058 /* <=========================================> */
Decode_MulticastAddress(PS_MulticastAddress x,PS_InStream stream)6059 void Decode_MulticastAddress(PS_MulticastAddress x, PS_InStream stream)
6060 {
6061 x->index = GetChoiceIndex(2, 1, stream);
6062 switch (x->index)
6063 {
6064 case 0:
6065 x->maIpAddress = (PS_MaIpAddress) OSCL_DEFAULT_MALLOC(sizeof(S_MaIpAddress));
6066 Decode_MaIpAddress(x->maIpAddress, stream);
6067 break;
6068 case 1:
6069 x->maIp6Address = (PS_MaIp6Address) OSCL_DEFAULT_MALLOC(sizeof(S_MaIp6Address));
6070 Decode_MaIp6Address(x->maIp6Address, stream);
6071 break;
6072 /* ------------------------------- */
6073 /* ---- Extension Begins Here ---- */
6074 /* ------------------------------- */
6075 case 2:
6076 GetLengthDet(stream);
6077 x->nsap = (PS_OCTETSTRING) OSCL_DEFAULT_MALLOC(sizeof(S_OCTETSTRING));
6078 GetOctetString(0, 1, 20, x->nsap, stream);
6079 ReadRemainingBits(stream);
6080 break;
6081 case 3:
6082 GetLengthDet(stream);
6083 x->nonStandardAddress = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
6084 Decode_NonStandardParameter(x->nonStandardAddress, stream);
6085 ReadRemainingBits(stream);
6086 break;
6087 default:
6088 ErrorMessage("Decode_MulticastAddress: Unsupported extension (skipping)");
6089 SkipOneExtension(stream);
6090 }
6091 }
6092
6093 /* <=======================================> */
6094 /* PER-Decoder for MaIp6Address (SEQUENCE) */
6095 /* <=======================================> */
Decode_MaIp6Address(PS_MaIp6Address x,PS_InStream stream)6096 void Decode_MaIp6Address(PS_MaIp6Address x, PS_InStream stream)
6097 {
6098 uint8 extension;
6099 PS_UnknownSigMap map;
6100
6101 extension = GetBoolean(stream);
6102 GetOctetString(0, 16, 16, &x->network, stream);
6103 x->tsapIdentifier = (uint16) GetInteger(0, 65535, stream);
6104 /* ------------------------------- */
6105 /* ---- Extension Begins Here ---- */
6106 /* ------------------------------- */
6107 if (extension)
6108 {
6109 map = GetUnknownSigMap(stream);
6110 if (SkipUnreadExtensions(map, stream))
6111 {
6112 ErrorMessage("Decode_MaIp6Address: Unknown extensions (skipped)");
6113 }
6114 }
6115 }
6116
6117 /* <======================================> */
6118 /* PER-Decoder for MaIpAddress (SEQUENCE) */
6119 /* <======================================> */
Decode_MaIpAddress(PS_MaIpAddress x,PS_InStream stream)6120 void Decode_MaIpAddress(PS_MaIpAddress x, PS_InStream stream)
6121 {
6122 uint8 extension;
6123 PS_UnknownSigMap map;
6124
6125 extension = GetBoolean(stream);
6126 GetOctetString(0, 4, 4, &x->network, stream);
6127 x->tsapIdentifier = (uint16) GetInteger(0, 65535, stream);
6128 /* ------------------------------- */
6129 /* ---- Extension Begins Here ---- */
6130 /* ------------------------------- */
6131 if (extension)
6132 {
6133 map = GetUnknownSigMap(stream);
6134 if (SkipUnreadExtensions(map, stream))
6135 {
6136 ErrorMessage("Decode_MaIpAddress: Unknown extensions (skipped)");
6137 }
6138 }
6139 }
6140
6141 /* <=========================================> */
6142 /* PER-Decoder for EncryptionSync (SEQUENCE) */
6143 /* <=========================================> */
Decode_EncryptionSync(PS_EncryptionSync x,PS_InStream stream)6144 void Decode_EncryptionSync(PS_EncryptionSync x, PS_InStream stream)
6145 {
6146 uint16 i;
6147 uint8 extension;
6148 PS_UnknownSigMap map;
6149
6150 extension = GetBoolean(stream);
6151 x->option_of_nonStandard = GetBoolean(stream);
6152 x->option_of_escrowentry = GetBoolean(stream);
6153 if (x->option_of_nonStandard)
6154 {
6155 Decode_NonStandardParameter(&x->nonStandard, stream);
6156 }
6157 x->synchFlag = (uint8) GetInteger(0, 255, stream);
6158 GetOctetString(0, 1, 65535, &x->h235Key, stream);
6159 if (x->option_of_escrowentry)
6160 {
6161 x->size_of_escrowentry = (uint16) GetInteger(1, 256, stream);
6162 x->escrowentry = (PS_EscrowData)
6163 OSCL_DEFAULT_MALLOC(x->size_of_escrowentry * sizeof(S_EscrowData));
6164 for (i = 0; i < x->size_of_escrowentry; ++i)
6165 {
6166 Decode_EscrowData(x->escrowentry + i, stream);
6167 }
6168 }
6169 /* ------------------------------- */
6170 /* ---- Extension Begins Here ---- */
6171 /* ------------------------------- */
6172 if (extension)
6173 {
6174 map = GetUnknownSigMap(stream);
6175 if (SkipUnreadExtensions(map, stream))
6176 {
6177 ErrorMessage("Decode_EncryptionSync: Unknown extensions (skipped)");
6178 }
6179 }
6180 }
6181
6182 /* <=====================================> */
6183 /* PER-Decoder for EscrowData (SEQUENCE) */
6184 /* <=====================================> */
Decode_EscrowData(PS_EscrowData x,PS_InStream stream)6185 void Decode_EscrowData(PS_EscrowData x, PS_InStream stream)
6186 {
6187 uint8 extension;
6188 PS_UnknownSigMap map;
6189
6190 extension = GetBoolean(stream);
6191 GetObjectID(&x->escrowID, stream);
6192 GetBitString(0, 1, 65535, &x->escrowValue, stream);
6193 /* ------------------------------- */
6194 /* ---- Extension Begins Here ---- */
6195 /* ------------------------------- */
6196 if (extension)
6197 {
6198 map = GetUnknownSigMap(stream);
6199 if (SkipUnreadExtensions(map, stream))
6200 {
6201 ErrorMessage("Decode_EscrowData: Unknown extensions (skipped)");
6202 }
6203 }
6204 }
6205
6206 /* <================================================> */
6207 /* PER-Decoder for OpenLogicalChannelAck (SEQUENCE) */
6208 /* <================================================> */
Decode_OpenLogicalChannelAck(PS_OpenLogicalChannelAck x,PS_InStream stream)6209 void Decode_OpenLogicalChannelAck(PS_OpenLogicalChannelAck x, PS_InStream stream)
6210 {
6211 uint8 extension;
6212 PS_UnknownSigMap map;
6213
6214 extension = GetBoolean(stream);
6215 x->option_of_ackReverseLogicalChannelParameters = GetBoolean(stream);
6216 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6217 if (x->option_of_ackReverseLogicalChannelParameters)
6218 {
6219 Decode_AckReverseLogicalChannelParameters(&x->ackReverseLogicalChannelParameters, stream);
6220 }
6221 /* ------------------------------- */
6222 /* ---- Extension Begins Here ---- */
6223 /* ------------------------------- */
6224 x->option_of_separateStack = OFF;
6225 x->option_of_forwardMultiplexAckParameters = OFF;
6226 x->option_of_encryptionSync = OFF;
6227 if (extension)
6228 {
6229 map = GetUnknownSigMap(stream);
6230 x->option_of_separateStack = SigMapValue(0, map);
6231 if (x->option_of_separateStack)
6232 {
6233 ExtensionPrep(map, stream);
6234 Decode_NetworkAccessParameters(&x->separateStack, stream);
6235 ReadRemainingBits(stream);
6236 }
6237 x->option_of_forwardMultiplexAckParameters = SigMapValue(1, map);
6238 if (x->option_of_forwardMultiplexAckParameters)
6239 {
6240 ExtensionPrep(map, stream);
6241 Decode_ForwardMultiplexAckParameters(&x->forwardMultiplexAckParameters, stream);
6242 ReadRemainingBits(stream);
6243 }
6244 x->option_of_encryptionSync = SigMapValue(2, map);
6245 if (x->option_of_encryptionSync)
6246 {
6247 ExtensionPrep(map, stream);
6248 Decode_EncryptionSync(&x->encryptionSync, stream);
6249 ReadRemainingBits(stream);
6250 }
6251 if (SkipUnreadExtensions(map, stream))
6252 {
6253 ErrorMessage("Decode_OpenLogicalChannelAck: Unknown extensions (skipped)");
6254 }
6255 }
6256 }
6257
6258 /* <======================================================> */
6259 /* PER-Decoder for ForwardMultiplexAckParameters (CHOICE) */
6260 /* <======================================================> */
Decode_ForwardMultiplexAckParameters(PS_ForwardMultiplexAckParameters x,PS_InStream stream)6261 void Decode_ForwardMultiplexAckParameters(PS_ForwardMultiplexAckParameters x, PS_InStream stream)
6262 {
6263 x->index = GetChoiceIndex(1, 1, stream);
6264 switch (x->index)
6265 {
6266 case 0:
6267 x->h2250LogicalChannelAckParameters = (PS_H2250LogicalChannelAckParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H2250LogicalChannelAckParameters));
6268 Decode_H2250LogicalChannelAckParameters(x->h2250LogicalChannelAckParameters, stream);
6269 break;
6270 /* ------------------------------- */
6271 /* ---- Extension Begins Here ---- */
6272 /* ------------------------------- */
6273 default:
6274 ErrorMessage("Decode_ForwardMultiplexAckParameters: Unsupported extension (skipping)");
6275 SkipOneExtension(stream);
6276 }
6277 }
6278
6279 /* <=============================================================> */
6280 /* PER-Decoder for AckReverseLogicalChannelParameters (SEQUENCE) */
6281 /* <=============================================================> */
Decode_AckReverseLogicalChannelParameters(PS_AckReverseLogicalChannelParameters x,PS_InStream stream)6282 void Decode_AckReverseLogicalChannelParameters(PS_AckReverseLogicalChannelParameters x, PS_InStream stream)
6283 {
6284 uint8 extension;
6285 PS_UnknownSigMap map;
6286
6287 extension = GetBoolean(stream);
6288 x->option_of_portNumber = GetBoolean(stream);
6289 x->option_of_ackMultiplexParameters = GetBoolean(stream);
6290 x->reverseLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6291 if (x->option_of_portNumber)
6292 {
6293 x->portNumber = (uint16) GetInteger(0, 65535, stream);
6294 }
6295 if (x->option_of_ackMultiplexParameters)
6296 {
6297 Decode_AckMultiplexParameters(&x->ackMultiplexParameters, stream);
6298 }
6299 /* ------------------------------- */
6300 /* ---- Extension Begins Here ---- */
6301 /* ------------------------------- */
6302 x->option_of_replacementFor = OFF;
6303 if (extension)
6304 {
6305 map = GetUnknownSigMap(stream);
6306 x->option_of_replacementFor = SigMapValue(0, map);
6307 if (x->option_of_replacementFor)
6308 {
6309 ExtensionPrep(map, stream);
6310 x->replacementFor = (uint16) GetInteger(1, 65535, stream);
6311 ReadRemainingBits(stream);
6312 }
6313 if (SkipUnreadExtensions(map, stream))
6314 {
6315 ErrorMessage("Decode_AckReverseLogicalChannelParameters: Unknown extensions (skipped)");
6316 }
6317 }
6318 }
6319
6320 /* <===============================================> */
6321 /* PER-Decoder for AckMultiplexParameters (CHOICE) */
6322 /* <===============================================> */
Decode_AckMultiplexParameters(PS_AckMultiplexParameters x,PS_InStream stream)6323 void Decode_AckMultiplexParameters(PS_AckMultiplexParameters x, PS_InStream stream)
6324 {
6325 x->index = GetChoiceIndex(1, 1, stream);
6326 switch (x->index)
6327 {
6328 case 0:
6329 x->h222LogicalChannelParameters = (PS_H222LogicalChannelParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H222LogicalChannelParameters));
6330 Decode_H222LogicalChannelParameters(x->h222LogicalChannelParameters, stream);
6331 break;
6332 /* ------------------------------- */
6333 /* ---- Extension Begins Here ---- */
6334 /* ------------------------------- */
6335 case 1:
6336 GetLengthDet(stream);
6337 x->h2250LogicalChannelParameters = (PS_H2250LogicalChannelParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H2250LogicalChannelParameters));
6338 Decode_H2250LogicalChannelParameters(x->h2250LogicalChannelParameters, stream);
6339 ReadRemainingBits(stream);
6340 break;
6341 default:
6342 ErrorMessage("Decode_AckMultiplexParameters: Unsupported extension (skipping)");
6343 SkipOneExtension(stream);
6344 }
6345 }
6346
6347 /* <===================================================> */
6348 /* PER-Decoder for OpenLogicalChannelReject (SEQUENCE) */
6349 /* <===================================================> */
Decode_OpenLogicalChannelReject(PS_OpenLogicalChannelReject x,PS_InStream stream)6350 void Decode_OpenLogicalChannelReject(PS_OpenLogicalChannelReject x, PS_InStream stream)
6351 {
6352 uint8 extension;
6353 PS_UnknownSigMap map;
6354
6355 extension = GetBoolean(stream);
6356 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6357 Decode_OlcRejectCause(&x->olcRejectCause, stream);
6358 /* ------------------------------- */
6359 /* ---- Extension Begins Here ---- */
6360 /* ------------------------------- */
6361 if (extension)
6362 {
6363 map = GetUnknownSigMap(stream);
6364 if (SkipUnreadExtensions(map, stream))
6365 {
6366 ErrorMessage("Decode_OpenLogicalChannelReject: Unknown extensions (skipped)");
6367 }
6368 }
6369 }
6370
6371 /* <=======================================> */
6372 /* PER-Decoder for OlcRejectCause (CHOICE) */
6373 /* <=======================================> */
Decode_OlcRejectCause(PS_OlcRejectCause x,PS_InStream stream)6374 void Decode_OlcRejectCause(PS_OlcRejectCause x, PS_InStream stream)
6375 {
6376 x->index = GetChoiceIndex(6, 1, stream);
6377 switch (x->index)
6378 {
6379 case 0:
6380 /* (unspecified is NULL) */
6381 break;
6382 case 1:
6383 /* (unsuitableReverseParameters is NULL) */
6384 break;
6385 case 2:
6386 /* (dataTypeNotSupported is NULL) */
6387 break;
6388 case 3:
6389 /* (dataTypeNotAvailable is NULL) */
6390 break;
6391 case 4:
6392 /* (unknownDataType is NULL) */
6393 break;
6394 case 5:
6395 /* (dataTypeALCombinationNotSupported is NULL) */
6396 break;
6397 /* ------------------------------- */
6398 /* ---- Extension Begins Here ---- */
6399 /* ------------------------------- */
6400 case 6:
6401 GetLengthDet(stream);
6402 /* (multicastChannelNotAllowed is NULL) */
6403 SkipOneOctet(stream);
6404 break;
6405 case 7:
6406 GetLengthDet(stream);
6407 /* (insufficientBandwidth is NULL) */
6408 SkipOneOctet(stream);
6409 break;
6410 case 8:
6411 GetLengthDet(stream);
6412 /* (separateStackEstablishmentFailed is NULL) */
6413 SkipOneOctet(stream);
6414 break;
6415 case 9:
6416 GetLengthDet(stream);
6417 /* (invalidSessionID is NULL) */
6418 SkipOneOctet(stream);
6419 break;
6420 case 10:
6421 GetLengthDet(stream);
6422 /* (masterSlaveConflict is NULL) */
6423 SkipOneOctet(stream);
6424 break;
6425 case 11:
6426 GetLengthDet(stream);
6427 /* (waitForCommunicationMode is NULL) */
6428 SkipOneOctet(stream);
6429 break;
6430 case 12:
6431 GetLengthDet(stream);
6432 /* (invalidDependentChannel is NULL) */
6433 SkipOneOctet(stream);
6434 break;
6435 case 13:
6436 GetLengthDet(stream);
6437 /* (replacementForRejected is NULL) */
6438 SkipOneOctet(stream);
6439 break;
6440 default:
6441 ErrorMessage("Decode_OlcRejectCause: Unsupported extension (skipping)");
6442 SkipOneExtension(stream);
6443 }
6444 }
6445
6446 /* <====================================================> */
6447 /* PER-Decoder for OpenLogicalChannelConfirm (SEQUENCE) */
6448 /* <====================================================> */
Decode_OpenLogicalChannelConfirm(PS_OpenLogicalChannelConfirm x,PS_InStream stream)6449 void Decode_OpenLogicalChannelConfirm(PS_OpenLogicalChannelConfirm x, PS_InStream stream)
6450 {
6451 uint8 extension;
6452 PS_UnknownSigMap map;
6453
6454 extension = GetBoolean(stream);
6455 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6456 /* ------------------------------- */
6457 /* ---- Extension Begins Here ---- */
6458 /* ------------------------------- */
6459 if (extension)
6460 {
6461 map = GetUnknownSigMap(stream);
6462 if (SkipUnreadExtensions(map, stream))
6463 {
6464 ErrorMessage("Decode_OpenLogicalChannelConfirm: Unknown extensions (skipped)");
6465 }
6466 }
6467 }
6468
6469 /* <===========================================================> */
6470 /* PER-Decoder for H2250LogicalChannelAckParameters (SEQUENCE) */
6471 /* <===========================================================> */
Decode_H2250LogicalChannelAckParameters(PS_H2250LogicalChannelAckParameters x,PS_InStream stream)6472 void Decode_H2250LogicalChannelAckParameters(PS_H2250LogicalChannelAckParameters x, PS_InStream stream)
6473 {
6474 uint16 i;
6475 uint8 extension;
6476 PS_UnknownSigMap map;
6477
6478 extension = GetBoolean(stream);
6479 x->option_of_nonStandard = GetBoolean(stream);
6480 x->option_of_sessionID = GetBoolean(stream);
6481 x->option_of_mediaChannel = GetBoolean(stream);
6482 x->option_of_mediaControlChannel = GetBoolean(stream);
6483 x->option_of_dynamicRTPPayloadType = GetBoolean(stream);
6484 if (x->option_of_nonStandard)
6485 {
6486 x->size_of_nonStandard = (uint16) GetLengthDet(stream);
6487 x->nonStandard = (PS_NonStandardParameter)
6488 OSCL_DEFAULT_MALLOC(x->size_of_nonStandard * sizeof(S_NonStandardParameter));
6489 for (i = 0; i < x->size_of_nonStandard; ++i)
6490 {
6491 Decode_NonStandardParameter(x->nonStandard + i, stream);
6492 }
6493 }
6494 if (x->option_of_sessionID)
6495 {
6496 x->sessionID = (uint8) GetInteger(1, 255, stream);
6497 }
6498 if (x->option_of_mediaChannel)
6499 {
6500 Decode_TransportAddress(&x->mediaChannel, stream);
6501 }
6502 if (x->option_of_mediaControlChannel)
6503 {
6504 Decode_TransportAddress(&x->mediaControlChannel, stream);
6505 }
6506 if (x->option_of_dynamicRTPPayloadType)
6507 {
6508 x->dynamicRTPPayloadType = (uint8) GetInteger(96, 127, stream);
6509 }
6510 /* ------------------------------- */
6511 /* ---- Extension Begins Here ---- */
6512 /* ------------------------------- */
6513 x->option_of_flowControlToZero = OFF;
6514 x->option_of_portNumber = OFF;
6515 if (extension)
6516 {
6517 map = GetUnknownSigMap(stream);
6518 x->option_of_flowControlToZero = SigMapValue(0, map);
6519 if (x->option_of_flowControlToZero)
6520 {
6521 ExtensionPrep(map, stream);
6522 x->flowControlToZero = GetBoolean(stream);
6523 ReadRemainingBits(stream);
6524 }
6525 x->option_of_portNumber = SigMapValue(1, map);
6526 if (x->option_of_portNumber)
6527 {
6528 ExtensionPrep(map, stream);
6529 x->portNumber = (uint16) GetInteger(0, 65535, stream);
6530 ReadRemainingBits(stream);
6531 }
6532 if (SkipUnreadExtensions(map, stream))
6533 {
6534 ErrorMessage("Decode_H2250LogicalChannelAckParameters: Unknown extensions (skipped)");
6535 }
6536 }
6537 }
6538
6539 /* <==============================================> */
6540 /* PER-Decoder for CloseLogicalChannel (SEQUENCE) */
6541 /* <==============================================> */
Decode_CloseLogicalChannel(PS_CloseLogicalChannel x,PS_InStream stream)6542 void Decode_CloseLogicalChannel(PS_CloseLogicalChannel x, PS_InStream stream)
6543 {
6544 uint8 extension;
6545 PS_UnknownSigMap map;
6546
6547 extension = GetBoolean(stream);
6548 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6549 Decode_Source(&x->source, stream);
6550 /* ------------------------------- */
6551 /* ---- Extension Begins Here ---- */
6552 /* ------------------------------- */
6553 x->option_of_reason = OFF;
6554 if (extension)
6555 {
6556 map = GetUnknownSigMap(stream);
6557 x->option_of_reason = SigMapValue(0, map);
6558 if (x->option_of_reason)
6559 {
6560 ExtensionPrep(map, stream);
6561 Decode_Reason(&x->reason, stream);
6562 ReadRemainingBits(stream);
6563 }
6564 if (SkipUnreadExtensions(map, stream))
6565 {
6566 ErrorMessage("Decode_CloseLogicalChannel: Unknown extensions (skipped)");
6567 }
6568 }
6569 }
6570
6571 /* <===============================> */
6572 /* PER-Decoder for Reason (CHOICE) */
6573 /* <===============================> */
Decode_Reason(PS_Reason x,PS_InStream stream)6574 void Decode_Reason(PS_Reason x, PS_InStream stream)
6575 {
6576 x->index = GetChoiceIndex(3, 1, stream);
6577 switch (x->index)
6578 {
6579 case 0:
6580 /* (unknown is NULL) */
6581 break;
6582 case 1:
6583 /* (reopen is NULL) */
6584 break;
6585 case 2:
6586 /* (reservationFailure is NULL) */
6587 break;
6588 /* ------------------------------- */
6589 /* ---- Extension Begins Here ---- */
6590 /* ------------------------------- */
6591 default:
6592 ErrorMessage("Decode_Reason: Unsupported extension (skipping)");
6593 SkipOneExtension(stream);
6594 }
6595 }
6596
6597 /* <===============================> */
6598 /* PER-Decoder for Source (CHOICE) */
6599 /* <===============================> */
Decode_Source(PS_Source x,PS_InStream stream)6600 void Decode_Source(PS_Source x, PS_InStream stream)
6601 {
6602 x->index = GetChoiceIndex(2, 0, stream);
6603 switch (x->index)
6604 {
6605 case 0:
6606 /* (user is NULL) */
6607 break;
6608 case 1:
6609 /* (lcse is NULL) */
6610 break;
6611 default:
6612 ErrorMessageAndLeave("Decode_Source: Illegal CHOICE index");
6613 }
6614 }
6615
6616 /* <=================================================> */
6617 /* PER-Decoder for CloseLogicalChannelAck (SEQUENCE) */
6618 /* <=================================================> */
Decode_CloseLogicalChannelAck(PS_CloseLogicalChannelAck x,PS_InStream stream)6619 void Decode_CloseLogicalChannelAck(PS_CloseLogicalChannelAck x, PS_InStream stream)
6620 {
6621 uint8 extension;
6622 PS_UnknownSigMap map;
6623
6624 extension = GetBoolean(stream);
6625 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6626 /* ------------------------------- */
6627 /* ---- Extension Begins Here ---- */
6628 /* ------------------------------- */
6629 if (extension)
6630 {
6631 map = GetUnknownSigMap(stream);
6632 if (SkipUnreadExtensions(map, stream))
6633 {
6634 ErrorMessage("Decode_CloseLogicalChannelAck: Unknown extensions (skipped)");
6635 }
6636 }
6637 }
6638
6639 /* <==============================================> */
6640 /* PER-Decoder for RequestChannelClose (SEQUENCE) */
6641 /* <==============================================> */
Decode_RequestChannelClose(PS_RequestChannelClose x,PS_InStream stream)6642 void Decode_RequestChannelClose(PS_RequestChannelClose x, PS_InStream stream)
6643 {
6644 uint8 extension;
6645 PS_UnknownSigMap map;
6646
6647 extension = GetBoolean(stream);
6648 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6649 /* ------------------------------- */
6650 /* ---- Extension Begins Here ---- */
6651 /* ------------------------------- */
6652 x->option_of_qosCapability = OFF;
6653 x->option_of_rccReason = OFF;
6654 if (extension)
6655 {
6656 map = GetUnknownSigMap(stream);
6657 x->option_of_qosCapability = SigMapValue(0, map);
6658 if (x->option_of_qosCapability)
6659 {
6660 ExtensionPrep(map, stream);
6661 Decode_QOSCapability(&x->qosCapability, stream);
6662 ReadRemainingBits(stream);
6663 }
6664 x->option_of_rccReason = SigMapValue(1, map);
6665 if (x->option_of_rccReason)
6666 {
6667 ExtensionPrep(map, stream);
6668 Decode_RccReason(&x->rccReason, stream);
6669 ReadRemainingBits(stream);
6670 }
6671 if (SkipUnreadExtensions(map, stream))
6672 {
6673 ErrorMessage("Decode_RequestChannelClose: Unknown extensions (skipped)");
6674 }
6675 }
6676 }
6677
6678 /* <==================================> */
6679 /* PER-Decoder for RccReason (CHOICE) */
6680 /* <==================================> */
Decode_RccReason(PS_RccReason x,PS_InStream stream)6681 void Decode_RccReason(PS_RccReason x, PS_InStream stream)
6682 {
6683 x->index = GetChoiceIndex(4, 1, stream);
6684 switch (x->index)
6685 {
6686 case 0:
6687 /* (unknown is NULL) */
6688 break;
6689 case 1:
6690 /* (normal is NULL) */
6691 break;
6692 case 2:
6693 /* (reopen is NULL) */
6694 break;
6695 case 3:
6696 /* (reservationFailure is NULL) */
6697 break;
6698 /* ------------------------------- */
6699 /* ---- Extension Begins Here ---- */
6700 /* ------------------------------- */
6701 default:
6702 ErrorMessage("Decode_RccReason: Unsupported extension (skipping)");
6703 SkipOneExtension(stream);
6704 }
6705 }
6706
6707 /* <=================================================> */
6708 /* PER-Decoder for RequestChannelCloseAck (SEQUENCE) */
6709 /* <=================================================> */
Decode_RequestChannelCloseAck(PS_RequestChannelCloseAck x,PS_InStream stream)6710 void Decode_RequestChannelCloseAck(PS_RequestChannelCloseAck x, PS_InStream stream)
6711 {
6712 uint8 extension;
6713 PS_UnknownSigMap map;
6714
6715 extension = GetBoolean(stream);
6716 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6717 /* ------------------------------- */
6718 /* ---- Extension Begins Here ---- */
6719 /* ------------------------------- */
6720 if (extension)
6721 {
6722 map = GetUnknownSigMap(stream);
6723 if (SkipUnreadExtensions(map, stream))
6724 {
6725 ErrorMessage("Decode_RequestChannelCloseAck: Unknown extensions (skipped)");
6726 }
6727 }
6728 }
6729
6730 /* <====================================================> */
6731 /* PER-Decoder for RequestChannelCloseReject (SEQUENCE) */
6732 /* <====================================================> */
Decode_RequestChannelCloseReject(PS_RequestChannelCloseReject x,PS_InStream stream)6733 void Decode_RequestChannelCloseReject(PS_RequestChannelCloseReject x, PS_InStream stream)
6734 {
6735 uint8 extension;
6736 PS_UnknownSigMap map;
6737
6738 extension = GetBoolean(stream);
6739 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6740 Decode_RccRejectCause(&x->rccRejectCause, stream);
6741 /* ------------------------------- */
6742 /* ---- Extension Begins Here ---- */
6743 /* ------------------------------- */
6744 if (extension)
6745 {
6746 map = GetUnknownSigMap(stream);
6747 if (SkipUnreadExtensions(map, stream))
6748 {
6749 ErrorMessage("Decode_RequestChannelCloseReject: Unknown extensions (skipped)");
6750 }
6751 }
6752 }
6753
6754 /* <=======================================> */
6755 /* PER-Decoder for RccRejectCause (CHOICE) */
6756 /* <=======================================> */
Decode_RccRejectCause(PS_RccRejectCause x,PS_InStream stream)6757 void Decode_RccRejectCause(PS_RccRejectCause x, PS_InStream stream)
6758 {
6759 x->index = GetChoiceIndex(1, 1, stream);
6760 switch (x->index)
6761 {
6762 case 0:
6763 /* (unspecified is NULL) */
6764 break;
6765 /* ------------------------------- */
6766 /* ---- Extension Begins Here ---- */
6767 /* ------------------------------- */
6768 default:
6769 ErrorMessage("Decode_RccRejectCause: Unsupported extension (skipping)");
6770 SkipOneExtension(stream);
6771 }
6772 }
6773
6774 /* <=====================================================> */
6775 /* PER-Decoder for RequestChannelCloseRelease (SEQUENCE) */
6776 /* <=====================================================> */
Decode_RequestChannelCloseRelease(PS_RequestChannelCloseRelease x,PS_InStream stream)6777 void Decode_RequestChannelCloseRelease(PS_RequestChannelCloseRelease x, PS_InStream stream)
6778 {
6779 uint8 extension;
6780 PS_UnknownSigMap map;
6781
6782 extension = GetBoolean(stream);
6783 x->forwardLogicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
6784 /* ------------------------------- */
6785 /* ---- Extension Begins Here ---- */
6786 /* ------------------------------- */
6787 if (extension)
6788 {
6789 map = GetUnknownSigMap(stream);
6790 if (SkipUnreadExtensions(map, stream))
6791 {
6792 ErrorMessage("Decode_RequestChannelCloseRelease: Unknown extensions (skipped)");
6793 }
6794 }
6795 }
6796
6797 /* <=============================================> */
6798 /* PER-Decoder for MultiplexEntrySend (SEQUENCE) */
6799 /* <=============================================> */
Decode_MultiplexEntrySend(PS_MultiplexEntrySend x,PS_InStream stream)6800 void Decode_MultiplexEntrySend(PS_MultiplexEntrySend x, PS_InStream stream)
6801 {
6802 uint16 i;
6803 uint8 extension;
6804 PS_UnknownSigMap map;
6805
6806 extension = GetBoolean(stream);
6807 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
6808 x->size_of_multiplexEntryDescriptors = (uint8) GetInteger(1, 15, stream);
6809 x->multiplexEntryDescriptors = (PS_MultiplexEntryDescriptor)
6810 OSCL_DEFAULT_MALLOC(x->size_of_multiplexEntryDescriptors * sizeof(S_MultiplexEntryDescriptor));
6811 for (i = 0; i < x->size_of_multiplexEntryDescriptors; ++i)
6812 {
6813 Decode_MultiplexEntryDescriptor(x->multiplexEntryDescriptors + i, stream);
6814 }
6815 /* ------------------------------- */
6816 /* ---- Extension Begins Here ---- */
6817 /* ------------------------------- */
6818 if (extension)
6819 {
6820 map = GetUnknownSigMap(stream);
6821 if (SkipUnreadExtensions(map, stream))
6822 {
6823 ErrorMessage("Decode_MultiplexEntrySend: Unknown extensions (skipped)");
6824 }
6825 }
6826 }
6827
6828 /* <===================================================> */
6829 /* PER-Decoder for MultiplexEntryDescriptor (SEQUENCE) */
6830 /* <===================================================> */
Decode_MultiplexEntryDescriptor(PS_MultiplexEntryDescriptor x,PS_InStream stream)6831 void Decode_MultiplexEntryDescriptor(PS_MultiplexEntryDescriptor x, PS_InStream stream)
6832 {
6833 uint16 i;
6834 x->option_of_elementList = GetBoolean(stream);
6835 x->multiplexTableEntryNumber = (uint8) GetInteger(1, 15, stream);
6836 if (x->option_of_elementList)
6837 {
6838 x->size_of_elementList = (uint16) GetInteger(1, 256, stream);
6839 x->elementList = (PS_MultiplexElement)
6840 OSCL_DEFAULT_MALLOC(x->size_of_elementList * sizeof(S_MultiplexElement));
6841 for (i = 0; i < x->size_of_elementList; ++i)
6842 {
6843 Decode_MultiplexElement(x->elementList + i, stream);
6844 }
6845 }
6846 }
6847
6848 /* <===========================================> */
6849 /* PER-Decoder for MultiplexElement (SEQUENCE) */
6850 /* <===========================================> */
Decode_MultiplexElement(PS_MultiplexElement x,PS_InStream stream)6851 void Decode_MultiplexElement(PS_MultiplexElement x, PS_InStream stream)
6852 {
6853 Decode_MuxType(&x->muxType, stream);
6854 Decode_RepeatCount(&x->repeatCount, stream);
6855 }
6856
6857 /* <====================================> */
6858 /* PER-Decoder for RepeatCount (CHOICE) */
6859 /* <====================================> */
Decode_RepeatCount(PS_RepeatCount x,PS_InStream stream)6860 void Decode_RepeatCount(PS_RepeatCount x, PS_InStream stream)
6861 {
6862 x->index = GetChoiceIndex(2, 0, stream);
6863 switch (x->index)
6864 {
6865 case 0:
6866 x->finite = (uint16) GetInteger(1, 65535, stream);
6867 break;
6868 case 1:
6869 /* (untilClosingFlag is NULL) */
6870 break;
6871 default:
6872 ErrorMessageAndLeave("Decode_RepeatCount: Illegal CHOICE index");
6873 }
6874 }
6875
6876 /* <================================> */
6877 /* PER-Decoder for MuxType (CHOICE) */
6878 /* <================================> */
Decode_MuxType(PS_MuxType x,PS_InStream stream)6879 void Decode_MuxType(PS_MuxType x, PS_InStream stream)
6880 {
6881 uint16 i;
6882 x->index = GetChoiceIndex(2, 0, stream);
6883 switch (x->index)
6884 {
6885 case 0:
6886 x->logicalChannelNumber = (uint16) GetInteger(0, 65535, stream);
6887 break;
6888 case 1:
6889 x->size = (uint8) GetInteger(2, 255, stream);
6890 x->subElementList = (PS_MultiplexElement)
6891 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_MultiplexElement));
6892 for (i = 0; i < x->size; ++i)
6893 {
6894 Decode_MultiplexElement(x->subElementList + i, stream);
6895 }
6896 break;
6897 default:
6898 ErrorMessageAndLeave("Decode_MuxType: Illegal CHOICE index");
6899 }
6900 }
6901
6902 /* <================================================> */
6903 /* PER-Decoder for MultiplexEntrySendAck (SEQUENCE) */
6904 /* <================================================> */
Decode_MultiplexEntrySendAck(PS_MultiplexEntrySendAck x,PS_InStream stream)6905 void Decode_MultiplexEntrySendAck(PS_MultiplexEntrySendAck x, PS_InStream stream)
6906 {
6907 uint16 i;
6908 uint8 extension;
6909 PS_UnknownSigMap map;
6910
6911 extension = GetBoolean(stream);
6912 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
6913 x->size_of_multiplexTableEntryNumber = (uint8) GetInteger(1, 15, stream);
6914 x->multiplexTableEntryNumber = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_multiplexTableEntryNumber * sizeof(uint32));
6915 for (i = 0; i < x->size_of_multiplexTableEntryNumber; ++i)
6916 {
6917 x->multiplexTableEntryNumber[i] = GetInteger(1, 15, stream);
6918 }
6919 /* ------------------------------- */
6920 /* ---- Extension Begins Here ---- */
6921 /* ------------------------------- */
6922 if (extension)
6923 {
6924 map = GetUnknownSigMap(stream);
6925 if (SkipUnreadExtensions(map, stream))
6926 {
6927 ErrorMessage("Decode_MultiplexEntrySendAck: Unknown extensions (skipped)");
6928 }
6929 }
6930 }
6931
6932 /* <===================================================> */
6933 /* PER-Decoder for MultiplexEntrySendReject (SEQUENCE) */
6934 /* <===================================================> */
Decode_MultiplexEntrySendReject(PS_MultiplexEntrySendReject x,PS_InStream stream)6935 void Decode_MultiplexEntrySendReject(PS_MultiplexEntrySendReject x, PS_InStream stream)
6936 {
6937 uint16 i;
6938 uint8 extension;
6939 PS_UnknownSigMap map;
6940
6941 extension = GetBoolean(stream);
6942 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
6943 x->size_of_rejectionDescriptions = (uint8) GetInteger(1, 15, stream);
6944 x->rejectionDescriptions = (PS_MultiplexEntryRejectionDescriptions)
6945 OSCL_DEFAULT_MALLOC(x->size_of_rejectionDescriptions * sizeof(S_MultiplexEntryRejectionDescriptions));
6946 for (i = 0; i < x->size_of_rejectionDescriptions; ++i)
6947 {
6948 Decode_MultiplexEntryRejectionDescriptions(x->rejectionDescriptions + i, stream);
6949 }
6950 /* ------------------------------- */
6951 /* ---- Extension Begins Here ---- */
6952 /* ------------------------------- */
6953 if (extension)
6954 {
6955 map = GetUnknownSigMap(stream);
6956 if (SkipUnreadExtensions(map, stream))
6957 {
6958 ErrorMessage("Decode_MultiplexEntrySendReject: Unknown extensions (skipped)");
6959 }
6960 }
6961 }
6962
6963 /* <==============================================================> */
6964 /* PER-Decoder for MultiplexEntryRejectionDescriptions (SEQUENCE) */
6965 /* <==============================================================> */
Decode_MultiplexEntryRejectionDescriptions(PS_MultiplexEntryRejectionDescriptions x,PS_InStream stream)6966 void Decode_MultiplexEntryRejectionDescriptions(PS_MultiplexEntryRejectionDescriptions x, PS_InStream stream)
6967 {
6968 uint8 extension;
6969 PS_UnknownSigMap map;
6970
6971 extension = GetBoolean(stream);
6972 x->multiplexTableEntryNumber = (uint8) GetInteger(1, 15, stream);
6973 Decode_MeRejectCause(&x->meRejectCause, stream);
6974 /* ------------------------------- */
6975 /* ---- Extension Begins Here ---- */
6976 /* ------------------------------- */
6977 if (extension)
6978 {
6979 map = GetUnknownSigMap(stream);
6980 if (SkipUnreadExtensions(map, stream))
6981 {
6982 ErrorMessage("Decode_MultiplexEntryRejectionDescriptions: Unknown extensions (skipped)");
6983 }
6984 }
6985 }
6986
6987 /* <======================================> */
6988 /* PER-Decoder for MeRejectCause (CHOICE) */
6989 /* <======================================> */
Decode_MeRejectCause(PS_MeRejectCause x,PS_InStream stream)6990 void Decode_MeRejectCause(PS_MeRejectCause x, PS_InStream stream)
6991 {
6992 x->index = GetChoiceIndex(2, 1, stream);
6993 switch (x->index)
6994 {
6995 case 0:
6996 /* (unspecifiedCause is NULL) */
6997 break;
6998 case 1:
6999 /* (descriptorTooComplex is NULL) */
7000 break;
7001 /* ------------------------------- */
7002 /* ---- Extension Begins Here ---- */
7003 /* ------------------------------- */
7004 default:
7005 ErrorMessage("Decode_MeRejectCause: Unsupported extension (skipping)");
7006 SkipOneExtension(stream);
7007 }
7008 }
7009
7010 /* <====================================================> */
7011 /* PER-Decoder for MultiplexEntrySendRelease (SEQUENCE) */
7012 /* <====================================================> */
Decode_MultiplexEntrySendRelease(PS_MultiplexEntrySendRelease x,PS_InStream stream)7013 void Decode_MultiplexEntrySendRelease(PS_MultiplexEntrySendRelease x, PS_InStream stream)
7014 {
7015 uint16 i;
7016 uint8 extension;
7017 PS_UnknownSigMap map;
7018
7019 extension = GetBoolean(stream);
7020 x->size_of_multiplexTableEntryNumber = (uint8) GetInteger(1, 15, stream);
7021 x->multiplexTableEntryNumber = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_multiplexTableEntryNumber * sizeof(uint32));
7022 for (i = 0; i < x->size_of_multiplexTableEntryNumber; ++i)
7023 {
7024 x->multiplexTableEntryNumber[i] = GetInteger(1, 15, stream);
7025 }
7026 /* ------------------------------- */
7027 /* ---- Extension Begins Here ---- */
7028 /* ------------------------------- */
7029 if (extension)
7030 {
7031 map = GetUnknownSigMap(stream);
7032 if (SkipUnreadExtensions(map, stream))
7033 {
7034 ErrorMessage("Decode_MultiplexEntrySendRelease: Unknown extensions (skipped)");
7035 }
7036 }
7037 }
7038
7039 /* <================================================> */
7040 /* PER-Decoder for RequestMultiplexEntry (SEQUENCE) */
7041 /* <================================================> */
Decode_RequestMultiplexEntry(PS_RequestMultiplexEntry x,PS_InStream stream)7042 void Decode_RequestMultiplexEntry(PS_RequestMultiplexEntry x, PS_InStream stream)
7043 {
7044 uint16 i;
7045 uint8 extension;
7046 PS_UnknownSigMap map;
7047
7048 extension = GetBoolean(stream);
7049 x->size_of_entryNumbers = (uint8) GetInteger(1, 15, stream);
7050 x->entryNumbers = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_entryNumbers * sizeof(uint32));
7051 for (i = 0; i < x->size_of_entryNumbers; ++i)
7052 {
7053 x->entryNumbers[i] = GetInteger(1, 15, stream);
7054 }
7055 /* ------------------------------- */
7056 /* ---- Extension Begins Here ---- */
7057 /* ------------------------------- */
7058 if (extension)
7059 {
7060 map = GetUnknownSigMap(stream);
7061 if (SkipUnreadExtensions(map, stream))
7062 {
7063 ErrorMessage("Decode_RequestMultiplexEntry: Unknown extensions (skipped)");
7064 }
7065 }
7066 }
7067
7068 /* <===================================================> */
7069 /* PER-Decoder for RequestMultiplexEntryAck (SEQUENCE) */
7070 /* <===================================================> */
Decode_RequestMultiplexEntryAck(PS_RequestMultiplexEntryAck x,PS_InStream stream)7071 void Decode_RequestMultiplexEntryAck(PS_RequestMultiplexEntryAck x, PS_InStream stream)
7072 {
7073 uint16 i;
7074 uint8 extension;
7075 PS_UnknownSigMap map;
7076
7077 extension = GetBoolean(stream);
7078 x->size_of_entryNumbers = (uint8) GetInteger(1, 15, stream);
7079 x->entryNumbers = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_entryNumbers * sizeof(uint32));
7080 for (i = 0; i < x->size_of_entryNumbers; ++i)
7081 {
7082 x->entryNumbers[i] = GetInteger(1, 15, stream);
7083 }
7084 /* ------------------------------- */
7085 /* ---- Extension Begins Here ---- */
7086 /* ------------------------------- */
7087 if (extension)
7088 {
7089 map = GetUnknownSigMap(stream);
7090 if (SkipUnreadExtensions(map, stream))
7091 {
7092 ErrorMessage("Decode_RequestMultiplexEntryAck: Unknown extensions (skipped)");
7093 }
7094 }
7095 }
7096
7097 /* <======================================================> */
7098 /* PER-Decoder for RequestMultiplexEntryReject (SEQUENCE) */
7099 /* <======================================================> */
Decode_RequestMultiplexEntryReject(PS_RequestMultiplexEntryReject x,PS_InStream stream)7100 void Decode_RequestMultiplexEntryReject(PS_RequestMultiplexEntryReject x, PS_InStream stream)
7101 {
7102 uint16 i;
7103 uint8 extension;
7104 PS_UnknownSigMap map;
7105
7106 extension = GetBoolean(stream);
7107 x->size_of_entryNumbers = (uint8) GetInteger(1, 15, stream);
7108 x->entryNumbers = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_entryNumbers * sizeof(uint32));
7109 for (i = 0; i < x->size_of_entryNumbers; ++i)
7110 {
7111 x->entryNumbers[i] = GetInteger(1, 15, stream);
7112 }
7113 x->size_of_rejectionDescriptions = (uint8) GetInteger(1, 15, stream);
7114 x->rejectionDescriptions = (PS_RequestMultiplexEntryRejectionDescriptions)
7115 OSCL_DEFAULT_MALLOC(x->size_of_rejectionDescriptions * sizeof(S_RequestMultiplexEntryRejectionDescriptions));
7116 for (i = 0; i < x->size_of_rejectionDescriptions; ++i)
7117 {
7118 Decode_RequestMultiplexEntryRejectionDescriptions(x->rejectionDescriptions + i, stream);
7119 }
7120 /* ------------------------------- */
7121 /* ---- Extension Begins Here ---- */
7122 /* ------------------------------- */
7123 if (extension)
7124 {
7125 map = GetUnknownSigMap(stream);
7126 if (SkipUnreadExtensions(map, stream))
7127 {
7128 ErrorMessage("Decode_RequestMultiplexEntryReject: Unknown extensions (skipped)");
7129 }
7130 }
7131 }
7132
7133 /* <=====================================================================> */
7134 /* PER-Decoder for RequestMultiplexEntryRejectionDescriptions (SEQUENCE) */
7135 /* <=====================================================================> */
Decode_RequestMultiplexEntryRejectionDescriptions(PS_RequestMultiplexEntryRejectionDescriptions x,PS_InStream stream)7136 void Decode_RequestMultiplexEntryRejectionDescriptions(PS_RequestMultiplexEntryRejectionDescriptions x, PS_InStream stream)
7137 {
7138 uint8 extension;
7139 PS_UnknownSigMap map;
7140
7141 extension = GetBoolean(stream);
7142 x->multiplexTableEntryNumber = (uint8) GetInteger(1, 15, stream);
7143 Decode_RmeRejectCause(&x->rmeRejectCause, stream);
7144 /* ------------------------------- */
7145 /* ---- Extension Begins Here ---- */
7146 /* ------------------------------- */
7147 if (extension)
7148 {
7149 map = GetUnknownSigMap(stream);
7150 if (SkipUnreadExtensions(map, stream))
7151 {
7152 ErrorMessage("Decode_RequestMultiplexEntryRejectionDescriptions: Unknown extensions (skipped)");
7153 }
7154 }
7155 }
7156
7157 /* <=======================================> */
7158 /* PER-Decoder for RmeRejectCause (CHOICE) */
7159 /* <=======================================> */
Decode_RmeRejectCause(PS_RmeRejectCause x,PS_InStream stream)7160 void Decode_RmeRejectCause(PS_RmeRejectCause x, PS_InStream stream)
7161 {
7162 x->index = GetChoiceIndex(1, 1, stream);
7163 switch (x->index)
7164 {
7165 case 0:
7166 /* (unspecifiedCause is NULL) */
7167 break;
7168 /* ------------------------------- */
7169 /* ---- Extension Begins Here ---- */
7170 /* ------------------------------- */
7171 default:
7172 ErrorMessage("Decode_RmeRejectCause: Unsupported extension (skipping)");
7173 SkipOneExtension(stream);
7174 }
7175 }
7176
7177 /* <=======================================================> */
7178 /* PER-Decoder for RequestMultiplexEntryRelease (SEQUENCE) */
7179 /* <=======================================================> */
Decode_RequestMultiplexEntryRelease(PS_RequestMultiplexEntryRelease x,PS_InStream stream)7180 void Decode_RequestMultiplexEntryRelease(PS_RequestMultiplexEntryRelease x, PS_InStream stream)
7181 {
7182 uint16 i;
7183 uint8 extension;
7184 PS_UnknownSigMap map;
7185
7186 extension = GetBoolean(stream);
7187 x->size_of_entryNumbers = (uint8) GetInteger(1, 15, stream);
7188 x->entryNumbers = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_entryNumbers * sizeof(uint32));
7189 for (i = 0; i < x->size_of_entryNumbers; ++i)
7190 {
7191 x->entryNumbers[i] = GetInteger(1, 15, stream);
7192 }
7193 /* ------------------------------- */
7194 /* ---- Extension Begins Here ---- */
7195 /* ------------------------------- */
7196 if (extension)
7197 {
7198 map = GetUnknownSigMap(stream);
7199 if (SkipUnreadExtensions(map, stream))
7200 {
7201 ErrorMessage("Decode_RequestMultiplexEntryRelease: Unknown extensions (skipped)");
7202 }
7203 }
7204 }
7205
7206 /* <======================================> */
7207 /* PER-Decoder for RequestMode (SEQUENCE) */
7208 /* <======================================> */
Decode_RequestMode(PS_RequestMode x,PS_InStream stream)7209 void Decode_RequestMode(PS_RequestMode x, PS_InStream stream)
7210 {
7211 uint16 i;
7212 uint8 extension;
7213 PS_UnknownSigMap map;
7214
7215 extension = GetBoolean(stream);
7216 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
7217 x->size_of_requestedModes = (uint16) GetInteger(1, 256, stream);
7218 x->requestedModes = (PS_ModeDescription)
7219 OSCL_DEFAULT_MALLOC(x->size_of_requestedModes * sizeof(S_ModeDescription));
7220 for (i = 0; i < x->size_of_requestedModes; ++i)
7221 {
7222 Decode_ModeDescription(x->requestedModes + i, stream);
7223 }
7224 /* ------------------------------- */
7225 /* ---- Extension Begins Here ---- */
7226 /* ------------------------------- */
7227 if (extension)
7228 {
7229 map = GetUnknownSigMap(stream);
7230 if (SkipUnreadExtensions(map, stream))
7231 {
7232 ErrorMessage("Decode_RequestMode: Unknown extensions (skipped)");
7233 }
7234 }
7235 }
7236
7237 /* <=========================================> */
7238 /* PER-Decoder for RequestModeAck (SEQUENCE) */
7239 /* <=========================================> */
Decode_RequestModeAck(PS_RequestModeAck x,PS_InStream stream)7240 void Decode_RequestModeAck(PS_RequestModeAck x, PS_InStream stream)
7241 {
7242 uint8 extension;
7243 PS_UnknownSigMap map;
7244
7245 extension = GetBoolean(stream);
7246 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
7247 Decode_Response(&x->response, stream);
7248 /* ------------------------------- */
7249 /* ---- Extension Begins Here ---- */
7250 /* ------------------------------- */
7251 if (extension)
7252 {
7253 map = GetUnknownSigMap(stream);
7254 if (SkipUnreadExtensions(map, stream))
7255 {
7256 ErrorMessage("Decode_RequestModeAck: Unknown extensions (skipped)");
7257 }
7258 }
7259 }
7260
7261 /* <=================================> */
7262 /* PER-Decoder for Response (CHOICE) */
7263 /* <=================================> */
Decode_Response(PS_Response x,PS_InStream stream)7264 void Decode_Response(PS_Response x, PS_InStream stream)
7265 {
7266 x->index = GetChoiceIndex(2, 1, stream);
7267 switch (x->index)
7268 {
7269 case 0:
7270 /* (willTransmitMostPreferredMode is NULL) */
7271 break;
7272 case 1:
7273 /* (willTransmitLessPreferredMode is NULL) */
7274 break;
7275 /* ------------------------------- */
7276 /* ---- Extension Begins Here ---- */
7277 /* ------------------------------- */
7278 default:
7279 ErrorMessage("Decode_Response: Unsupported extension (skipping)");
7280 SkipOneExtension(stream);
7281 }
7282 }
7283
7284 /* <============================================> */
7285 /* PER-Decoder for RequestModeReject (SEQUENCE) */
7286 /* <============================================> */
Decode_RequestModeReject(PS_RequestModeReject x,PS_InStream stream)7287 void Decode_RequestModeReject(PS_RequestModeReject x, PS_InStream stream)
7288 {
7289 uint8 extension;
7290 PS_UnknownSigMap map;
7291
7292 extension = GetBoolean(stream);
7293 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
7294 Decode_RmRejectCause(&x->rmRejectCause, stream);
7295 /* ------------------------------- */
7296 /* ---- Extension Begins Here ---- */
7297 /* ------------------------------- */
7298 if (extension)
7299 {
7300 map = GetUnknownSigMap(stream);
7301 if (SkipUnreadExtensions(map, stream))
7302 {
7303 ErrorMessage("Decode_RequestModeReject: Unknown extensions (skipped)");
7304 }
7305 }
7306 }
7307
7308 /* <======================================> */
7309 /* PER-Decoder for RmRejectCause (CHOICE) */
7310 /* <======================================> */
Decode_RmRejectCause(PS_RmRejectCause x,PS_InStream stream)7311 void Decode_RmRejectCause(PS_RmRejectCause x, PS_InStream stream)
7312 {
7313 x->index = GetChoiceIndex(3, 1, stream);
7314 switch (x->index)
7315 {
7316 case 0:
7317 /* (modeUnavailable is NULL) */
7318 break;
7319 case 1:
7320 /* (multipointConstraint is NULL) */
7321 break;
7322 case 2:
7323 /* (requestDenied is NULL) */
7324 break;
7325 /* ------------------------------- */
7326 /* ---- Extension Begins Here ---- */
7327 /* ------------------------------- */
7328 default:
7329 ErrorMessage("Decode_RmRejectCause: Unsupported extension (skipping)");
7330 SkipOneExtension(stream);
7331 }
7332 }
7333
7334 /* <=============================================> */
7335 /* PER-Decoder for RequestModeRelease (SEQUENCE) */
7336 /* <=============================================> */
Decode_RequestModeRelease(PS_RequestModeRelease x,PS_InStream stream)7337 void Decode_RequestModeRelease(PS_RequestModeRelease x, PS_InStream stream)
7338 {
7339 uint8 extension;
7340 PS_UnknownSigMap map;
7341
7342 OSCL_UNUSED_ARG(x);
7343
7344 extension = GetBoolean(stream);
7345 /* ------------------------------- */
7346 /* ---- Extension Begins Here ---- */
7347 /* ------------------------------- */
7348 if (extension)
7349 {
7350 map = GetUnknownSigMap(stream);
7351 if (SkipUnreadExtensions(map, stream))
7352 {
7353 ErrorMessage("Decode_RequestModeRelease: Unknown extensions (skipped)");
7354 }
7355 }
7356 }
7357
7358 /* <========================================> */
7359 /* PER-Decoder for ModeDescription (SET-OF) */
7360 /* <========================================> */
Decode_ModeDescription(PS_ModeDescription x,PS_InStream stream)7361 void Decode_ModeDescription(PS_ModeDescription x, PS_InStream stream)
7362 {
7363 uint16 i;
7364 x->size = (uint16) GetInteger(1, 256, stream);
7365 x->item = (PS_ModeElement)
7366 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_ModeElement));
7367 for (i = 0; i < x->size; ++i)
7368 {
7369 Decode_ModeElement(x->item + i, stream);
7370 }
7371 }
7372
7373 /* <======================================> */
7374 /* PER-Decoder for ModeElement (SEQUENCE) */
7375 /* <======================================> */
Decode_ModeElement(PS_ModeElement x,PS_InStream stream)7376 void Decode_ModeElement(PS_ModeElement x, PS_InStream stream)
7377 {
7378 uint8 extension;
7379 PS_UnknownSigMap map;
7380
7381 extension = GetBoolean(stream);
7382 x->option_of_h223ModeParameters = GetBoolean(stream);
7383 Decode_ModeType(&x->modeType, stream);
7384 if (x->option_of_h223ModeParameters)
7385 {
7386 Decode_H223ModeParameters(&x->h223ModeParameters, stream);
7387 }
7388 /* ------------------------------- */
7389 /* ---- Extension Begins Here ---- */
7390 /* ------------------------------- */
7391 x->option_of_v76ModeParameters = OFF;
7392 x->option_of_h2250ModeParameters = OFF;
7393 x->option_of_genericModeParameters = OFF;
7394 if (extension)
7395 {
7396 map = GetUnknownSigMap(stream);
7397 x->option_of_v76ModeParameters = SigMapValue(0, map);
7398 if (x->option_of_v76ModeParameters)
7399 {
7400 ExtensionPrep(map, stream);
7401 Decode_V76ModeParameters(&x->v76ModeParameters, stream);
7402 ReadRemainingBits(stream);
7403 }
7404 x->option_of_h2250ModeParameters = SigMapValue(1, map);
7405 if (x->option_of_h2250ModeParameters)
7406 {
7407 ExtensionPrep(map, stream);
7408 Decode_H2250ModeParameters(&x->h2250ModeParameters, stream);
7409 ReadRemainingBits(stream);
7410 }
7411 x->option_of_genericModeParameters = SigMapValue(2, map);
7412 if (x->option_of_genericModeParameters)
7413 {
7414 ExtensionPrep(map, stream);
7415 Decode_GenericCapability(&x->genericModeParameters, stream);
7416 ReadRemainingBits(stream);
7417 }
7418 if (SkipUnreadExtensions(map, stream))
7419 {
7420 ErrorMessage("Decode_ModeElement: Unknown extensions (skipped)");
7421 }
7422 }
7423 }
7424
7425 /* <=================================> */
7426 /* PER-Decoder for ModeType (CHOICE) */
7427 /* <=================================> */
Decode_ModeType(PS_ModeType x,PS_InStream stream)7428 void Decode_ModeType(PS_ModeType x, PS_InStream stream)
7429 {
7430 x->index = GetChoiceIndex(5, 1, stream);
7431 switch (x->index)
7432 {
7433 case 0:
7434 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
7435 Decode_NonStandardParameter(x->nonStandard, stream);
7436 break;
7437 case 1:
7438 x->videoMode = (PS_VideoMode) OSCL_DEFAULT_MALLOC(sizeof(S_VideoMode));
7439 Decode_VideoMode(x->videoMode, stream);
7440 break;
7441 case 2:
7442 x->audioMode = (PS_AudioMode) OSCL_DEFAULT_MALLOC(sizeof(S_AudioMode));
7443 Decode_AudioMode(x->audioMode, stream);
7444 break;
7445 case 3:
7446 x->dataMode = (PS_DataMode) OSCL_DEFAULT_MALLOC(sizeof(S_DataMode));
7447 Decode_DataMode(x->dataMode, stream);
7448 break;
7449 case 4:
7450 x->encryptionMode = (PS_EncryptionMode) OSCL_DEFAULT_MALLOC(sizeof(S_EncryptionMode));
7451 Decode_EncryptionMode(x->encryptionMode, stream);
7452 break;
7453 /* ------------------------------- */
7454 /* ---- Extension Begins Here ---- */
7455 /* ------------------------------- */
7456 case 5:
7457 GetLengthDet(stream);
7458 x->h235Mode = (PS_H235Mode) OSCL_DEFAULT_MALLOC(sizeof(S_H235Mode));
7459 Decode_H235Mode(x->h235Mode, stream);
7460 ReadRemainingBits(stream);
7461 break;
7462 default:
7463 ErrorMessage("Decode_ModeType: Unsupported extension (skipping)");
7464 SkipOneExtension(stream);
7465 }
7466 }
7467
7468 /* <===================================> */
7469 /* PER-Decoder for H235Mode (SEQUENCE) */
7470 /* <===================================> */
Decode_H235Mode(PS_H235Mode x,PS_InStream stream)7471 void Decode_H235Mode(PS_H235Mode x, PS_InStream stream)
7472 {
7473 uint8 extension;
7474 PS_UnknownSigMap map;
7475
7476 extension = GetBoolean(stream);
7477 Decode_EncryptionAuthenticationAndIntegrity(&x->encryptionAuthenticationAndIntegrity, stream);
7478 Decode_MediaMode(&x->mediaMode, stream);
7479 /* ------------------------------- */
7480 /* ---- Extension Begins Here ---- */
7481 /* ------------------------------- */
7482 if (extension)
7483 {
7484 map = GetUnknownSigMap(stream);
7485 if (SkipUnreadExtensions(map, stream))
7486 {
7487 ErrorMessage("Decode_H235Mode: Unknown extensions (skipped)");
7488 }
7489 }
7490 }
7491
7492 /* <==================================> */
7493 /* PER-Decoder for MediaMode (CHOICE) */
7494 /* <==================================> */
Decode_MediaMode(PS_MediaMode x,PS_InStream stream)7495 void Decode_MediaMode(PS_MediaMode x, PS_InStream stream)
7496 {
7497 x->index = GetChoiceIndex(4, 1, stream);
7498 switch (x->index)
7499 {
7500 case 0:
7501 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
7502 Decode_NonStandardParameter(x->nonStandard, stream);
7503 break;
7504 case 1:
7505 x->videoMode = (PS_VideoMode) OSCL_DEFAULT_MALLOC(sizeof(S_VideoMode));
7506 Decode_VideoMode(x->videoMode, stream);
7507 break;
7508 case 2:
7509 x->audioMode = (PS_AudioMode) OSCL_DEFAULT_MALLOC(sizeof(S_AudioMode));
7510 Decode_AudioMode(x->audioMode, stream);
7511 break;
7512 case 3:
7513 x->dataMode = (PS_DataMode) OSCL_DEFAULT_MALLOC(sizeof(S_DataMode));
7514 Decode_DataMode(x->dataMode, stream);
7515 break;
7516 /* ------------------------------- */
7517 /* ---- Extension Begins Here ---- */
7518 /* ------------------------------- */
7519 default:
7520 ErrorMessage("Decode_MediaMode: Unsupported extension (skipping)");
7521 SkipOneExtension(stream);
7522 }
7523 }
7524
7525 /* <=============================================> */
7526 /* PER-Decoder for H223ModeParameters (SEQUENCE) */
7527 /* <=============================================> */
Decode_H223ModeParameters(PS_H223ModeParameters x,PS_InStream stream)7528 void Decode_H223ModeParameters(PS_H223ModeParameters x, PS_InStream stream)
7529 {
7530 uint8 extension;
7531 PS_UnknownSigMap map;
7532
7533 extension = GetBoolean(stream);
7534 Decode_ModeAdaptationLayerType(&x->modeAdaptationLayerType, stream);
7535 x->segmentableFlag = GetBoolean(stream);
7536 /* ------------------------------- */
7537 /* ---- Extension Begins Here ---- */
7538 /* ------------------------------- */
7539 if (extension)
7540 {
7541 map = GetUnknownSigMap(stream);
7542 if (SkipUnreadExtensions(map, stream))
7543 {
7544 ErrorMessage("Decode_H223ModeParameters: Unknown extensions (skipped)");
7545 }
7546 }
7547 }
7548
7549 /* <================================================> */
7550 /* PER-Decoder for ModeAdaptationLayerType (CHOICE) */
7551 /* <================================================> */
Decode_ModeAdaptationLayerType(PS_ModeAdaptationLayerType x,PS_InStream stream)7552 void Decode_ModeAdaptationLayerType(PS_ModeAdaptationLayerType x, PS_InStream stream)
7553 {
7554 x->index = GetChoiceIndex(6, 1, stream);
7555 switch (x->index)
7556 {
7557 case 0:
7558 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
7559 Decode_NonStandardParameter(x->nonStandard, stream);
7560 break;
7561 case 1:
7562 /* (al1Framed is NULL) */
7563 break;
7564 case 2:
7565 /* (al1NotFramed is NULL) */
7566 break;
7567 case 3:
7568 /* (al2WithoutSequenceNumbers is NULL) */
7569 break;
7570 case 4:
7571 /* (al2WithSequenceNumbers is NULL) */
7572 break;
7573 case 5:
7574 x->modeAl3 = (PS_ModeAl3) OSCL_DEFAULT_MALLOC(sizeof(S_ModeAl3));
7575 Decode_ModeAl3(x->modeAl3, stream);
7576 break;
7577 /* ------------------------------- */
7578 /* ---- Extension Begins Here ---- */
7579 /* ------------------------------- */
7580 case 6:
7581 GetLengthDet(stream);
7582 x->al1M = (PS_H223AL1MParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AL1MParameters));
7583 Decode_H223AL1MParameters(x->al1M, stream);
7584 ReadRemainingBits(stream);
7585 break;
7586 case 7:
7587 GetLengthDet(stream);
7588 x->al2M = (PS_H223AL2MParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AL2MParameters));
7589 Decode_H223AL2MParameters(x->al2M, stream);
7590 ReadRemainingBits(stream);
7591 break;
7592 case 8:
7593 GetLengthDet(stream);
7594 x->al3M = (PS_H223AL3MParameters) OSCL_DEFAULT_MALLOC(sizeof(S_H223AL3MParameters));
7595 Decode_H223AL3MParameters(x->al3M, stream);
7596 ReadRemainingBits(stream);
7597 break;
7598 default:
7599 ErrorMessage("Decode_ModeAdaptationLayerType: Unsupported extension (skipping)");
7600 SkipOneExtension(stream);
7601 }
7602 }
7603
7604 /* <==================================> */
7605 /* PER-Decoder for ModeAl3 (SEQUENCE) */
7606 /* <==================================> */
Decode_ModeAl3(PS_ModeAl3 x,PS_InStream stream)7607 void Decode_ModeAl3(PS_ModeAl3 x, PS_InStream stream)
7608 {
7609 x->controlFieldOctets = (uint8) GetInteger(0, 2, stream);
7610 x->sendBufferSize = GetInteger(0, 16777215, stream);
7611 }
7612
7613 /* <==========================================> */
7614 /* PER-Decoder for V76ModeParameters (CHOICE) */
7615 /* <==========================================> */
Decode_V76ModeParameters(PS_V76ModeParameters x,PS_InStream stream)7616 void Decode_V76ModeParameters(PS_V76ModeParameters x, PS_InStream stream)
7617 {
7618 x->index = GetChoiceIndex(2, 1, stream);
7619 switch (x->index)
7620 {
7621 case 0:
7622 /* (suspendResumewAddress is NULL) */
7623 break;
7624 case 1:
7625 /* (suspendResumewoAddress is NULL) */
7626 break;
7627 /* ------------------------------- */
7628 /* ---- Extension Begins Here ---- */
7629 /* ------------------------------- */
7630 default:
7631 ErrorMessage("Decode_V76ModeParameters: Unsupported extension (skipping)");
7632 SkipOneExtension(stream);
7633 }
7634 }
7635
7636 /* <==============================================> */
7637 /* PER-Decoder for H2250ModeParameters (SEQUENCE) */
7638 /* <==============================================> */
Decode_H2250ModeParameters(PS_H2250ModeParameters x,PS_InStream stream)7639 void Decode_H2250ModeParameters(PS_H2250ModeParameters x, PS_InStream stream)
7640 {
7641 uint8 extension;
7642 PS_UnknownSigMap map;
7643
7644 extension = GetBoolean(stream);
7645 x->option_of_redundancyEncodingMode = GetBoolean(stream);
7646 if (x->option_of_redundancyEncodingMode)
7647 {
7648 Decode_RedundancyEncodingMode(&x->redundancyEncodingMode, stream);
7649 }
7650 /* ------------------------------- */
7651 /* ---- Extension Begins Here ---- */
7652 /* ------------------------------- */
7653 if (extension)
7654 {
7655 map = GetUnknownSigMap(stream);
7656 if (SkipUnreadExtensions(map, stream))
7657 {
7658 ErrorMessage("Decode_H2250ModeParameters: Unknown extensions (skipped)");
7659 }
7660 }
7661 }
7662
7663 /* <=================================================> */
7664 /* PER-Decoder for RedundancyEncodingMode (SEQUENCE) */
7665 /* <=================================================> */
Decode_RedundancyEncodingMode(PS_RedundancyEncodingMode x,PS_InStream stream)7666 void Decode_RedundancyEncodingMode(PS_RedundancyEncodingMode x, PS_InStream stream)
7667 {
7668 uint8 extension;
7669 PS_UnknownSigMap map;
7670
7671 extension = GetBoolean(stream);
7672 x->option_of_secondaryEncoding = GetBoolean(stream);
7673 Decode_RedundancyEncodingMethod(&x->redundancyEncodingMethod, stream);
7674 if (x->option_of_secondaryEncoding)
7675 {
7676 Decode_SecondaryEncoding(&x->secondaryEncoding, stream);
7677 }
7678 /* ------------------------------- */
7679 /* ---- Extension Begins Here ---- */
7680 /* ------------------------------- */
7681 if (extension)
7682 {
7683 map = GetUnknownSigMap(stream);
7684 if (SkipUnreadExtensions(map, stream))
7685 {
7686 ErrorMessage("Decode_RedundancyEncodingMode: Unknown extensions (skipped)");
7687 }
7688 }
7689 }
7690
7691 /* <==========================================> */
7692 /* PER-Decoder for SecondaryEncoding (CHOICE) */
7693 /* <==========================================> */
Decode_SecondaryEncoding(PS_SecondaryEncoding x,PS_InStream stream)7694 void Decode_SecondaryEncoding(PS_SecondaryEncoding x, PS_InStream stream)
7695 {
7696 x->index = GetChoiceIndex(2, 1, stream);
7697 switch (x->index)
7698 {
7699 case 0:
7700 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
7701 Decode_NonStandardParameter(x->nonStandard, stream);
7702 break;
7703 case 1:
7704 x->audioData = (PS_AudioMode) OSCL_DEFAULT_MALLOC(sizeof(S_AudioMode));
7705 Decode_AudioMode(x->audioData, stream);
7706 break;
7707 /* ------------------------------- */
7708 /* ---- Extension Begins Here ---- */
7709 /* ------------------------------- */
7710 default:
7711 ErrorMessage("Decode_SecondaryEncoding: Unsupported extension (skipping)");
7712 SkipOneExtension(stream);
7713 }
7714 }
7715
7716 /* <==================================> */
7717 /* PER-Decoder for VideoMode (CHOICE) */
7718 /* <==================================> */
Decode_VideoMode(PS_VideoMode x,PS_InStream stream)7719 void Decode_VideoMode(PS_VideoMode x, PS_InStream stream)
7720 {
7721 x->index = GetChoiceIndex(5, 1, stream);
7722 switch (x->index)
7723 {
7724 case 0:
7725 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
7726 Decode_NonStandardParameter(x->nonStandard, stream);
7727 break;
7728 case 1:
7729 x->h261VideoMode = (PS_H261VideoMode) OSCL_DEFAULT_MALLOC(sizeof(S_H261VideoMode));
7730 Decode_H261VideoMode(x->h261VideoMode, stream);
7731 break;
7732 case 2:
7733 x->h262VideoMode = (PS_H262VideoMode) OSCL_DEFAULT_MALLOC(sizeof(S_H262VideoMode));
7734 Decode_H262VideoMode(x->h262VideoMode, stream);
7735 break;
7736 case 3:
7737 x->h263VideoMode = (PS_H263VideoMode) OSCL_DEFAULT_MALLOC(sizeof(S_H263VideoMode));
7738 Decode_H263VideoMode(x->h263VideoMode, stream);
7739 break;
7740 case 4:
7741 x->is11172VideoMode = (PS_IS11172VideoMode) OSCL_DEFAULT_MALLOC(sizeof(S_IS11172VideoMode));
7742 Decode_IS11172VideoMode(x->is11172VideoMode, stream);
7743 break;
7744 /* ------------------------------- */
7745 /* ---- Extension Begins Here ---- */
7746 /* ------------------------------- */
7747 case 5:
7748 GetLengthDet(stream);
7749 x->genericVideoMode = (PS_GenericCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GenericCapability));
7750 Decode_GenericCapability(x->genericVideoMode, stream);
7751 ReadRemainingBits(stream);
7752 break;
7753 default:
7754 ErrorMessage("Decode_VideoMode: Unsupported extension (skipping)");
7755 SkipOneExtension(stream);
7756 }
7757 }
7758
7759 /* <========================================> */
7760 /* PER-Decoder for H261VideoMode (SEQUENCE) */
7761 /* <========================================> */
Decode_H261VideoMode(PS_H261VideoMode x,PS_InStream stream)7762 void Decode_H261VideoMode(PS_H261VideoMode x, PS_InStream stream)
7763 {
7764 uint8 extension;
7765 PS_UnknownSigMap map;
7766
7767 extension = GetBoolean(stream);
7768 Decode_Resolution(&x->resolution, stream);
7769 x->bitRate = (uint16) GetInteger(1, 19200, stream);
7770 x->stillImageTransmission = GetBoolean(stream);
7771 /* ------------------------------- */
7772 /* ---- Extension Begins Here ---- */
7773 /* ------------------------------- */
7774 if (extension)
7775 {
7776 map = GetUnknownSigMap(stream);
7777 if (SkipUnreadExtensions(map, stream))
7778 {
7779 ErrorMessage("Decode_H261VideoMode: Unknown extensions (skipped)");
7780 }
7781 }
7782 }
7783
7784 /* <===================================> */
7785 /* PER-Decoder for Resolution (CHOICE) */
7786 /* <===================================> */
Decode_Resolution(PS_Resolution x,PS_InStream stream)7787 void Decode_Resolution(PS_Resolution x, PS_InStream stream)
7788 {
7789 x->index = GetChoiceIndex(2, 0, stream);
7790 switch (x->index)
7791 {
7792 case 0:
7793 /* (qcif is NULL) */
7794 break;
7795 case 1:
7796 /* (cif is NULL) */
7797 break;
7798 default:
7799 ErrorMessageAndLeave("Decode_Resolution: Illegal CHOICE index");
7800 }
7801 }
7802
7803 /* <========================================> */
7804 /* PER-Decoder for H262VideoMode (SEQUENCE) */
7805 /* <========================================> */
Decode_H262VideoMode(PS_H262VideoMode x,PS_InStream stream)7806 void Decode_H262VideoMode(PS_H262VideoMode x, PS_InStream stream)
7807 {
7808 uint8 extension;
7809 PS_UnknownSigMap map;
7810
7811 extension = GetBoolean(stream);
7812 x->option_of_videoBitRate = GetBoolean(stream);
7813 x->option_of_vbvBufferSize = GetBoolean(stream);
7814 x->option_of_samplesPerLine = GetBoolean(stream);
7815 x->option_of_linesPerFrame = GetBoolean(stream);
7816 x->option_of_framesPerSecond = GetBoolean(stream);
7817 x->option_of_luminanceSampleRate = GetBoolean(stream);
7818 Decode_ProfileAndLevel(&x->profileAndLevel, stream);
7819 if (x->option_of_videoBitRate)
7820 {
7821 x->videoBitRate = GetInteger(0, 1073741823, stream);
7822 }
7823 if (x->option_of_vbvBufferSize)
7824 {
7825 x->vbvBufferSize = GetInteger(0, 262143, stream);
7826 }
7827 if (x->option_of_samplesPerLine)
7828 {
7829 x->samplesPerLine = (uint16) GetInteger(0, 16383, stream);
7830 }
7831 if (x->option_of_linesPerFrame)
7832 {
7833 x->linesPerFrame = (uint16) GetInteger(0, 16383, stream);
7834 }
7835 if (x->option_of_framesPerSecond)
7836 {
7837 x->framesPerSecond = (uint8) GetInteger(0, 15, stream);
7838 }
7839 if (x->option_of_luminanceSampleRate)
7840 {
7841 x->luminanceSampleRate = GetInteger(0, 0xffffffff, stream);
7842 }
7843 /* ------------------------------- */
7844 /* ---- Extension Begins Here ---- */
7845 /* ------------------------------- */
7846 if (extension)
7847 {
7848 map = GetUnknownSigMap(stream);
7849 if (SkipUnreadExtensions(map, stream))
7850 {
7851 ErrorMessage("Decode_H262VideoMode: Unknown extensions (skipped)");
7852 }
7853 }
7854 }
7855
7856 /* <========================================> */
7857 /* PER-Decoder for ProfileAndLevel (CHOICE) */
7858 /* <========================================> */
Decode_ProfileAndLevel(PS_ProfileAndLevel x,PS_InStream stream)7859 void Decode_ProfileAndLevel(PS_ProfileAndLevel x, PS_InStream stream)
7860 {
7861 x->index = GetChoiceIndex(11, 1, stream);
7862 switch (x->index)
7863 {
7864 case 0:
7865 /* (profileAndLevel_SPatML is NULL) */
7866 break;
7867 case 1:
7868 /* (profileAndLevel_MPatLL is NULL) */
7869 break;
7870 case 2:
7871 /* (profileAndLevel_MPatML is NULL) */
7872 break;
7873 case 3:
7874 /* (profileAndLevel_MPatH_14 is NULL) */
7875 break;
7876 case 4:
7877 /* (profileAndLevel_MPatHL is NULL) */
7878 break;
7879 case 5:
7880 /* (profileAndLevel_SNRatLL is NULL) */
7881 break;
7882 case 6:
7883 /* (profileAndLevel_SNRatML is NULL) */
7884 break;
7885 case 7:
7886 /* (profileAndLevel_SpatialatH_14 is NULL) */
7887 break;
7888 case 8:
7889 /* (profileAndLevel_HPatML is NULL) */
7890 break;
7891 case 9:
7892 /* (profileAndLevel_HPatH_14 is NULL) */
7893 break;
7894 case 10:
7895 /* (profileAndLevel_HPatHL is NULL) */
7896 break;
7897 /* ------------------------------- */
7898 /* ---- Extension Begins Here ---- */
7899 /* ------------------------------- */
7900 default:
7901 ErrorMessage("Decode_ProfileAndLevel: Unsupported extension (skipping)");
7902 SkipOneExtension(stream);
7903 }
7904 }
7905
7906 /* <========================================> */
7907 /* PER-Decoder for H263VideoMode (SEQUENCE) */
7908 /* <========================================> */
Decode_H263VideoMode(PS_H263VideoMode x,PS_InStream stream)7909 void Decode_H263VideoMode(PS_H263VideoMode x, PS_InStream stream)
7910 {
7911 uint8 extension;
7912 PS_UnknownSigMap map;
7913
7914 extension = GetBoolean(stream);
7915 Decode_H263Resolution(&x->h263Resolution, stream);
7916 x->bitRate = (uint16) GetInteger(1, 19200, stream);
7917 x->unrestrictedVector = GetBoolean(stream);
7918 x->arithmeticCoding = GetBoolean(stream);
7919 x->advancedPrediction = GetBoolean(stream);
7920 x->pbFrames = GetBoolean(stream);
7921 /* ------------------------------- */
7922 /* ---- Extension Begins Here ---- */
7923 /* ------------------------------- */
7924 x->option_of_errorCompensation = OFF;
7925 x->option_of_enhancementLayerInfo = OFF;
7926 x->option_of_h263Options = OFF;
7927 if (extension)
7928 {
7929 map = GetUnknownSigMap(stream);
7930 x->option_of_errorCompensation = SigMapValue(0, map);
7931 if (x->option_of_errorCompensation)
7932 {
7933 ExtensionPrep(map, stream);
7934 x->errorCompensation = GetBoolean(stream);
7935 ReadRemainingBits(stream);
7936 }
7937 x->option_of_enhancementLayerInfo = SigMapValue(1, map);
7938 if (x->option_of_enhancementLayerInfo)
7939 {
7940 ExtensionPrep(map, stream);
7941 Decode_EnhancementLayerInfo(&x->enhancementLayerInfo, stream);
7942 ReadRemainingBits(stream);
7943 }
7944 x->option_of_h263Options = SigMapValue(2, map);
7945 if (x->option_of_h263Options)
7946 {
7947 ExtensionPrep(map, stream);
7948 Decode_H263Options(&x->h263Options, stream);
7949 ReadRemainingBits(stream);
7950 }
7951 if (SkipUnreadExtensions(map, stream))
7952 {
7953 ErrorMessage("Decode_H263VideoMode: Unknown extensions (skipped)");
7954 }
7955 }
7956 }
7957
7958 /* <=======================================> */
7959 /* PER-Decoder for H263Resolution (CHOICE) */
7960 /* <=======================================> */
Decode_H263Resolution(PS_H263Resolution x,PS_InStream stream)7961 void Decode_H263Resolution(PS_H263Resolution x, PS_InStream stream)
7962 {
7963 x->index = GetChoiceIndex(5, 1, stream);
7964 switch (x->index)
7965 {
7966 case 0:
7967 /* (sqcif is NULL) */
7968 break;
7969 case 1:
7970 /* (qcif is NULL) */
7971 break;
7972 case 2:
7973 /* (cif is NULL) */
7974 break;
7975 case 3:
7976 /* (cif4 is NULL) */
7977 break;
7978 case 4:
7979 /* (cif16 is NULL) */
7980 break;
7981 /* ------------------------------- */
7982 /* ---- Extension Begins Here ---- */
7983 /* ------------------------------- */
7984 default:
7985 ErrorMessage("Decode_H263Resolution: Unsupported extension (skipping)");
7986 SkipOneExtension(stream);
7987 }
7988 }
7989
7990 /* <===========================================> */
7991 /* PER-Decoder for IS11172VideoMode (SEQUENCE) */
7992 /* <===========================================> */
Decode_IS11172VideoMode(PS_IS11172VideoMode x,PS_InStream stream)7993 void Decode_IS11172VideoMode(PS_IS11172VideoMode x, PS_InStream stream)
7994 {
7995 uint8 extension;
7996 PS_UnknownSigMap map;
7997
7998 extension = GetBoolean(stream);
7999 x->option_of_videoBitRate = GetBoolean(stream);
8000 x->option_of_vbvBufferSize = GetBoolean(stream);
8001 x->option_of_samplesPerLine = GetBoolean(stream);
8002 x->option_of_linesPerFrame = GetBoolean(stream);
8003 x->option_of_pictureRate = GetBoolean(stream);
8004 x->option_of_luminanceSampleRate = GetBoolean(stream);
8005 x->constrainedBitstream = GetBoolean(stream);
8006 if (x->option_of_videoBitRate)
8007 {
8008 x->videoBitRate = GetInteger(0, 1073741823, stream);
8009 }
8010 if (x->option_of_vbvBufferSize)
8011 {
8012 x->vbvBufferSize = GetInteger(0, 262143, stream);
8013 }
8014 if (x->option_of_samplesPerLine)
8015 {
8016 x->samplesPerLine = (uint16) GetInteger(0, 16383, stream);
8017 }
8018 if (x->option_of_linesPerFrame)
8019 {
8020 x->linesPerFrame = (uint16) GetInteger(0, 16383, stream);
8021 }
8022 if (x->option_of_pictureRate)
8023 {
8024 x->pictureRate = (uint8) GetInteger(0, 15, stream);
8025 }
8026 if (x->option_of_luminanceSampleRate)
8027 {
8028 x->luminanceSampleRate = GetInteger(0, 0xffffffff, stream);
8029 }
8030 /* ------------------------------- */
8031 /* ---- Extension Begins Here ---- */
8032 /* ------------------------------- */
8033 if (extension)
8034 {
8035 map = GetUnknownSigMap(stream);
8036 if (SkipUnreadExtensions(map, stream))
8037 {
8038 ErrorMessage("Decode_IS11172VideoMode: Unknown extensions (skipped)");
8039 }
8040 }
8041 }
8042
8043 /* <==================================> */
8044 /* PER-Decoder for AudioMode (CHOICE) */
8045 /* <==================================> */
Decode_AudioMode(PS_AudioMode x,PS_InStream stream)8046 void Decode_AudioMode(PS_AudioMode x, PS_InStream stream)
8047 {
8048 x->index = GetChoiceIndex(14, 1, stream);
8049 switch (x->index)
8050 {
8051 case 0:
8052 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
8053 Decode_NonStandardParameter(x->nonStandard, stream);
8054 break;
8055 case 1:
8056 /* (g711Alaw64k is NULL) */
8057 break;
8058 case 2:
8059 /* (g711Alaw56k is NULL) */
8060 break;
8061 case 3:
8062 /* (g711Ulaw64k is NULL) */
8063 break;
8064 case 4:
8065 /* (g711Ulaw56k is NULL) */
8066 break;
8067 case 5:
8068 /* (g722_64k is NULL) */
8069 break;
8070 case 6:
8071 /* (g722_56k is NULL) */
8072 break;
8073 case 7:
8074 /* (g722_48k is NULL) */
8075 break;
8076 case 8:
8077 /* (g728 is NULL) */
8078 break;
8079 case 9:
8080 /* (g729 is NULL) */
8081 break;
8082 case 10:
8083 /* (g729AnnexA is NULL) */
8084 break;
8085 case 11:
8086 x->modeG7231 = (PS_ModeG7231) OSCL_DEFAULT_MALLOC(sizeof(S_ModeG7231));
8087 Decode_ModeG7231(x->modeG7231, stream);
8088 break;
8089 case 12:
8090 x->is11172AudioMode = (PS_IS11172AudioMode) OSCL_DEFAULT_MALLOC(sizeof(S_IS11172AudioMode));
8091 Decode_IS11172AudioMode(x->is11172AudioMode, stream);
8092 break;
8093 case 13:
8094 x->is13818AudioMode = (PS_IS13818AudioMode) OSCL_DEFAULT_MALLOC(sizeof(S_IS13818AudioMode));
8095 Decode_IS13818AudioMode(x->is13818AudioMode, stream);
8096 break;
8097 /* ------------------------------- */
8098 /* ---- Extension Begins Here ---- */
8099 /* ------------------------------- */
8100 case 14:
8101 GetLengthDet(stream);
8102 x->g729wAnnexB = (uint16) GetInteger(1, 256, stream);
8103 ReadRemainingBits(stream);
8104 break;
8105 case 15:
8106 GetLengthDet(stream);
8107 x->g729AnnexAwAnnexB = (uint16) GetInteger(1, 256, stream);
8108 ReadRemainingBits(stream);
8109 break;
8110 case 16:
8111 GetLengthDet(stream);
8112 x->g7231AnnexCMode = (PS_G7231AnnexCMode) OSCL_DEFAULT_MALLOC(sizeof(S_G7231AnnexCMode));
8113 Decode_G7231AnnexCMode(x->g7231AnnexCMode, stream);
8114 ReadRemainingBits(stream);
8115 break;
8116 case 17:
8117 GetLengthDet(stream);
8118 x->gsmFullRate = (PS_GSMAudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GSMAudioCapability));
8119 Decode_GSMAudioCapability(x->gsmFullRate, stream);
8120 ReadRemainingBits(stream);
8121 break;
8122 case 18:
8123 GetLengthDet(stream);
8124 x->gsmHalfRate = (PS_GSMAudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GSMAudioCapability));
8125 Decode_GSMAudioCapability(x->gsmHalfRate, stream);
8126 ReadRemainingBits(stream);
8127 break;
8128 case 19:
8129 GetLengthDet(stream);
8130 x->gsmEnhancedFullRate = (PS_GSMAudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GSMAudioCapability));
8131 Decode_GSMAudioCapability(x->gsmEnhancedFullRate, stream);
8132 ReadRemainingBits(stream);
8133 break;
8134 case 20:
8135 GetLengthDet(stream);
8136 x->genericAudioMode = (PS_GenericCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GenericCapability));
8137 Decode_GenericCapability(x->genericAudioMode, stream);
8138 ReadRemainingBits(stream);
8139 break;
8140 case 21:
8141 GetLengthDet(stream);
8142 x->g729Extensions = (PS_G729Extensions) OSCL_DEFAULT_MALLOC(sizeof(S_G729Extensions));
8143 Decode_G729Extensions(x->g729Extensions, stream);
8144 ReadRemainingBits(stream);
8145 break;
8146 default:
8147 ErrorMessage("Decode_AudioMode: Unsupported extension (skipping)");
8148 SkipOneExtension(stream);
8149 }
8150 }
8151
8152 /* <==================================> */
8153 /* PER-Decoder for ModeG7231 (CHOICE) */
8154 /* <==================================> */
Decode_ModeG7231(PS_ModeG7231 x,PS_InStream stream)8155 void Decode_ModeG7231(PS_ModeG7231 x, PS_InStream stream)
8156 {
8157 x->index = GetChoiceIndex(4, 0, stream);
8158 switch (x->index)
8159 {
8160 case 0:
8161 /* (noSilenceSuppressionLowRate is NULL) */
8162 break;
8163 case 1:
8164 /* (noSilenceSuppressionHighRate is NULL) */
8165 break;
8166 case 2:
8167 /* (silenceSuppressionLowRate is NULL) */
8168 break;
8169 case 3:
8170 /* (silenceSuppressionHighRate is NULL) */
8171 break;
8172 default:
8173 ErrorMessageAndLeave("Decode_ModeG7231: Illegal CHOICE index");
8174 }
8175 }
8176
8177 /* <===========================================> */
8178 /* PER-Decoder for IS11172AudioMode (SEQUENCE) */
8179 /* <===========================================> */
Decode_IS11172AudioMode(PS_IS11172AudioMode x,PS_InStream stream)8180 void Decode_IS11172AudioMode(PS_IS11172AudioMode x, PS_InStream stream)
8181 {
8182 uint8 extension;
8183 PS_UnknownSigMap map;
8184
8185 extension = GetBoolean(stream);
8186 Decode_AudioLayer(&x->audioLayer, stream);
8187 Decode_AudioSampling(&x->audioSampling, stream);
8188 Decode_MultichannelType(&x->multichannelType, stream);
8189 x->bitRate = (uint16) GetInteger(1, 448, stream);
8190 /* ------------------------------- */
8191 /* ---- Extension Begins Here ---- */
8192 /* ------------------------------- */
8193 if (extension)
8194 {
8195 map = GetUnknownSigMap(stream);
8196 if (SkipUnreadExtensions(map, stream))
8197 {
8198 ErrorMessage("Decode_IS11172AudioMode: Unknown extensions (skipped)");
8199 }
8200 }
8201 }
8202
8203 /* <=========================================> */
8204 /* PER-Decoder for MultichannelType (CHOICE) */
8205 /* <=========================================> */
Decode_MultichannelType(PS_MultichannelType x,PS_InStream stream)8206 void Decode_MultichannelType(PS_MultichannelType x, PS_InStream stream)
8207 {
8208 x->index = GetChoiceIndex(3, 0, stream);
8209 switch (x->index)
8210 {
8211 case 0:
8212 /* (singleChannel is NULL) */
8213 break;
8214 case 1:
8215 /* (twoChannelStereo is NULL) */
8216 break;
8217 case 2:
8218 /* (twoChannelDual is NULL) */
8219 break;
8220 default:
8221 ErrorMessageAndLeave("Decode_MultichannelType: Illegal CHOICE index");
8222 }
8223 }
8224
8225 /* <======================================> */
8226 /* PER-Decoder for AudioSampling (CHOICE) */
8227 /* <======================================> */
Decode_AudioSampling(PS_AudioSampling x,PS_InStream stream)8228 void Decode_AudioSampling(PS_AudioSampling x, PS_InStream stream)
8229 {
8230 x->index = GetChoiceIndex(3, 0, stream);
8231 switch (x->index)
8232 {
8233 case 0:
8234 /* (audioSampling32k is NULL) */
8235 break;
8236 case 1:
8237 /* (audioSampling44k1 is NULL) */
8238 break;
8239 case 2:
8240 /* (audioSampling48k is NULL) */
8241 break;
8242 default:
8243 ErrorMessageAndLeave("Decode_AudioSampling: Illegal CHOICE index");
8244 }
8245 }
8246
8247 /* <===================================> */
8248 /* PER-Decoder for AudioLayer (CHOICE) */
8249 /* <===================================> */
Decode_AudioLayer(PS_AudioLayer x,PS_InStream stream)8250 void Decode_AudioLayer(PS_AudioLayer x, PS_InStream stream)
8251 {
8252 x->index = GetChoiceIndex(3, 0, stream);
8253 switch (x->index)
8254 {
8255 case 0:
8256 /* (audioLayer1 is NULL) */
8257 break;
8258 case 1:
8259 /* (audioLayer2 is NULL) */
8260 break;
8261 case 2:
8262 /* (audioLayer3 is NULL) */
8263 break;
8264 default:
8265 ErrorMessageAndLeave("Decode_AudioLayer: Illegal CHOICE index");
8266 }
8267 }
8268
8269 /* <===========================================> */
8270 /* PER-Decoder for IS13818AudioMode (SEQUENCE) */
8271 /* <===========================================> */
Decode_IS13818AudioMode(PS_IS13818AudioMode x,PS_InStream stream)8272 void Decode_IS13818AudioMode(PS_IS13818AudioMode x, PS_InStream stream)
8273 {
8274 uint8 extension;
8275 PS_UnknownSigMap map;
8276
8277 extension = GetBoolean(stream);
8278 Decode_Is13818AudioLayer(&x->is13818AudioLayer, stream);
8279 Decode_Is13818AudioSampling(&x->is13818AudioSampling, stream);
8280 Decode_Is13818MultichannelType(&x->is13818MultichannelType, stream);
8281 x->lowFrequencyEnhancement = GetBoolean(stream);
8282 x->multilingual = GetBoolean(stream);
8283 x->bitRate = (uint16) GetInteger(1, 1130, stream);
8284 /* ------------------------------- */
8285 /* ---- Extension Begins Here ---- */
8286 /* ------------------------------- */
8287 if (extension)
8288 {
8289 map = GetUnknownSigMap(stream);
8290 if (SkipUnreadExtensions(map, stream))
8291 {
8292 ErrorMessage("Decode_IS13818AudioMode: Unknown extensions (skipped)");
8293 }
8294 }
8295 }
8296
8297 /* <================================================> */
8298 /* PER-Decoder for Is13818MultichannelType (CHOICE) */
8299 /* <================================================> */
Decode_Is13818MultichannelType(PS_Is13818MultichannelType x,PS_InStream stream)8300 void Decode_Is13818MultichannelType(PS_Is13818MultichannelType x, PS_InStream stream)
8301 {
8302 x->index = GetChoiceIndex(10, 0, stream);
8303 switch (x->index)
8304 {
8305 case 0:
8306 /* (singleChannel is NULL) */
8307 break;
8308 case 1:
8309 /* (twoChannelStereo is NULL) */
8310 break;
8311 case 2:
8312 /* (twoChannelDual is NULL) */
8313 break;
8314 case 3:
8315 /* (threeChannels2_1 is NULL) */
8316 break;
8317 case 4:
8318 /* (threeChannels3_0 is NULL) */
8319 break;
8320 case 5:
8321 /* (fourChannels2_0_2_0 is NULL) */
8322 break;
8323 case 6:
8324 /* (fourChannels2_2 is NULL) */
8325 break;
8326 case 7:
8327 /* (fourChannels3_1 is NULL) */
8328 break;
8329 case 8:
8330 /* (fiveChannels3_0_2_0 is NULL) */
8331 break;
8332 case 9:
8333 /* (fiveChannels3_2 is NULL) */
8334 break;
8335 default:
8336 ErrorMessageAndLeave("Decode_Is13818MultichannelType: Illegal CHOICE index");
8337 }
8338 }
8339
8340 /* <=============================================> */
8341 /* PER-Decoder for Is13818AudioSampling (CHOICE) */
8342 /* <=============================================> */
Decode_Is13818AudioSampling(PS_Is13818AudioSampling x,PS_InStream stream)8343 void Decode_Is13818AudioSampling(PS_Is13818AudioSampling x, PS_InStream stream)
8344 {
8345 x->index = GetChoiceIndex(6, 0, stream);
8346 switch (x->index)
8347 {
8348 case 0:
8349 /* (audioSampling16k is NULL) */
8350 break;
8351 case 1:
8352 /* (audioSampling22k05 is NULL) */
8353 break;
8354 case 2:
8355 /* (audioSampling24k is NULL) */
8356 break;
8357 case 3:
8358 /* (audioSampling32k is NULL) */
8359 break;
8360 case 4:
8361 /* (audioSampling44k1 is NULL) */
8362 break;
8363 case 5:
8364 /* (audioSampling48k is NULL) */
8365 break;
8366 default:
8367 ErrorMessageAndLeave("Decode_Is13818AudioSampling: Illegal CHOICE index");
8368 }
8369 }
8370
8371 /* <==========================================> */
8372 /* PER-Decoder for Is13818AudioLayer (CHOICE) */
8373 /* <==========================================> */
Decode_Is13818AudioLayer(PS_Is13818AudioLayer x,PS_InStream stream)8374 void Decode_Is13818AudioLayer(PS_Is13818AudioLayer x, PS_InStream stream)
8375 {
8376 x->index = GetChoiceIndex(3, 0, stream);
8377 switch (x->index)
8378 {
8379 case 0:
8380 /* (audioLayer1 is NULL) */
8381 break;
8382 case 1:
8383 /* (audioLayer2 is NULL) */
8384 break;
8385 case 2:
8386 /* (audioLayer3 is NULL) */
8387 break;
8388 default:
8389 ErrorMessageAndLeave("Decode_Is13818AudioLayer: Illegal CHOICE index");
8390 }
8391 }
8392
8393 /* <==========================================> */
8394 /* PER-Decoder for G7231AnnexCMode (SEQUENCE) */
8395 /* <==========================================> */
Decode_G7231AnnexCMode(PS_G7231AnnexCMode x,PS_InStream stream)8396 void Decode_G7231AnnexCMode(PS_G7231AnnexCMode x, PS_InStream stream)
8397 {
8398 uint8 extension;
8399 PS_UnknownSigMap map;
8400
8401 extension = GetBoolean(stream);
8402 x->maxAl_sduAudioFrames = (uint16) GetInteger(1, 256, stream);
8403 x->silenceSuppression = GetBoolean(stream);
8404 Decode_ModeG723AnnexCAudioMode(&x->modeG723AnnexCAudioMode, stream);
8405 /* ------------------------------- */
8406 /* ---- Extension Begins Here ---- */
8407 /* ------------------------------- */
8408 if (extension)
8409 {
8410 map = GetUnknownSigMap(stream);
8411 if (SkipUnreadExtensions(map, stream))
8412 {
8413 ErrorMessage("Decode_G7231AnnexCMode: Unknown extensions (skipped)");
8414 }
8415 }
8416 }
8417
8418 /* <==================================================> */
8419 /* PER-Decoder for ModeG723AnnexCAudioMode (SEQUENCE) */
8420 /* <==================================================> */
Decode_ModeG723AnnexCAudioMode(PS_ModeG723AnnexCAudioMode x,PS_InStream stream)8421 void Decode_ModeG723AnnexCAudioMode(PS_ModeG723AnnexCAudioMode x, PS_InStream stream)
8422 {
8423 uint8 extension;
8424 PS_UnknownSigMap map;
8425
8426 extension = GetBoolean(stream);
8427 x->highRateMode0 = (uint8) GetInteger(27, 78, stream);
8428 x->highRateMode1 = (uint8) GetInteger(27, 78, stream);
8429 x->lowRateMode0 = (uint8) GetInteger(23, 66, stream);
8430 x->lowRateMode1 = (uint8) GetInteger(23, 66, stream);
8431 x->sidMode0 = (uint8) GetInteger(6, 17, stream);
8432 x->sidMode1 = (uint8) GetInteger(6, 17, stream);
8433 /* ------------------------------- */
8434 /* ---- Extension Begins Here ---- */
8435 /* ------------------------------- */
8436 if (extension)
8437 {
8438 map = GetUnknownSigMap(stream);
8439 if (SkipUnreadExtensions(map, stream))
8440 {
8441 ErrorMessage("Decode_ModeG723AnnexCAudioMode: Unknown extensions (skipped)");
8442 }
8443 }
8444 }
8445
8446 /* <===================================> */
8447 /* PER-Decoder for DataMode (SEQUENCE) */
8448 /* <===================================> */
Decode_DataMode(PS_DataMode x,PS_InStream stream)8449 void Decode_DataMode(PS_DataMode x, PS_InStream stream)
8450 {
8451 uint8 extension;
8452 PS_UnknownSigMap map;
8453
8454 extension = GetBoolean(stream);
8455 Decode_DmApplication(&x->dmApplication, stream);
8456 x->bitRate = GetInteger(0, 0xffffffff, stream);
8457 /* ------------------------------- */
8458 /* ---- Extension Begins Here ---- */
8459 /* ------------------------------- */
8460 if (extension)
8461 {
8462 map = GetUnknownSigMap(stream);
8463 if (SkipUnreadExtensions(map, stream))
8464 {
8465 ErrorMessage("Decode_DataMode: Unknown extensions (skipped)");
8466 }
8467 }
8468 }
8469
8470 /* <======================================> */
8471 /* PER-Decoder for DmApplication (CHOICE) */
8472 /* <======================================> */
Decode_DmApplication(PS_DmApplication x,PS_InStream stream)8473 void Decode_DmApplication(PS_DmApplication x, PS_InStream stream)
8474 {
8475 x->index = GetChoiceIndex(10, 1, stream);
8476 switch (x->index)
8477 {
8478 case 0:
8479 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
8480 Decode_NonStandardParameter(x->nonStandard, stream);
8481 break;
8482 case 1:
8483 x->t120 = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
8484 Decode_DataProtocolCapability(x->t120, stream);
8485 break;
8486 case 2:
8487 x->dsm_cc = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
8488 Decode_DataProtocolCapability(x->dsm_cc, stream);
8489 break;
8490 case 3:
8491 x->userData = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
8492 Decode_DataProtocolCapability(x->userData, stream);
8493 break;
8494 case 4:
8495 x->t84 = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
8496 Decode_DataProtocolCapability(x->t84, stream);
8497 break;
8498 case 5:
8499 x->t434 = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
8500 Decode_DataProtocolCapability(x->t434, stream);
8501 break;
8502 case 6:
8503 x->h224 = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
8504 Decode_DataProtocolCapability(x->h224, stream);
8505 break;
8506 case 7:
8507 x->dmNlpid = (PS_DmNlpid) OSCL_DEFAULT_MALLOC(sizeof(S_DmNlpid));
8508 Decode_DmNlpid(x->dmNlpid, stream);
8509 break;
8510 case 8:
8511 /* (dsvdControl is NULL) */
8512 break;
8513 case 9:
8514 x->h222DataPartitioning = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
8515 Decode_DataProtocolCapability(x->h222DataPartitioning, stream);
8516 break;
8517 /* ------------------------------- */
8518 /* ---- Extension Begins Here ---- */
8519 /* ------------------------------- */
8520 case 10:
8521 GetLengthDet(stream);
8522 x->t30fax = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
8523 Decode_DataProtocolCapability(x->t30fax, stream);
8524 ReadRemainingBits(stream);
8525 break;
8526 case 11:
8527 GetLengthDet(stream);
8528 x->t140 = (PS_DataProtocolCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataProtocolCapability));
8529 Decode_DataProtocolCapability(x->t140, stream);
8530 ReadRemainingBits(stream);
8531 break;
8532 case 12:
8533 GetLengthDet(stream);
8534 x->dmT38fax = (PS_DmT38fax) OSCL_DEFAULT_MALLOC(sizeof(S_DmT38fax));
8535 Decode_DmT38fax(x->dmT38fax, stream);
8536 ReadRemainingBits(stream);
8537 break;
8538 case 13:
8539 GetLengthDet(stream);
8540 x->genericDataMode = (PS_GenericCapability) OSCL_DEFAULT_MALLOC(sizeof(S_GenericCapability));
8541 Decode_GenericCapability(x->genericDataMode, stream);
8542 ReadRemainingBits(stream);
8543 break;
8544 default:
8545 ErrorMessage("Decode_DmApplication: Unsupported extension (skipping)");
8546 SkipOneExtension(stream);
8547 }
8548 }
8549
8550 /* <===================================> */
8551 /* PER-Decoder for DmT38fax (SEQUENCE) */
8552 /* <===================================> */
Decode_DmT38fax(PS_DmT38fax x,PS_InStream stream)8553 void Decode_DmT38fax(PS_DmT38fax x, PS_InStream stream)
8554 {
8555 Decode_DataProtocolCapability(&x->t38FaxProtocol, stream);
8556 Decode_T38FaxProfile(&x->t38FaxProfile, stream);
8557 }
8558
8559 /* <==================================> */
8560 /* PER-Decoder for DmNlpid (SEQUENCE) */
8561 /* <==================================> */
Decode_DmNlpid(PS_DmNlpid x,PS_InStream stream)8562 void Decode_DmNlpid(PS_DmNlpid x, PS_InStream stream)
8563 {
8564 Decode_DataProtocolCapability(&x->nlpidProtocol, stream);
8565 GetOctetString(1, 0, 0, &x->nlpidData, stream);
8566 }
8567
8568 /* <=======================================> */
8569 /* PER-Decoder for EncryptionMode (CHOICE) */
8570 /* <=======================================> */
Decode_EncryptionMode(PS_EncryptionMode x,PS_InStream stream)8571 void Decode_EncryptionMode(PS_EncryptionMode x, PS_InStream stream)
8572 {
8573 x->index = GetChoiceIndex(2, 1, stream);
8574 switch (x->index)
8575 {
8576 case 0:
8577 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
8578 Decode_NonStandardParameter(x->nonStandard, stream);
8579 break;
8580 case 1:
8581 /* (h233Encryption is NULL) */
8582 break;
8583 /* ------------------------------- */
8584 /* ---- Extension Begins Here ---- */
8585 /* ------------------------------- */
8586 default:
8587 ErrorMessage("Decode_EncryptionMode: Unsupported extension (skipping)");
8588 SkipOneExtension(stream);
8589 }
8590 }
8591
8592 /* <================================================> */
8593 /* PER-Decoder for RoundTripDelayRequest (SEQUENCE) */
8594 /* <================================================> */
Decode_RoundTripDelayRequest(PS_RoundTripDelayRequest x,PS_InStream stream)8595 void Decode_RoundTripDelayRequest(PS_RoundTripDelayRequest x, PS_InStream stream)
8596 {
8597 uint8 extension;
8598 PS_UnknownSigMap map;
8599
8600 extension = GetBoolean(stream);
8601 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
8602 /* ------------------------------- */
8603 /* ---- Extension Begins Here ---- */
8604 /* ------------------------------- */
8605 if (extension)
8606 {
8607 map = GetUnknownSigMap(stream);
8608 if (SkipUnreadExtensions(map, stream))
8609 {
8610 ErrorMessage("Decode_RoundTripDelayRequest: Unknown extensions (skipped)");
8611 }
8612 }
8613 }
8614
8615 /* <=================================================> */
8616 /* PER-Decoder for RoundTripDelayResponse (SEQUENCE) */
8617 /* <=================================================> */
Decode_RoundTripDelayResponse(PS_RoundTripDelayResponse x,PS_InStream stream)8618 void Decode_RoundTripDelayResponse(PS_RoundTripDelayResponse x, PS_InStream stream)
8619 {
8620 uint8 extension;
8621 PS_UnknownSigMap map;
8622
8623 extension = GetBoolean(stream);
8624 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
8625 /* ------------------------------- */
8626 /* ---- Extension Begins Here ---- */
8627 /* ------------------------------- */
8628 if (extension)
8629 {
8630 map = GetUnknownSigMap(stream);
8631 if (SkipUnreadExtensions(map, stream))
8632 {
8633 ErrorMessage("Decode_RoundTripDelayResponse: Unknown extensions (skipped)");
8634 }
8635 }
8636 }
8637
8638 /* <=================================================> */
8639 /* PER-Decoder for MaintenanceLoopRequest (SEQUENCE) */
8640 /* <=================================================> */
Decode_MaintenanceLoopRequest(PS_MaintenanceLoopRequest x,PS_InStream stream)8641 void Decode_MaintenanceLoopRequest(PS_MaintenanceLoopRequest x, PS_InStream stream)
8642 {
8643 uint8 extension;
8644 PS_UnknownSigMap map;
8645
8646 extension = GetBoolean(stream);
8647 Decode_MlRequestType(&x->mlRequestType, stream);
8648 /* ------------------------------- */
8649 /* ---- Extension Begins Here ---- */
8650 /* ------------------------------- */
8651 if (extension)
8652 {
8653 map = GetUnknownSigMap(stream);
8654 if (SkipUnreadExtensions(map, stream))
8655 {
8656 ErrorMessage("Decode_MaintenanceLoopRequest: Unknown extensions (skipped)");
8657 }
8658 }
8659 }
8660
8661 /* <======================================> */
8662 /* PER-Decoder for MlRequestType (CHOICE) */
8663 /* <======================================> */
Decode_MlRequestType(PS_MlRequestType x,PS_InStream stream)8664 void Decode_MlRequestType(PS_MlRequestType x, PS_InStream stream)
8665 {
8666 x->index = GetChoiceIndex(3, 1, stream);
8667 switch (x->index)
8668 {
8669 case 0:
8670 /* (systemLoop is NULL) */
8671 break;
8672 case 1:
8673 x->mediaLoop = (uint16) GetInteger(1, 65535, stream);
8674 break;
8675 case 2:
8676 x->logicalChannelLoop = (uint16) GetInteger(1, 65535, stream);
8677 break;
8678 /* ------------------------------- */
8679 /* ---- Extension Begins Here ---- */
8680 /* ------------------------------- */
8681 default:
8682 ErrorMessage("Decode_MlRequestType: Unsupported extension (skipping)");
8683 SkipOneExtension(stream);
8684 }
8685 }
8686
8687 /* <=============================================> */
8688 /* PER-Decoder for MaintenanceLoopAck (SEQUENCE) */
8689 /* <=============================================> */
Decode_MaintenanceLoopAck(PS_MaintenanceLoopAck x,PS_InStream stream)8690 void Decode_MaintenanceLoopAck(PS_MaintenanceLoopAck x, PS_InStream stream)
8691 {
8692 uint8 extension;
8693 PS_UnknownSigMap map;
8694
8695 extension = GetBoolean(stream);
8696 Decode_MlAckType(&x->mlAckType, stream);
8697 /* ------------------------------- */
8698 /* ---- Extension Begins Here ---- */
8699 /* ------------------------------- */
8700 if (extension)
8701 {
8702 map = GetUnknownSigMap(stream);
8703 if (SkipUnreadExtensions(map, stream))
8704 {
8705 ErrorMessage("Decode_MaintenanceLoopAck: Unknown extensions (skipped)");
8706 }
8707 }
8708 }
8709
8710 /* <==================================> */
8711 /* PER-Decoder for MlAckType (CHOICE) */
8712 /* <==================================> */
Decode_MlAckType(PS_MlAckType x,PS_InStream stream)8713 void Decode_MlAckType(PS_MlAckType x, PS_InStream stream)
8714 {
8715 x->index = GetChoiceIndex(3, 1, stream);
8716 switch (x->index)
8717 {
8718 case 0:
8719 /* (systemLoop is NULL) */
8720 break;
8721 case 1:
8722 x->mediaLoop = (uint16) GetInteger(1, 65535, stream);
8723 break;
8724 case 2:
8725 x->logicalChannelLoop = (uint16) GetInteger(1, 65535, stream);
8726 break;
8727 /* ------------------------------- */
8728 /* ---- Extension Begins Here ---- */
8729 /* ------------------------------- */
8730 default:
8731 ErrorMessage("Decode_MlAckType: Unsupported extension (skipping)");
8732 SkipOneExtension(stream);
8733 }
8734 }
8735
8736 /* <================================================> */
8737 /* PER-Decoder for MaintenanceLoopReject (SEQUENCE) */
8738 /* <================================================> */
Decode_MaintenanceLoopReject(PS_MaintenanceLoopReject x,PS_InStream stream)8739 void Decode_MaintenanceLoopReject(PS_MaintenanceLoopReject x, PS_InStream stream)
8740 {
8741 uint8 extension;
8742 PS_UnknownSigMap map;
8743
8744 extension = GetBoolean(stream);
8745 Decode_MlRejectType(&x->mlRejectType, stream);
8746 Decode_MlRejectCause(&x->mlRejectCause, stream);
8747 /* ------------------------------- */
8748 /* ---- Extension Begins Here ---- */
8749 /* ------------------------------- */
8750 if (extension)
8751 {
8752 map = GetUnknownSigMap(stream);
8753 if (SkipUnreadExtensions(map, stream))
8754 {
8755 ErrorMessage("Decode_MaintenanceLoopReject: Unknown extensions (skipped)");
8756 }
8757 }
8758 }
8759
8760 /* <======================================> */
8761 /* PER-Decoder for MlRejectCause (CHOICE) */
8762 /* <======================================> */
Decode_MlRejectCause(PS_MlRejectCause x,PS_InStream stream)8763 void Decode_MlRejectCause(PS_MlRejectCause x, PS_InStream stream)
8764 {
8765 x->index = GetChoiceIndex(1, 1, stream);
8766 switch (x->index)
8767 {
8768 case 0:
8769 /* (canNotPerformLoop is NULL) */
8770 break;
8771 /* ------------------------------- */
8772 /* ---- Extension Begins Here ---- */
8773 /* ------------------------------- */
8774 default:
8775 ErrorMessage("Decode_MlRejectCause: Unsupported extension (skipping)");
8776 SkipOneExtension(stream);
8777 }
8778 }
8779
8780 /* <=====================================> */
8781 /* PER-Decoder for MlRejectType (CHOICE) */
8782 /* <=====================================> */
Decode_MlRejectType(PS_MlRejectType x,PS_InStream stream)8783 void Decode_MlRejectType(PS_MlRejectType x, PS_InStream stream)
8784 {
8785 x->index = GetChoiceIndex(3, 1, stream);
8786 switch (x->index)
8787 {
8788 case 0:
8789 /* (systemLoop is NULL) */
8790 break;
8791 case 1:
8792 x->mediaLoop = (uint16) GetInteger(1, 65535, stream);
8793 break;
8794 case 2:
8795 x->logicalChannelLoop = (uint16) GetInteger(1, 65535, stream);
8796 break;
8797 /* ------------------------------- */
8798 /* ---- Extension Begins Here ---- */
8799 /* ------------------------------- */
8800 default:
8801 ErrorMessage("Decode_MlRejectType: Unsupported extension (skipping)");
8802 SkipOneExtension(stream);
8803 }
8804 }
8805
8806 /* <====================================================> */
8807 /* PER-Decoder for MaintenanceLoopOffCommand (SEQUENCE) */
8808 /* <====================================================> */
Decode_MaintenanceLoopOffCommand(PS_MaintenanceLoopOffCommand x,PS_InStream stream)8809 void Decode_MaintenanceLoopOffCommand(PS_MaintenanceLoopOffCommand x, PS_InStream stream)
8810 {
8811 uint8 extension;
8812 PS_UnknownSigMap map;
8813
8814 OSCL_UNUSED_ARG(x);
8815
8816 extension = GetBoolean(stream);
8817 /* ------------------------------- */
8818 /* ---- Extension Begins Here ---- */
8819 /* ------------------------------- */
8820 if (extension)
8821 {
8822 map = GetUnknownSigMap(stream);
8823 if (SkipUnreadExtensions(map, stream))
8824 {
8825 ErrorMessage("Decode_MaintenanceLoopOffCommand: Unknown extensions (skipped)");
8826 }
8827 }
8828 }
8829
8830 /* <===================================================> */
8831 /* PER-Decoder for CommunicationModeCommand (SEQUENCE) */
8832 /* <===================================================> */
Decode_CommunicationModeCommand(PS_CommunicationModeCommand x,PS_InStream stream)8833 void Decode_CommunicationModeCommand(PS_CommunicationModeCommand x, PS_InStream stream)
8834 {
8835 uint16 i;
8836 uint8 extension;
8837 PS_UnknownSigMap map;
8838
8839 extension = GetBoolean(stream);
8840 x->size_of_communicationModeTable = (uint16) GetInteger(1, 256, stream);
8841 x->communicationModeTable = (PS_CommunicationModeTableEntry)
8842 OSCL_DEFAULT_MALLOC(x->size_of_communicationModeTable * sizeof(S_CommunicationModeTableEntry));
8843 for (i = 0; i < x->size_of_communicationModeTable; ++i)
8844 {
8845 Decode_CommunicationModeTableEntry(x->communicationModeTable + i, stream);
8846 }
8847 /* ------------------------------- */
8848 /* ---- Extension Begins Here ---- */
8849 /* ------------------------------- */
8850 if (extension)
8851 {
8852 map = GetUnknownSigMap(stream);
8853 if (SkipUnreadExtensions(map, stream))
8854 {
8855 ErrorMessage("Decode_CommunicationModeCommand: Unknown extensions (skipped)");
8856 }
8857 }
8858 }
8859
8860 /* <===================================================> */
8861 /* PER-Decoder for CommunicationModeRequest (SEQUENCE) */
8862 /* <===================================================> */
Decode_CommunicationModeRequest(PS_CommunicationModeRequest x,PS_InStream stream)8863 void Decode_CommunicationModeRequest(PS_CommunicationModeRequest x, PS_InStream stream)
8864 {
8865 uint8 extension;
8866 PS_UnknownSigMap map;
8867
8868 OSCL_UNUSED_ARG(x);
8869
8870 extension = GetBoolean(stream);
8871 /* ------------------------------- */
8872 /* ---- Extension Begins Here ---- */
8873 /* ------------------------------- */
8874 if (extension)
8875 {
8876 map = GetUnknownSigMap(stream);
8877 if (SkipUnreadExtensions(map, stream))
8878 {
8879 ErrorMessage("Decode_CommunicationModeRequest: Unknown extensions (skipped)");
8880 }
8881 }
8882 }
8883
8884 /* <==================================================> */
8885 /* PER-Decoder for CommunicationModeResponse (CHOICE) */
8886 /* <==================================================> */
Decode_CommunicationModeResponse(PS_CommunicationModeResponse x,PS_InStream stream)8887 void Decode_CommunicationModeResponse(PS_CommunicationModeResponse x, PS_InStream stream)
8888 {
8889 uint16 i;
8890 x->index = GetChoiceIndex(1, 1, stream);
8891 switch (x->index)
8892 {
8893 case 0:
8894 x->size = (uint16) GetInteger(1, 256, stream);
8895 x->communicationModeTable = (PS_CommunicationModeTableEntry)
8896 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_CommunicationModeTableEntry));
8897 for (i = 0; i < x->size; ++i)
8898 {
8899 Decode_CommunicationModeTableEntry(x->communicationModeTable + i, stream);
8900 }
8901 break;
8902 /* ------------------------------- */
8903 /* ---- Extension Begins Here ---- */
8904 /* ------------------------------- */
8905 default:
8906 ErrorMessage("Decode_CommunicationModeResponse: Unsupported extension (skipping)");
8907 SkipOneExtension(stream);
8908 }
8909 }
8910
8911 /* <======================================================> */
8912 /* PER-Decoder for CommunicationModeTableEntry (SEQUENCE) */
8913 /* <======================================================> */
Decode_CommunicationModeTableEntry(PS_CommunicationModeTableEntry x,PS_InStream stream)8914 void Decode_CommunicationModeTableEntry(PS_CommunicationModeTableEntry x, PS_InStream stream)
8915 {
8916 uint16 i;
8917 uint8 extension;
8918 PS_UnknownSigMap map;
8919
8920 extension = GetBoolean(stream);
8921 x->option_of_nonStandard = GetBoolean(stream);
8922 x->option_of_associatedSessionID = GetBoolean(stream);
8923 x->option_of_terminalLabel = GetBoolean(stream);
8924 x->option_of_mediaChannel = GetBoolean(stream);
8925 x->option_of_mediaGuaranteedDelivery = GetBoolean(stream);
8926 x->option_of_mediaControlChannel = GetBoolean(stream);
8927 x->option_of_mediaControlGuaranteedDelivery = GetBoolean(stream);
8928 if (x->option_of_nonStandard)
8929 {
8930 x->size_of_nonStandard = (uint16) GetLengthDet(stream);
8931 x->nonStandard = (PS_NonStandardParameter)
8932 OSCL_DEFAULT_MALLOC(x->size_of_nonStandard * sizeof(S_NonStandardParameter));
8933 for (i = 0; i < x->size_of_nonStandard; ++i)
8934 {
8935 Decode_NonStandardParameter(x->nonStandard + i, stream);
8936 }
8937 }
8938 x->sessionID = (uint8) GetInteger(1, 255, stream);
8939 if (x->option_of_associatedSessionID)
8940 {
8941 x->associatedSessionID = (uint8) GetInteger(1, 255, stream);
8942 }
8943 if (x->option_of_terminalLabel)
8944 {
8945 Decode_TerminalLabel(&x->terminalLabel, stream);
8946 }
8947 GetCharString("BMPString", 0, 1, 128, NULL, &x->sessionDescription, stream);
8948 Decode_CmtDataType(&x->cmtDataType, stream);
8949 if (x->option_of_mediaChannel)
8950 {
8951 Decode_TransportAddress(&x->mediaChannel, stream);
8952 }
8953 if (x->option_of_mediaGuaranteedDelivery)
8954 {
8955 x->mediaGuaranteedDelivery = GetBoolean(stream);
8956 }
8957 if (x->option_of_mediaControlChannel)
8958 {
8959 Decode_TransportAddress(&x->mediaControlChannel, stream);
8960 }
8961 if (x->option_of_mediaControlGuaranteedDelivery)
8962 {
8963 x->mediaControlGuaranteedDelivery = GetBoolean(stream);
8964 }
8965 /* ------------------------------- */
8966 /* ---- Extension Begins Here ---- */
8967 /* ------------------------------- */
8968 x->option_of_redundancyEncoding = OFF;
8969 x->option_of_sessionDependency = OFF;
8970 x->option_of_destination = OFF;
8971 if (extension)
8972 {
8973 map = GetUnknownSigMap(stream);
8974 x->option_of_redundancyEncoding = SigMapValue(0, map);
8975 if (x->option_of_redundancyEncoding)
8976 {
8977 ExtensionPrep(map, stream);
8978 Decode_RedundancyEncoding(&x->redundancyEncoding, stream);
8979 ReadRemainingBits(stream);
8980 }
8981 x->option_of_sessionDependency = SigMapValue(1, map);
8982 if (x->option_of_sessionDependency)
8983 {
8984 ExtensionPrep(map, stream);
8985 x->sessionDependency = (uint8) GetInteger(1, 255, stream);
8986 ReadRemainingBits(stream);
8987 }
8988 x->option_of_destination = SigMapValue(2, map);
8989 if (x->option_of_destination)
8990 {
8991 ExtensionPrep(map, stream);
8992 Decode_TerminalLabel(&x->destination, stream);
8993 ReadRemainingBits(stream);
8994 }
8995 if (SkipUnreadExtensions(map, stream))
8996 {
8997 ErrorMessage("Decode_CommunicationModeTableEntry: Unknown extensions (skipped)");
8998 }
8999 }
9000 }
9001
9002 /* <====================================> */
9003 /* PER-Decoder for CmtDataType (CHOICE) */
9004 /* <====================================> */
Decode_CmtDataType(PS_CmtDataType x,PS_InStream stream)9005 void Decode_CmtDataType(PS_CmtDataType x, PS_InStream stream)
9006 {
9007 x->index = GetChoiceIndex(3, 1, stream);
9008 switch (x->index)
9009 {
9010 case 0:
9011 x->videoData = (PS_VideoCapability) OSCL_DEFAULT_MALLOC(sizeof(S_VideoCapability));
9012 Decode_VideoCapability(x->videoData, stream);
9013 break;
9014 case 1:
9015 x->audioData = (PS_AudioCapability) OSCL_DEFAULT_MALLOC(sizeof(S_AudioCapability));
9016 Decode_AudioCapability(x->audioData, stream);
9017 break;
9018 case 2:
9019 x->data = (PS_DataApplicationCapability) OSCL_DEFAULT_MALLOC(sizeof(S_DataApplicationCapability));
9020 Decode_DataApplicationCapability(x->data, stream);
9021 break;
9022 /* ------------------------------- */
9023 /* ---- Extension Begins Here ---- */
9024 /* ------------------------------- */
9025 default:
9026 ErrorMessage("Decode_CmtDataType: Unsupported extension (skipping)");
9027 SkipOneExtension(stream);
9028 }
9029 }
9030
9031 /* <==========================================> */
9032 /* PER-Decoder for ConferenceRequest (CHOICE) */
9033 /* <==========================================> */
Decode_ConferenceRequest(PS_ConferenceRequest x,PS_InStream stream)9034 void Decode_ConferenceRequest(PS_ConferenceRequest x, PS_InStream stream)
9035 {
9036 x->index = GetChoiceIndex(8, 1, stream);
9037 switch (x->index)
9038 {
9039 case 0:
9040 /* (terminalListRequest is NULL) */
9041 break;
9042 case 1:
9043 /* (makeMeChair is NULL) */
9044 break;
9045 case 2:
9046 /* (cancelMakeMeChair is NULL) */
9047 break;
9048 case 3:
9049 x->dropTerminal = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
9050 Decode_TerminalLabel(x->dropTerminal, stream);
9051 break;
9052 case 4:
9053 x->requestTerminalID = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
9054 Decode_TerminalLabel(x->requestTerminalID, stream);
9055 break;
9056 case 5:
9057 /* (enterH243Password is NULL) */
9058 break;
9059 case 6:
9060 /* (enterH243TerminalID is NULL) */
9061 break;
9062 case 7:
9063 /* (enterH243ConferenceID is NULL) */
9064 break;
9065 /* ------------------------------- */
9066 /* ---- Extension Begins Here ---- */
9067 /* ------------------------------- */
9068 case 8:
9069 GetLengthDet(stream);
9070 /* (enterExtensionAddress is NULL) */
9071 SkipOneOctet(stream);
9072 break;
9073 case 9:
9074 GetLengthDet(stream);
9075 /* (requestChairTokenOwner is NULL) */
9076 SkipOneOctet(stream);
9077 break;
9078 case 10:
9079 GetLengthDet(stream);
9080 x->requestTerminalCertificate = (PS_RequestTerminalCertificate) OSCL_DEFAULT_MALLOC(sizeof(S_RequestTerminalCertificate));
9081 Decode_RequestTerminalCertificate(x->requestTerminalCertificate, stream);
9082 ReadRemainingBits(stream);
9083 break;
9084 case 11:
9085 GetLengthDet(stream);
9086 x->broadcastMyLogicalChannel = (uint16) GetInteger(1, 65535, stream);
9087 ReadRemainingBits(stream);
9088 break;
9089 case 12:
9090 GetLengthDet(stream);
9091 x->makeTerminalBroadcaster = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
9092 Decode_TerminalLabel(x->makeTerminalBroadcaster, stream);
9093 ReadRemainingBits(stream);
9094 break;
9095 case 13:
9096 GetLengthDet(stream);
9097 x->sendThisSource = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
9098 Decode_TerminalLabel(x->sendThisSource, stream);
9099 ReadRemainingBits(stream);
9100 break;
9101 case 14:
9102 GetLengthDet(stream);
9103 /* (requestAllTerminalIDs is NULL) */
9104 SkipOneOctet(stream);
9105 break;
9106 case 15:
9107 GetLengthDet(stream);
9108 x->remoteMCRequest = (PS_RemoteMCRequest) OSCL_DEFAULT_MALLOC(sizeof(S_RemoteMCRequest));
9109 Decode_RemoteMCRequest(x->remoteMCRequest, stream);
9110 ReadRemainingBits(stream);
9111 break;
9112 default:
9113 ErrorMessage("Decode_ConferenceRequest: Unsupported extension (skipping)");
9114 SkipOneExtension(stream);
9115 }
9116 }
9117
9118 /* <=====================================================> */
9119 /* PER-Decoder for RequestTerminalCertificate (SEQUENCE) */
9120 /* <=====================================================> */
Decode_RequestTerminalCertificate(PS_RequestTerminalCertificate x,PS_InStream stream)9121 void Decode_RequestTerminalCertificate(PS_RequestTerminalCertificate x, PS_InStream stream)
9122 {
9123 uint8 extension;
9124 PS_UnknownSigMap map;
9125
9126 extension = GetBoolean(stream);
9127 x->option_of_terminalLabel = GetBoolean(stream);
9128 x->option_of_certSelectionCriteria = GetBoolean(stream);
9129 x->option_of_sRandom = GetBoolean(stream);
9130 if (x->option_of_terminalLabel)
9131 {
9132 Decode_TerminalLabel(&x->terminalLabel, stream);
9133 }
9134 if (x->option_of_certSelectionCriteria)
9135 {
9136 Decode_CertSelectionCriteria(&x->certSelectionCriteria, stream);
9137 }
9138 if (x->option_of_sRandom)
9139 {
9140 x->sRandom = GetInteger(1, 0xffffffff, stream);
9141 }
9142 /* ------------------------------- */
9143 /* ---- Extension Begins Here ---- */
9144 /* ------------------------------- */
9145 if (extension)
9146 {
9147 map = GetUnknownSigMap(stream);
9148 if (SkipUnreadExtensions(map, stream))
9149 {
9150 ErrorMessage("Decode_RequestTerminalCertificate: Unknown extensions (skipped)");
9151 }
9152 }
9153 }
9154
9155 /* <===================================================> */
9156 /* PER-Decoder for CertSelectionCriteria (SEQUENCE-OF) */
9157 /* <===================================================> */
Decode_CertSelectionCriteria(PS_CertSelectionCriteria x,PS_InStream stream)9158 void Decode_CertSelectionCriteria(PS_CertSelectionCriteria x, PS_InStream stream)
9159 {
9160 uint16 i;
9161 x->size = (uint8) GetInteger(1, 16, stream);
9162 x->item = (PS_Criteria)
9163 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_Criteria));
9164 for (i = 0; i < x->size; ++i)
9165 {
9166 Decode_Criteria(x->item + i, stream);
9167 }
9168 }
9169
9170 /* <===================================> */
9171 /* PER-Decoder for Criteria (SEQUENCE) */
9172 /* <===================================> */
Decode_Criteria(PS_Criteria x,PS_InStream stream)9173 void Decode_Criteria(PS_Criteria x, PS_InStream stream)
9174 {
9175 uint8 extension;
9176 PS_UnknownSigMap map;
9177
9178 extension = GetBoolean(stream);
9179 GetObjectID(&x->field, stream);
9180 GetOctetString(0, 1, 65535, &x->value, stream);
9181 /* ------------------------------- */
9182 /* ---- Extension Begins Here ---- */
9183 /* ------------------------------- */
9184 if (extension)
9185 {
9186 map = GetUnknownSigMap(stream);
9187 if (SkipUnreadExtensions(map, stream))
9188 {
9189 ErrorMessage("Decode_Criteria: Unknown extensions (skipped)");
9190 }
9191 }
9192 }
9193
9194 /* <========================================> */
9195 /* PER-Decoder for TerminalLabel (SEQUENCE) */
9196 /* <========================================> */
Decode_TerminalLabel(PS_TerminalLabel x,PS_InStream stream)9197 void Decode_TerminalLabel(PS_TerminalLabel x, PS_InStream stream)
9198 {
9199 uint8 extension;
9200 PS_UnknownSigMap map;
9201
9202 extension = GetBoolean(stream);
9203 x->mcuNumber = (uint8) GetInteger(0, 192, stream);
9204 x->terminalNumber = (uint8) GetInteger(0, 192, stream);
9205 /* ------------------------------- */
9206 /* ---- Extension Begins Here ---- */
9207 /* ------------------------------- */
9208 if (extension)
9209 {
9210 map = GetUnknownSigMap(stream);
9211 if (SkipUnreadExtensions(map, stream))
9212 {
9213 ErrorMessage("Decode_TerminalLabel: Unknown extensions (skipped)");
9214 }
9215 }
9216 }
9217
9218 /* <===========================================> */
9219 /* PER-Decoder for ConferenceResponse (CHOICE) */
9220 /* <===========================================> */
Decode_ConferenceResponse(PS_ConferenceResponse x,PS_InStream stream)9221 void Decode_ConferenceResponse(PS_ConferenceResponse x, PS_InStream stream)
9222 {
9223 uint16 i;
9224 x->index = GetChoiceIndex(8, 1, stream);
9225 switch (x->index)
9226 {
9227 case 0:
9228 x->mCTerminalIDResponse = (PS_MCTerminalIDResponse) OSCL_DEFAULT_MALLOC(sizeof(S_MCTerminalIDResponse));
9229 Decode_MCTerminalIDResponse(x->mCTerminalIDResponse, stream);
9230 break;
9231 case 1:
9232 x->terminalIDResponse = (PS_TerminalIDResponse) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalIDResponse));
9233 Decode_TerminalIDResponse(x->terminalIDResponse, stream);
9234 break;
9235 case 2:
9236 x->conferenceIDResponse = (PS_ConferenceIDResponse) OSCL_DEFAULT_MALLOC(sizeof(S_ConferenceIDResponse));
9237 Decode_ConferenceIDResponse(x->conferenceIDResponse, stream);
9238 break;
9239 case 3:
9240 x->passwordResponse = (PS_PasswordResponse) OSCL_DEFAULT_MALLOC(sizeof(S_PasswordResponse));
9241 Decode_PasswordResponse(x->passwordResponse, stream);
9242 break;
9243 case 4:
9244 x->size = (uint16) GetInteger(1, 256, stream);
9245 x->terminalListResponse = (PS_TerminalLabel)
9246 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_TerminalLabel));
9247 for (i = 0; i < x->size; ++i)
9248 {
9249 Decode_TerminalLabel(x->terminalListResponse + i, stream);
9250 }
9251 break;
9252 case 5:
9253 /* (videoCommandReject is NULL) */
9254 break;
9255 case 6:
9256 /* (terminalDropReject is NULL) */
9257 break;
9258 case 7:
9259 x->makeMeChairResponse = (PS_MakeMeChairResponse) OSCL_DEFAULT_MALLOC(sizeof(S_MakeMeChairResponse));
9260 Decode_MakeMeChairResponse(x->makeMeChairResponse, stream);
9261 break;
9262 /* ------------------------------- */
9263 /* ---- Extension Begins Here ---- */
9264 /* ------------------------------- */
9265 case 8:
9266 GetLengthDet(stream);
9267 x->extensionAddressResponse = (PS_ExtensionAddressResponse) OSCL_DEFAULT_MALLOC(sizeof(S_ExtensionAddressResponse));
9268 Decode_ExtensionAddressResponse(x->extensionAddressResponse, stream);
9269 ReadRemainingBits(stream);
9270 break;
9271 case 9:
9272 GetLengthDet(stream);
9273 x->chairTokenOwnerResponse = (PS_ChairTokenOwnerResponse) OSCL_DEFAULT_MALLOC(sizeof(S_ChairTokenOwnerResponse));
9274 Decode_ChairTokenOwnerResponse(x->chairTokenOwnerResponse, stream);
9275 ReadRemainingBits(stream);
9276 break;
9277 case 10:
9278 GetLengthDet(stream);
9279 x->terminalCertificateResponse = (PS_TerminalCertificateResponse) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalCertificateResponse));
9280 Decode_TerminalCertificateResponse(x->terminalCertificateResponse, stream);
9281 ReadRemainingBits(stream);
9282 break;
9283 case 11:
9284 GetLengthDet(stream);
9285 x->broadcastMyLogicalChannelResponse = (PS_BroadcastMyLogicalChannelResponse) OSCL_DEFAULT_MALLOC(sizeof(S_BroadcastMyLogicalChannelResponse));
9286 Decode_BroadcastMyLogicalChannelResponse(x->broadcastMyLogicalChannelResponse, stream);
9287 ReadRemainingBits(stream);
9288 break;
9289 case 12:
9290 GetLengthDet(stream);
9291 x->makeTerminalBroadcasterResponse = (PS_MakeTerminalBroadcasterResponse) OSCL_DEFAULT_MALLOC(sizeof(S_MakeTerminalBroadcasterResponse));
9292 Decode_MakeTerminalBroadcasterResponse(x->makeTerminalBroadcasterResponse, stream);
9293 ReadRemainingBits(stream);
9294 break;
9295 case 13:
9296 GetLengthDet(stream);
9297 x->sendThisSourceResponse = (PS_SendThisSourceResponse) OSCL_DEFAULT_MALLOC(sizeof(S_SendThisSourceResponse));
9298 Decode_SendThisSourceResponse(x->sendThisSourceResponse, stream);
9299 ReadRemainingBits(stream);
9300 break;
9301 case 14:
9302 GetLengthDet(stream);
9303 x->requestAllTerminalIDsResponse = (PS_RequestAllTerminalIDsResponse) OSCL_DEFAULT_MALLOC(sizeof(S_RequestAllTerminalIDsResponse));
9304 Decode_RequestAllTerminalIDsResponse(x->requestAllTerminalIDsResponse, stream);
9305 ReadRemainingBits(stream);
9306 break;
9307 case 15:
9308 GetLengthDet(stream);
9309 x->remoteMCResponse = (PS_RemoteMCResponse) OSCL_DEFAULT_MALLOC(sizeof(S_RemoteMCResponse));
9310 Decode_RemoteMCResponse(x->remoteMCResponse, stream);
9311 ReadRemainingBits(stream);
9312 break;
9313 default:
9314 ErrorMessage("Decode_ConferenceResponse: Unsupported extension (skipping)");
9315 SkipOneExtension(stream);
9316 }
9317 }
9318
9319 /* <===============================================> */
9320 /* PER-Decoder for SendThisSourceResponse (CHOICE) */
9321 /* <===============================================> */
Decode_SendThisSourceResponse(PS_SendThisSourceResponse x,PS_InStream stream)9322 void Decode_SendThisSourceResponse(PS_SendThisSourceResponse x, PS_InStream stream)
9323 {
9324 x->index = GetChoiceIndex(2, 1, stream);
9325 switch (x->index)
9326 {
9327 case 0:
9328 /* (grantedSendThisSource is NULL) */
9329 break;
9330 case 1:
9331 /* (deniedSendThisSource is NULL) */
9332 break;
9333 /* ------------------------------- */
9334 /* ---- Extension Begins Here ---- */
9335 /* ------------------------------- */
9336 default:
9337 ErrorMessage("Decode_SendThisSourceResponse: Unsupported extension (skipping)");
9338 SkipOneExtension(stream);
9339 }
9340 }
9341
9342 /* <========================================================> */
9343 /* PER-Decoder for MakeTerminalBroadcasterResponse (CHOICE) */
9344 /* <========================================================> */
Decode_MakeTerminalBroadcasterResponse(PS_MakeTerminalBroadcasterResponse x,PS_InStream stream)9345 void Decode_MakeTerminalBroadcasterResponse(PS_MakeTerminalBroadcasterResponse x, PS_InStream stream)
9346 {
9347 x->index = GetChoiceIndex(2, 1, stream);
9348 switch (x->index)
9349 {
9350 case 0:
9351 /* (grantedMakeTerminalBroadcaster is NULL) */
9352 break;
9353 case 1:
9354 /* (deniedMakeTerminalBroadcaster is NULL) */
9355 break;
9356 /* ------------------------------- */
9357 /* ---- Extension Begins Here ---- */
9358 /* ------------------------------- */
9359 default:
9360 ErrorMessage("Decode_MakeTerminalBroadcasterResponse: Unsupported extension (skipping)");
9361 SkipOneExtension(stream);
9362 }
9363 }
9364
9365 /* <==========================================================> */
9366 /* PER-Decoder for BroadcastMyLogicalChannelResponse (CHOICE) */
9367 /* <==========================================================> */
Decode_BroadcastMyLogicalChannelResponse(PS_BroadcastMyLogicalChannelResponse x,PS_InStream stream)9368 void Decode_BroadcastMyLogicalChannelResponse(PS_BroadcastMyLogicalChannelResponse x, PS_InStream stream)
9369 {
9370 x->index = GetChoiceIndex(2, 1, stream);
9371 switch (x->index)
9372 {
9373 case 0:
9374 /* (grantedBroadcastMyLogicalChannel is NULL) */
9375 break;
9376 case 1:
9377 /* (deniedBroadcastMyLogicalChannel is NULL) */
9378 break;
9379 /* ------------------------------- */
9380 /* ---- Extension Begins Here ---- */
9381 /* ------------------------------- */
9382 default:
9383 ErrorMessage("Decode_BroadcastMyLogicalChannelResponse: Unsupported extension (skipping)");
9384 SkipOneExtension(stream);
9385 }
9386 }
9387
9388 /* <======================================================> */
9389 /* PER-Decoder for TerminalCertificateResponse (SEQUENCE) */
9390 /* <======================================================> */
Decode_TerminalCertificateResponse(PS_TerminalCertificateResponse x,PS_InStream stream)9391 void Decode_TerminalCertificateResponse(PS_TerminalCertificateResponse x, PS_InStream stream)
9392 {
9393 uint8 extension;
9394 PS_UnknownSigMap map;
9395
9396 extension = GetBoolean(stream);
9397 x->option_of_terminalLabel = GetBoolean(stream);
9398 x->option_of_certificateResponse = GetBoolean(stream);
9399 if (x->option_of_terminalLabel)
9400 {
9401 Decode_TerminalLabel(&x->terminalLabel, stream);
9402 }
9403 if (x->option_of_certificateResponse)
9404 {
9405 GetOctetString(0, 1, 65535, &x->certificateResponse, stream);
9406 }
9407 /* ------------------------------- */
9408 /* ---- Extension Begins Here ---- */
9409 /* ------------------------------- */
9410 if (extension)
9411 {
9412 map = GetUnknownSigMap(stream);
9413 if (SkipUnreadExtensions(map, stream))
9414 {
9415 ErrorMessage("Decode_TerminalCertificateResponse: Unknown extensions (skipped)");
9416 }
9417 }
9418 }
9419
9420 /* <==================================================> */
9421 /* PER-Decoder for ChairTokenOwnerResponse (SEQUENCE) */
9422 /* <==================================================> */
Decode_ChairTokenOwnerResponse(PS_ChairTokenOwnerResponse x,PS_InStream stream)9423 void Decode_ChairTokenOwnerResponse(PS_ChairTokenOwnerResponse x, PS_InStream stream)
9424 {
9425 uint8 extension;
9426 PS_UnknownSigMap map;
9427
9428 extension = GetBoolean(stream);
9429 Decode_TerminalLabel(&x->terminalLabel, stream);
9430 GetOctetString(0, 1, 128, &x->terminalID, stream);
9431 /* ------------------------------- */
9432 /* ---- Extension Begins Here ---- */
9433 /* ------------------------------- */
9434 if (extension)
9435 {
9436 map = GetUnknownSigMap(stream);
9437 if (SkipUnreadExtensions(map, stream))
9438 {
9439 ErrorMessage("Decode_ChairTokenOwnerResponse: Unknown extensions (skipped)");
9440 }
9441 }
9442 }
9443
9444 /* <===================================================> */
9445 /* PER-Decoder for ExtensionAddressResponse (SEQUENCE) */
9446 /* <===================================================> */
Decode_ExtensionAddressResponse(PS_ExtensionAddressResponse x,PS_InStream stream)9447 void Decode_ExtensionAddressResponse(PS_ExtensionAddressResponse x, PS_InStream stream)
9448 {
9449 uint8 extension;
9450 PS_UnknownSigMap map;
9451
9452 extension = GetBoolean(stream);
9453 GetOctetString(0, 1, 128, &x->extensionAddress, stream);
9454 /* ------------------------------- */
9455 /* ---- Extension Begins Here ---- */
9456 /* ------------------------------- */
9457 if (extension)
9458 {
9459 map = GetUnknownSigMap(stream);
9460 if (SkipUnreadExtensions(map, stream))
9461 {
9462 ErrorMessage("Decode_ExtensionAddressResponse: Unknown extensions (skipped)");
9463 }
9464 }
9465 }
9466
9467 /* <============================================> */
9468 /* PER-Decoder for MakeMeChairResponse (CHOICE) */
9469 /* <============================================> */
Decode_MakeMeChairResponse(PS_MakeMeChairResponse x,PS_InStream stream)9470 void Decode_MakeMeChairResponse(PS_MakeMeChairResponse x, PS_InStream stream)
9471 {
9472 x->index = GetChoiceIndex(2, 1, stream);
9473 switch (x->index)
9474 {
9475 case 0:
9476 /* (grantedChairToken is NULL) */
9477 break;
9478 case 1:
9479 /* (deniedChairToken is NULL) */
9480 break;
9481 /* ------------------------------- */
9482 /* ---- Extension Begins Here ---- */
9483 /* ------------------------------- */
9484 default:
9485 ErrorMessage("Decode_MakeMeChairResponse: Unsupported extension (skipping)");
9486 SkipOneExtension(stream);
9487 }
9488 }
9489
9490 /* <===========================================> */
9491 /* PER-Decoder for PasswordResponse (SEQUENCE) */
9492 /* <===========================================> */
Decode_PasswordResponse(PS_PasswordResponse x,PS_InStream stream)9493 void Decode_PasswordResponse(PS_PasswordResponse x, PS_InStream stream)
9494 {
9495 uint8 extension;
9496 PS_UnknownSigMap map;
9497
9498 extension = GetBoolean(stream);
9499 Decode_TerminalLabel(&x->terminalLabel, stream);
9500 GetOctetString(0, 1, 32, &x->password, stream);
9501 /* ------------------------------- */
9502 /* ---- Extension Begins Here ---- */
9503 /* ------------------------------- */
9504 if (extension)
9505 {
9506 map = GetUnknownSigMap(stream);
9507 if (SkipUnreadExtensions(map, stream))
9508 {
9509 ErrorMessage("Decode_PasswordResponse: Unknown extensions (skipped)");
9510 }
9511 }
9512 }
9513
9514 /* <===============================================> */
9515 /* PER-Decoder for ConferenceIDResponse (SEQUENCE) */
9516 /* <===============================================> */
Decode_ConferenceIDResponse(PS_ConferenceIDResponse x,PS_InStream stream)9517 void Decode_ConferenceIDResponse(PS_ConferenceIDResponse x, PS_InStream stream)
9518 {
9519 uint8 extension;
9520 PS_UnknownSigMap map;
9521
9522 extension = GetBoolean(stream);
9523 Decode_TerminalLabel(&x->terminalLabel, stream);
9524 GetOctetString(0, 1, 32, &x->conferenceID, stream);
9525 /* ------------------------------- */
9526 /* ---- Extension Begins Here ---- */
9527 /* ------------------------------- */
9528 if (extension)
9529 {
9530 map = GetUnknownSigMap(stream);
9531 if (SkipUnreadExtensions(map, stream))
9532 {
9533 ErrorMessage("Decode_ConferenceIDResponse: Unknown extensions (skipped)");
9534 }
9535 }
9536 }
9537
9538 /* <=============================================> */
9539 /* PER-Decoder for TerminalIDResponse (SEQUENCE) */
9540 /* <=============================================> */
Decode_TerminalIDResponse(PS_TerminalIDResponse x,PS_InStream stream)9541 void Decode_TerminalIDResponse(PS_TerminalIDResponse x, PS_InStream stream)
9542 {
9543 uint8 extension;
9544 PS_UnknownSigMap map;
9545
9546 extension = GetBoolean(stream);
9547 Decode_TerminalLabel(&x->terminalLabel, stream);
9548 GetOctetString(0, 1, 128, &x->terminalID, stream);
9549 /* ------------------------------- */
9550 /* ---- Extension Begins Here ---- */
9551 /* ------------------------------- */
9552 if (extension)
9553 {
9554 map = GetUnknownSigMap(stream);
9555 if (SkipUnreadExtensions(map, stream))
9556 {
9557 ErrorMessage("Decode_TerminalIDResponse: Unknown extensions (skipped)");
9558 }
9559 }
9560 }
9561
9562 /* <===============================================> */
9563 /* PER-Decoder for MCTerminalIDResponse (SEQUENCE) */
9564 /* <===============================================> */
Decode_MCTerminalIDResponse(PS_MCTerminalIDResponse x,PS_InStream stream)9565 void Decode_MCTerminalIDResponse(PS_MCTerminalIDResponse x, PS_InStream stream)
9566 {
9567 uint8 extension;
9568 PS_UnknownSigMap map;
9569
9570 extension = GetBoolean(stream);
9571 Decode_TerminalLabel(&x->terminalLabel, stream);
9572 GetOctetString(0, 1, 128, &x->terminalID, stream);
9573 /* ------------------------------- */
9574 /* ---- Extension Begins Here ---- */
9575 /* ------------------------------- */
9576 if (extension)
9577 {
9578 map = GetUnknownSigMap(stream);
9579 if (SkipUnreadExtensions(map, stream))
9580 {
9581 ErrorMessage("Decode_MCTerminalIDResponse: Unknown extensions (skipped)");
9582 }
9583 }
9584 }
9585
9586 /* <========================================================> */
9587 /* PER-Decoder for RequestAllTerminalIDsResponse (SEQUENCE) */
9588 /* <========================================================> */
Decode_RequestAllTerminalIDsResponse(PS_RequestAllTerminalIDsResponse x,PS_InStream stream)9589 void Decode_RequestAllTerminalIDsResponse(PS_RequestAllTerminalIDsResponse x, PS_InStream stream)
9590 {
9591 uint16 i;
9592 uint8 extension;
9593 PS_UnknownSigMap map;
9594
9595 extension = GetBoolean(stream);
9596 x->size_of_terminalInformation = (uint16) GetLengthDet(stream);
9597 x->terminalInformation = (PS_TerminalInformation)
9598 OSCL_DEFAULT_MALLOC(x->size_of_terminalInformation * sizeof(S_TerminalInformation));
9599 for (i = 0; i < x->size_of_terminalInformation; ++i)
9600 {
9601 Decode_TerminalInformation(x->terminalInformation + i, stream);
9602 }
9603 /* ------------------------------- */
9604 /* ---- Extension Begins Here ---- */
9605 /* ------------------------------- */
9606 if (extension)
9607 {
9608 map = GetUnknownSigMap(stream);
9609 if (SkipUnreadExtensions(map, stream))
9610 {
9611 ErrorMessage("Decode_RequestAllTerminalIDsResponse: Unknown extensions (skipped)");
9612 }
9613 }
9614 }
9615
9616 /* <==============================================> */
9617 /* PER-Decoder for TerminalInformation (SEQUENCE) */
9618 /* <==============================================> */
Decode_TerminalInformation(PS_TerminalInformation x,PS_InStream stream)9619 void Decode_TerminalInformation(PS_TerminalInformation x, PS_InStream stream)
9620 {
9621 uint8 extension;
9622 PS_UnknownSigMap map;
9623
9624 extension = GetBoolean(stream);
9625 Decode_TerminalLabel(&x->terminalLabel, stream);
9626 GetOctetString(0, 1, 128, &x->terminalID, stream);
9627 /* ------------------------------- */
9628 /* ---- Extension Begins Here ---- */
9629 /* ------------------------------- */
9630 if (extension)
9631 {
9632 map = GetUnknownSigMap(stream);
9633 if (SkipUnreadExtensions(map, stream))
9634 {
9635 ErrorMessage("Decode_TerminalInformation: Unknown extensions (skipped)");
9636 }
9637 }
9638 }
9639
9640 /* <========================================> */
9641 /* PER-Decoder for RemoteMCRequest (CHOICE) */
9642 /* <========================================> */
Decode_RemoteMCRequest(PS_RemoteMCRequest x,PS_InStream stream)9643 void Decode_RemoteMCRequest(PS_RemoteMCRequest x, PS_InStream stream)
9644 {
9645 x->index = GetChoiceIndex(3, 1, stream);
9646 switch (x->index)
9647 {
9648 case 0:
9649 /* (masterActivate is NULL) */
9650 break;
9651 case 1:
9652 /* (slaveActivate is NULL) */
9653 break;
9654 case 2:
9655 /* (deActivate is NULL) */
9656 break;
9657 /* ------------------------------- */
9658 /* ---- Extension Begins Here ---- */
9659 /* ------------------------------- */
9660 default:
9661 ErrorMessage("Decode_RemoteMCRequest: Unsupported extension (skipping)");
9662 SkipOneExtension(stream);
9663 }
9664 }
9665
9666 /* <=========================================> */
9667 /* PER-Decoder for RemoteMCResponse (CHOICE) */
9668 /* <=========================================> */
Decode_RemoteMCResponse(PS_RemoteMCResponse x,PS_InStream stream)9669 void Decode_RemoteMCResponse(PS_RemoteMCResponse x, PS_InStream stream)
9670 {
9671 x->index = GetChoiceIndex(2, 1, stream);
9672 switch (x->index)
9673 {
9674 case 0:
9675 /* (accept is NULL) */
9676 break;
9677 case 1:
9678 x->reject = (PS_Reject) OSCL_DEFAULT_MALLOC(sizeof(S_Reject));
9679 Decode_Reject(x->reject, stream);
9680 break;
9681 /* ------------------------------- */
9682 /* ---- Extension Begins Here ---- */
9683 /* ------------------------------- */
9684 default:
9685 ErrorMessage("Decode_RemoteMCResponse: Unsupported extension (skipping)");
9686 SkipOneExtension(stream);
9687 }
9688 }
9689
9690 /* <===============================> */
9691 /* PER-Decoder for Reject (CHOICE) */
9692 /* <===============================> */
Decode_Reject(PS_Reject x,PS_InStream stream)9693 void Decode_Reject(PS_Reject x, PS_InStream stream)
9694 {
9695 x->index = GetChoiceIndex(2, 1, stream);
9696 switch (x->index)
9697 {
9698 case 0:
9699 /* (unspecified is NULL) */
9700 break;
9701 case 1:
9702 /* (functionNotSupported is NULL) */
9703 break;
9704 /* ------------------------------- */
9705 /* ---- Extension Begins Here ---- */
9706 /* ------------------------------- */
9707 default:
9708 ErrorMessage("Decode_Reject: Unsupported extension (skipping)");
9709 SkipOneExtension(stream);
9710 }
9711 }
9712
9713 /* <=========================================> */
9714 /* PER-Decoder for MultilinkRequest (CHOICE) */
9715 /* <=========================================> */
Decode_MultilinkRequest(PS_MultilinkRequest x,PS_InStream stream)9716 void Decode_MultilinkRequest(PS_MultilinkRequest x, PS_InStream stream)
9717 {
9718 x->index = GetChoiceIndex(5, 1, stream);
9719 switch (x->index)
9720 {
9721 case 0:
9722 x->nonStandard = (PS_NonStandardMessage) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardMessage));
9723 Decode_NonStandardMessage(x->nonStandard, stream);
9724 break;
9725 case 1:
9726 x->callInformation = (PS_CallInformation) OSCL_DEFAULT_MALLOC(sizeof(S_CallInformation));
9727 Decode_CallInformation(x->callInformation, stream);
9728 break;
9729 case 2:
9730 x->addConnection = (PS_AddConnection) OSCL_DEFAULT_MALLOC(sizeof(S_AddConnection));
9731 Decode_AddConnection(x->addConnection, stream);
9732 break;
9733 case 3:
9734 x->removeConnection = (PS_RemoveConnection) OSCL_DEFAULT_MALLOC(sizeof(S_RemoveConnection));
9735 Decode_RemoveConnection(x->removeConnection, stream);
9736 break;
9737 case 4:
9738 x->maximumHeaderInterval = (PS_MaximumHeaderInterval) OSCL_DEFAULT_MALLOC(sizeof(S_MaximumHeaderInterval));
9739 Decode_MaximumHeaderInterval(x->maximumHeaderInterval, stream);
9740 break;
9741 /* ------------------------------- */
9742 /* ---- Extension Begins Here ---- */
9743 /* ------------------------------- */
9744 default:
9745 ErrorMessage("Decode_MultilinkRequest: Unsupported extension (skipping)");
9746 SkipOneExtension(stream);
9747 }
9748 }
9749
9750 /* <================================================> */
9751 /* PER-Decoder for MaximumHeaderInterval (SEQUENCE) */
9752 /* <================================================> */
Decode_MaximumHeaderInterval(PS_MaximumHeaderInterval x,PS_InStream stream)9753 void Decode_MaximumHeaderInterval(PS_MaximumHeaderInterval x, PS_InStream stream)
9754 {
9755 uint8 extension;
9756 PS_UnknownSigMap map;
9757
9758 extension = GetBoolean(stream);
9759 Decode_RequestType(&x->requestType, stream);
9760 /* ------------------------------- */
9761 /* ---- Extension Begins Here ---- */
9762 /* ------------------------------- */
9763 if (extension)
9764 {
9765 map = GetUnknownSigMap(stream);
9766 if (SkipUnreadExtensions(map, stream))
9767 {
9768 ErrorMessage("Decode_MaximumHeaderInterval: Unknown extensions (skipped)");
9769 }
9770 }
9771 }
9772
9773 /* <====================================> */
9774 /* PER-Decoder for RequestType (CHOICE) */
9775 /* <====================================> */
Decode_RequestType(PS_RequestType x,PS_InStream stream)9776 void Decode_RequestType(PS_RequestType x, PS_InStream stream)
9777 {
9778 x->index = GetChoiceIndex(2, 1, stream);
9779 switch (x->index)
9780 {
9781 case 0:
9782 /* (currentIntervalInformation is NULL) */
9783 break;
9784 case 1:
9785 x->requestedInterval = (uint16) GetInteger(0, 65535, stream);
9786 break;
9787 /* ------------------------------- */
9788 /* ---- Extension Begins Here ---- */
9789 /* ------------------------------- */
9790 default:
9791 ErrorMessage("Decode_RequestType: Unsupported extension (skipping)");
9792 SkipOneExtension(stream);
9793 }
9794 }
9795
9796 /* <===========================================> */
9797 /* PER-Decoder for RemoveConnection (SEQUENCE) */
9798 /* <===========================================> */
Decode_RemoveConnection(PS_RemoveConnection x,PS_InStream stream)9799 void Decode_RemoveConnection(PS_RemoveConnection x, PS_InStream stream)
9800 {
9801 uint8 extension;
9802 PS_UnknownSigMap map;
9803
9804 extension = GetBoolean(stream);
9805 Decode_ConnectionIdentifier(&x->connectionIdentifier, stream);
9806 /* ------------------------------- */
9807 /* ---- Extension Begins Here ---- */
9808 /* ------------------------------- */
9809 if (extension)
9810 {
9811 map = GetUnknownSigMap(stream);
9812 if (SkipUnreadExtensions(map, stream))
9813 {
9814 ErrorMessage("Decode_RemoveConnection: Unknown extensions (skipped)");
9815 }
9816 }
9817 }
9818
9819 /* <========================================> */
9820 /* PER-Decoder for AddConnection (SEQUENCE) */
9821 /* <========================================> */
Decode_AddConnection(PS_AddConnection x,PS_InStream stream)9822 void Decode_AddConnection(PS_AddConnection x, PS_InStream stream)
9823 {
9824 uint8 extension;
9825 PS_UnknownSigMap map;
9826
9827 extension = GetBoolean(stream);
9828 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
9829 Decode_DialingInformation(&x->dialingInformation, stream);
9830 /* ------------------------------- */
9831 /* ---- Extension Begins Here ---- */
9832 /* ------------------------------- */
9833 if (extension)
9834 {
9835 map = GetUnknownSigMap(stream);
9836 if (SkipUnreadExtensions(map, stream))
9837 {
9838 ErrorMessage("Decode_AddConnection: Unknown extensions (skipped)");
9839 }
9840 }
9841 }
9842
9843 /* <==========================================> */
9844 /* PER-Decoder for CallInformation (SEQUENCE) */
9845 /* <==========================================> */
Decode_CallInformation(PS_CallInformation x,PS_InStream stream)9846 void Decode_CallInformation(PS_CallInformation x, PS_InStream stream)
9847 {
9848 uint8 extension;
9849 PS_UnknownSigMap map;
9850
9851 extension = GetBoolean(stream);
9852 x->maxNumberOfAdditionalConnections = (uint16) GetInteger(1, 65535, stream);
9853 /* ------------------------------- */
9854 /* ---- Extension Begins Here ---- */
9855 /* ------------------------------- */
9856 if (extension)
9857 {
9858 map = GetUnknownSigMap(stream);
9859 if (SkipUnreadExtensions(map, stream))
9860 {
9861 ErrorMessage("Decode_CallInformation: Unknown extensions (skipped)");
9862 }
9863 }
9864 }
9865
9866 /* <==========================================> */
9867 /* PER-Decoder for MultilinkResponse (CHOICE) */
9868 /* <==========================================> */
Decode_MultilinkResponse(PS_MultilinkResponse x,PS_InStream stream)9869 void Decode_MultilinkResponse(PS_MultilinkResponse x, PS_InStream stream)
9870 {
9871 x->index = GetChoiceIndex(5, 1, stream);
9872 switch (x->index)
9873 {
9874 case 0:
9875 x->nonStandard = (PS_NonStandardMessage) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardMessage));
9876 Decode_NonStandardMessage(x->nonStandard, stream);
9877 break;
9878 case 1:
9879 x->respCallInformation = (PS_RespCallInformation) OSCL_DEFAULT_MALLOC(sizeof(S_RespCallInformation));
9880 Decode_RespCallInformation(x->respCallInformation, stream);
9881 break;
9882 case 2:
9883 x->respAddConnection = (PS_RespAddConnection) OSCL_DEFAULT_MALLOC(sizeof(S_RespAddConnection));
9884 Decode_RespAddConnection(x->respAddConnection, stream);
9885 break;
9886 case 3:
9887 x->respRemoveConnection = (PS_RespRemoveConnection) OSCL_DEFAULT_MALLOC(sizeof(S_RespRemoveConnection));
9888 Decode_RespRemoveConnection(x->respRemoveConnection, stream);
9889 break;
9890 case 4:
9891 x->respMaximumHeaderInterval = (PS_RespMaximumHeaderInterval) OSCL_DEFAULT_MALLOC(sizeof(S_RespMaximumHeaderInterval));
9892 Decode_RespMaximumHeaderInterval(x->respMaximumHeaderInterval, stream);
9893 break;
9894 /* ------------------------------- */
9895 /* ---- Extension Begins Here ---- */
9896 /* ------------------------------- */
9897 default:
9898 ErrorMessage("Decode_MultilinkResponse: Unsupported extension (skipping)");
9899 SkipOneExtension(stream);
9900 }
9901 }
9902
9903 /* <====================================================> */
9904 /* PER-Decoder for RespMaximumHeaderInterval (SEQUENCE) */
9905 /* <====================================================> */
Decode_RespMaximumHeaderInterval(PS_RespMaximumHeaderInterval x,PS_InStream stream)9906 void Decode_RespMaximumHeaderInterval(PS_RespMaximumHeaderInterval x, PS_InStream stream)
9907 {
9908 uint8 extension;
9909 PS_UnknownSigMap map;
9910
9911 extension = GetBoolean(stream);
9912 x->currentInterval = (uint16) GetInteger(0, 65535, stream);
9913 /* ------------------------------- */
9914 /* ---- Extension Begins Here ---- */
9915 /* ------------------------------- */
9916 if (extension)
9917 {
9918 map = GetUnknownSigMap(stream);
9919 if (SkipUnreadExtensions(map, stream))
9920 {
9921 ErrorMessage("Decode_RespMaximumHeaderInterval: Unknown extensions (skipped)");
9922 }
9923 }
9924 }
9925
9926 /* <===============================================> */
9927 /* PER-Decoder for RespRemoveConnection (SEQUENCE) */
9928 /* <===============================================> */
Decode_RespRemoveConnection(PS_RespRemoveConnection x,PS_InStream stream)9929 void Decode_RespRemoveConnection(PS_RespRemoveConnection x, PS_InStream stream)
9930 {
9931 uint8 extension;
9932 PS_UnknownSigMap map;
9933
9934 extension = GetBoolean(stream);
9935 Decode_ConnectionIdentifier(&x->connectionIdentifier, stream);
9936 /* ------------------------------- */
9937 /* ---- Extension Begins Here ---- */
9938 /* ------------------------------- */
9939 if (extension)
9940 {
9941 map = GetUnknownSigMap(stream);
9942 if (SkipUnreadExtensions(map, stream))
9943 {
9944 ErrorMessage("Decode_RespRemoveConnection: Unknown extensions (skipped)");
9945 }
9946 }
9947 }
9948
9949 /* <============================================> */
9950 /* PER-Decoder for RespAddConnection (SEQUENCE) */
9951 /* <============================================> */
Decode_RespAddConnection(PS_RespAddConnection x,PS_InStream stream)9952 void Decode_RespAddConnection(PS_RespAddConnection x, PS_InStream stream)
9953 {
9954 uint8 extension;
9955 PS_UnknownSigMap map;
9956
9957 extension = GetBoolean(stream);
9958 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
9959 Decode_ResponseCode(&x->responseCode, stream);
9960 /* ------------------------------- */
9961 /* ---- Extension Begins Here ---- */
9962 /* ------------------------------- */
9963 if (extension)
9964 {
9965 map = GetUnknownSigMap(stream);
9966 if (SkipUnreadExtensions(map, stream))
9967 {
9968 ErrorMessage("Decode_RespAddConnection: Unknown extensions (skipped)");
9969 }
9970 }
9971 }
9972
9973 /* <=====================================> */
9974 /* PER-Decoder for ResponseCode (CHOICE) */
9975 /* <=====================================> */
Decode_ResponseCode(PS_ResponseCode x,PS_InStream stream)9976 void Decode_ResponseCode(PS_ResponseCode x, PS_InStream stream)
9977 {
9978 x->index = GetChoiceIndex(2, 1, stream);
9979 switch (x->index)
9980 {
9981 case 0:
9982 /* (accepted is NULL) */
9983 break;
9984 case 1:
9985 x->rejected = (PS_Rejected) OSCL_DEFAULT_MALLOC(sizeof(S_Rejected));
9986 Decode_Rejected(x->rejected, stream);
9987 break;
9988 /* ------------------------------- */
9989 /* ---- Extension Begins Here ---- */
9990 /* ------------------------------- */
9991 default:
9992 ErrorMessage("Decode_ResponseCode: Unsupported extension (skipping)");
9993 SkipOneExtension(stream);
9994 }
9995 }
9996
9997 /* <=================================> */
9998 /* PER-Decoder for Rejected (CHOICE) */
9999 /* <=================================> */
Decode_Rejected(PS_Rejected x,PS_InStream stream)10000 void Decode_Rejected(PS_Rejected x, PS_InStream stream)
10001 {
10002 x->index = GetChoiceIndex(2, 1, stream);
10003 switch (x->index)
10004 {
10005 case 0:
10006 /* (connectionsNotAvailable is NULL) */
10007 break;
10008 case 1:
10009 /* (userRejected is NULL) */
10010 break;
10011 /* ------------------------------- */
10012 /* ---- Extension Begins Here ---- */
10013 /* ------------------------------- */
10014 default:
10015 ErrorMessage("Decode_Rejected: Unsupported extension (skipping)");
10016 SkipOneExtension(stream);
10017 }
10018 }
10019
10020 /* <==============================================> */
10021 /* PER-Decoder for RespCallInformation (SEQUENCE) */
10022 /* <==============================================> */
Decode_RespCallInformation(PS_RespCallInformation x,PS_InStream stream)10023 void Decode_RespCallInformation(PS_RespCallInformation x, PS_InStream stream)
10024 {
10025 uint8 extension;
10026 PS_UnknownSigMap map;
10027
10028 extension = GetBoolean(stream);
10029 Decode_DialingInformation(&x->dialingInformation, stream);
10030 x->callAssociationNumber = GetInteger(0, 0xffffffff, stream);
10031 /* ------------------------------- */
10032 /* ---- Extension Begins Here ---- */
10033 /* ------------------------------- */
10034 if (extension)
10035 {
10036 map = GetUnknownSigMap(stream);
10037 if (SkipUnreadExtensions(map, stream))
10038 {
10039 ErrorMessage("Decode_RespCallInformation: Unknown extensions (skipped)");
10040 }
10041 }
10042 }
10043
10044 /* <============================================> */
10045 /* PER-Decoder for MultilinkIndication (CHOICE) */
10046 /* <============================================> */
Decode_MultilinkIndication(PS_MultilinkIndication x,PS_InStream stream)10047 void Decode_MultilinkIndication(PS_MultilinkIndication x, PS_InStream stream)
10048 {
10049 x->index = GetChoiceIndex(3, 1, stream);
10050 switch (x->index)
10051 {
10052 case 0:
10053 x->nonStandard = (PS_NonStandardMessage) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardMessage));
10054 Decode_NonStandardMessage(x->nonStandard, stream);
10055 break;
10056 case 1:
10057 x->crcDesired = (PS_CrcDesired) OSCL_DEFAULT_MALLOC(sizeof(S_CrcDesired));
10058 Decode_CrcDesired(x->crcDesired, stream);
10059 break;
10060 case 2:
10061 x->excessiveError = (PS_ExcessiveError) OSCL_DEFAULT_MALLOC(sizeof(S_ExcessiveError));
10062 Decode_ExcessiveError(x->excessiveError, stream);
10063 break;
10064 /* ------------------------------- */
10065 /* ---- Extension Begins Here ---- */
10066 /* ------------------------------- */
10067 default:
10068 ErrorMessage("Decode_MultilinkIndication: Unsupported extension (skipping)");
10069 SkipOneExtension(stream);
10070 }
10071 }
10072
10073 /* <=========================================> */
10074 /* PER-Decoder for ExcessiveError (SEQUENCE) */
10075 /* <=========================================> */
Decode_ExcessiveError(PS_ExcessiveError x,PS_InStream stream)10076 void Decode_ExcessiveError(PS_ExcessiveError x, PS_InStream stream)
10077 {
10078 uint8 extension;
10079 PS_UnknownSigMap map;
10080
10081 extension = GetBoolean(stream);
10082 Decode_ConnectionIdentifier(&x->connectionIdentifier, stream);
10083 /* ------------------------------- */
10084 /* ---- Extension Begins Here ---- */
10085 /* ------------------------------- */
10086 if (extension)
10087 {
10088 map = GetUnknownSigMap(stream);
10089 if (SkipUnreadExtensions(map, stream))
10090 {
10091 ErrorMessage("Decode_ExcessiveError: Unknown extensions (skipped)");
10092 }
10093 }
10094 }
10095
10096 /* <=====================================> */
10097 /* PER-Decoder for CrcDesired (SEQUENCE) */
10098 /* <=====================================> */
Decode_CrcDesired(PS_CrcDesired x,PS_InStream stream)10099 void Decode_CrcDesired(PS_CrcDesired x, PS_InStream stream)
10100 {
10101 uint8 extension;
10102 PS_UnknownSigMap map;
10103
10104 OSCL_UNUSED_ARG(x);
10105
10106 extension = GetBoolean(stream);
10107 /* ------------------------------- */
10108 /* ---- Extension Begins Here ---- */
10109 /* ------------------------------- */
10110 if (extension)
10111 {
10112 map = GetUnknownSigMap(stream);
10113 if (SkipUnreadExtensions(map, stream))
10114 {
10115 ErrorMessage("Decode_CrcDesired: Unknown extensions (skipped)");
10116 }
10117 }
10118 }
10119
10120 /* <===========================================> */
10121 /* PER-Decoder for DialingInformation (CHOICE) */
10122 /* <===========================================> */
Decode_DialingInformation(PS_DialingInformation x,PS_InStream stream)10123 void Decode_DialingInformation(PS_DialingInformation x, PS_InStream stream)
10124 {
10125 uint16 i;
10126 x->index = GetChoiceIndex(3, 1, stream);
10127 switch (x->index)
10128 {
10129 case 0:
10130 x->nonStandard = (PS_NonStandardMessage) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardMessage));
10131 Decode_NonStandardMessage(x->nonStandard, stream);
10132 break;
10133 case 1:
10134 x->size = (uint16) GetInteger(1, 65535, stream);
10135 x->differential = (PS_DialingInformationNumber)
10136 OSCL_DEFAULT_MALLOC(x->size * sizeof(S_DialingInformationNumber));
10137 for (i = 0; i < x->size; ++i)
10138 {
10139 Decode_DialingInformationNumber(x->differential + i, stream);
10140 }
10141 break;
10142 case 2:
10143 x->infoNotAvailable = (uint16) GetInteger(1, 65535, stream);
10144 break;
10145 /* ------------------------------- */
10146 /* ---- Extension Begins Here ---- */
10147 /* ------------------------------- */
10148 default:
10149 ErrorMessage("Decode_DialingInformation: Unsupported extension (skipping)");
10150 SkipOneExtension(stream);
10151 }
10152 }
10153
10154 /* <===================================================> */
10155 /* PER-Decoder for DialingInformationNumber (SEQUENCE) */
10156 /* <===================================================> */
Decode_DialingInformationNumber(PS_DialingInformationNumber x,PS_InStream stream)10157 void Decode_DialingInformationNumber(PS_DialingInformationNumber x, PS_InStream stream)
10158 {
10159 uint16 i;
10160 uint8 extension;
10161 PS_UnknownSigMap map;
10162
10163 extension = GetBoolean(stream);
10164 x->option_of_subAddress = GetBoolean(stream);
10165 GetCharString("NumericString", 0, 0, 40, NULL, &x->networkAddress, stream);
10166 if (x->option_of_subAddress)
10167 {
10168 GetCharString("IA5String", 0, 1, 40, NULL, &x->subAddress, stream);
10169 }
10170 x->size_of_networkType = (uint8) GetInteger(1, 255, stream);
10171 x->networkType = (PS_DialingInformationNetworkType)
10172 OSCL_DEFAULT_MALLOC(x->size_of_networkType * sizeof(S_DialingInformationNetworkType));
10173 for (i = 0; i < x->size_of_networkType; ++i)
10174 {
10175 Decode_DialingInformationNetworkType(x->networkType + i, stream);
10176 }
10177 /* ------------------------------- */
10178 /* ---- Extension Begins Here ---- */
10179 /* ------------------------------- */
10180 if (extension)
10181 {
10182 map = GetUnknownSigMap(stream);
10183 if (SkipUnreadExtensions(map, stream))
10184 {
10185 ErrorMessage("Decode_DialingInformationNumber: Unknown extensions (skipped)");
10186 }
10187 }
10188 }
10189
10190 /* <======================================================> */
10191 /* PER-Decoder for DialingInformationNetworkType (CHOICE) */
10192 /* <======================================================> */
Decode_DialingInformationNetworkType(PS_DialingInformationNetworkType x,PS_InStream stream)10193 void Decode_DialingInformationNetworkType(PS_DialingInformationNetworkType x, PS_InStream stream)
10194 {
10195 x->index = GetChoiceIndex(3, 1, stream);
10196 switch (x->index)
10197 {
10198 case 0:
10199 x->nonStandard = (PS_NonStandardMessage) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardMessage));
10200 Decode_NonStandardMessage(x->nonStandard, stream);
10201 break;
10202 case 1:
10203 /* (n_isdn is NULL) */
10204 break;
10205 case 2:
10206 /* (gstn is NULL) */
10207 break;
10208 /* ------------------------------- */
10209 /* ---- Extension Begins Here ---- */
10210 /* ------------------------------- */
10211 default:
10212 ErrorMessage("Decode_DialingInformationNetworkType: Unsupported extension (skipping)");
10213 SkipOneExtension(stream);
10214 }
10215 }
10216
10217 /* <===============================================> */
10218 /* PER-Decoder for ConnectionIdentifier (SEQUENCE) */
10219 /* <===============================================> */
Decode_ConnectionIdentifier(PS_ConnectionIdentifier x,PS_InStream stream)10220 void Decode_ConnectionIdentifier(PS_ConnectionIdentifier x, PS_InStream stream)
10221 {
10222 uint8 extension;
10223 PS_UnknownSigMap map;
10224
10225 extension = GetBoolean(stream);
10226 x->channelTag = GetInteger(0, 0xffffffff, stream);
10227 x->sequenceNumber = GetInteger(0, 0xffffffff, stream);
10228 /* ------------------------------- */
10229 /* ---- Extension Begins Here ---- */
10230 /* ------------------------------- */
10231 if (extension)
10232 {
10233 map = GetUnknownSigMap(stream);
10234 if (SkipUnreadExtensions(map, stream))
10235 {
10236 ErrorMessage("Decode_ConnectionIdentifier: Unknown extensions (skipped)");
10237 }
10238 }
10239 }
10240
10241 /* <====================================================> */
10242 /* PER-Decoder for LogicalChannelRateRequest (SEQUENCE) */
10243 /* <====================================================> */
Decode_LogicalChannelRateRequest(PS_LogicalChannelRateRequest x,PS_InStream stream)10244 void Decode_LogicalChannelRateRequest(PS_LogicalChannelRateRequest x, PS_InStream stream)
10245 {
10246 uint8 extension;
10247 PS_UnknownSigMap map;
10248
10249 extension = GetBoolean(stream);
10250 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
10251 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
10252 x->maximumBitRate = GetInteger(0, 0xffffffff, stream);
10253 /* ------------------------------- */
10254 /* ---- Extension Begins Here ---- */
10255 /* ------------------------------- */
10256 if (extension)
10257 {
10258 map = GetUnknownSigMap(stream);
10259 if (SkipUnreadExtensions(map, stream))
10260 {
10261 ErrorMessage("Decode_LogicalChannelRateRequest: Unknown extensions (skipped)");
10262 }
10263 }
10264 }
10265
10266 /* <========================================================> */
10267 /* PER-Decoder for LogicalChannelRateAcknowledge (SEQUENCE) */
10268 /* <========================================================> */
Decode_LogicalChannelRateAcknowledge(PS_LogicalChannelRateAcknowledge x,PS_InStream stream)10269 void Decode_LogicalChannelRateAcknowledge(PS_LogicalChannelRateAcknowledge x, PS_InStream stream)
10270 {
10271 uint8 extension;
10272 PS_UnknownSigMap map;
10273
10274 extension = GetBoolean(stream);
10275 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
10276 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
10277 x->maximumBitRate = GetInteger(0, 0xffffffff, stream);
10278 /* ------------------------------- */
10279 /* ---- Extension Begins Here ---- */
10280 /* ------------------------------- */
10281 if (extension)
10282 {
10283 map = GetUnknownSigMap(stream);
10284 if (SkipUnreadExtensions(map, stream))
10285 {
10286 ErrorMessage("Decode_LogicalChannelRateAcknowledge: Unknown extensions (skipped)");
10287 }
10288 }
10289 }
10290
10291 /* <===================================================> */
10292 /* PER-Decoder for LogicalChannelRateReject (SEQUENCE) */
10293 /* <===================================================> */
Decode_LogicalChannelRateReject(PS_LogicalChannelRateReject x,PS_InStream stream)10294 void Decode_LogicalChannelRateReject(PS_LogicalChannelRateReject x, PS_InStream stream)
10295 {
10296 uint8 extension;
10297 PS_UnknownSigMap map;
10298
10299 extension = GetBoolean(stream);
10300 x->option_of_currentMaximumBitRate = GetBoolean(stream);
10301 x->sequenceNumber = (uint8) GetInteger(0, 255, stream);
10302 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
10303 Decode_LogicalChannelRateRejectReason(&x->rejectReason, stream);
10304 if (x->option_of_currentMaximumBitRate)
10305 {
10306 x->currentMaximumBitRate = GetInteger(0, 0xffffffff, stream);
10307 }
10308 /* ------------------------------- */
10309 /* ---- Extension Begins Here ---- */
10310 /* ------------------------------- */
10311 if (extension)
10312 {
10313 map = GetUnknownSigMap(stream);
10314 if (SkipUnreadExtensions(map, stream))
10315 {
10316 ErrorMessage("Decode_LogicalChannelRateReject: Unknown extensions (skipped)");
10317 }
10318 }
10319 }
10320
10321 /* <=======================================================> */
10322 /* PER-Decoder for LogicalChannelRateRejectReason (CHOICE) */
10323 /* <=======================================================> */
Decode_LogicalChannelRateRejectReason(PS_LogicalChannelRateRejectReason x,PS_InStream stream)10324 void Decode_LogicalChannelRateRejectReason(PS_LogicalChannelRateRejectReason x, PS_InStream stream)
10325 {
10326 x->index = GetChoiceIndex(2, 1, stream);
10327 switch (x->index)
10328 {
10329 case 0:
10330 /* (undefinedReason is NULL) */
10331 break;
10332 case 1:
10333 /* (insufficientResources is NULL) */
10334 break;
10335 /* ------------------------------- */
10336 /* ---- Extension Begins Here ---- */
10337 /* ------------------------------- */
10338 default:
10339 ErrorMessage("Decode_LogicalChannelRateRejectReason: Unsupported extension (skipping)");
10340 SkipOneExtension(stream);
10341 }
10342 }
10343
10344 /* <====================================================> */
10345 /* PER-Decoder for LogicalChannelRateRelease (SEQUENCE) */
10346 /* <====================================================> */
Decode_LogicalChannelRateRelease(PS_LogicalChannelRateRelease x,PS_InStream stream)10347 void Decode_LogicalChannelRateRelease(PS_LogicalChannelRateRelease x, PS_InStream stream)
10348 {
10349 uint8 extension;
10350 PS_UnknownSigMap map;
10351
10352 OSCL_UNUSED_ARG(x);
10353
10354 extension = GetBoolean(stream);
10355 /* ------------------------------- */
10356 /* ---- Extension Begins Here ---- */
10357 /* ------------------------------- */
10358 if (extension)
10359 {
10360 map = GetUnknownSigMap(stream);
10361 if (SkipUnreadExtensions(map, stream))
10362 {
10363 ErrorMessage("Decode_LogicalChannelRateRelease: Unknown extensions (skipped)");
10364 }
10365 }
10366 }
10367
10368 /* <==================================================> */
10369 /* PER-Decoder for SendTerminalCapabilitySet (CHOICE) */
10370 /* <==================================================> */
Decode_SendTerminalCapabilitySet(PS_SendTerminalCapabilitySet x,PS_InStream stream)10371 void Decode_SendTerminalCapabilitySet(PS_SendTerminalCapabilitySet x, PS_InStream stream)
10372 {
10373 x->index = GetChoiceIndex(2, 1, stream);
10374 switch (x->index)
10375 {
10376 case 0:
10377 x->specificRequest = (PS_SpecificRequest) OSCL_DEFAULT_MALLOC(sizeof(S_SpecificRequest));
10378 Decode_SpecificRequest(x->specificRequest, stream);
10379 break;
10380 case 1:
10381 /* (genericRequest is NULL) */
10382 break;
10383 /* ------------------------------- */
10384 /* ---- Extension Begins Here ---- */
10385 /* ------------------------------- */
10386 default:
10387 ErrorMessage("Decode_SendTerminalCapabilitySet: Unsupported extension (skipping)");
10388 SkipOneExtension(stream);
10389 }
10390 }
10391
10392 /* <==========================================> */
10393 /* PER-Decoder for SpecificRequest (SEQUENCE) */
10394 /* <==========================================> */
Decode_SpecificRequest(PS_SpecificRequest x,PS_InStream stream)10395 void Decode_SpecificRequest(PS_SpecificRequest x, PS_InStream stream)
10396 {
10397 uint16 i;
10398 uint8 extension;
10399 PS_UnknownSigMap map;
10400
10401 extension = GetBoolean(stream);
10402 x->option_of_capabilityTableEntryNumbers = GetBoolean(stream);
10403 x->option_of_capabilityDescriptorNumbers = GetBoolean(stream);
10404 x->multiplexCapability = GetBoolean(stream);
10405 if (x->option_of_capabilityTableEntryNumbers)
10406 {
10407 x->size_of_capabilityTableEntryNumbers = (uint16) GetInteger(1, 65535, stream);
10408 x->capabilityTableEntryNumbers = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_capabilityTableEntryNumbers * sizeof(uint32));
10409 for (i = 0; i < x->size_of_capabilityTableEntryNumbers; ++i)
10410 {
10411 x->capabilityTableEntryNumbers[i] = GetInteger(1, 65535, stream);
10412 }
10413 }
10414 if (x->option_of_capabilityDescriptorNumbers)
10415 {
10416 x->size_of_capabilityDescriptorNumbers = (uint16) GetInteger(1, 256, stream);
10417 x->capabilityDescriptorNumbers = (uint32*) OSCL_DEFAULT_MALLOC(x->size_of_capabilityDescriptorNumbers * sizeof(uint32));
10418 for (i = 0; i < x->size_of_capabilityDescriptorNumbers; ++i)
10419 {
10420 x->capabilityDescriptorNumbers[i] = GetInteger(0, 255, stream);
10421 }
10422 }
10423 /* ------------------------------- */
10424 /* ---- Extension Begins Here ---- */
10425 /* ------------------------------- */
10426 if (extension)
10427 {
10428 map = GetUnknownSigMap(stream);
10429 if (SkipUnreadExtensions(map, stream))
10430 {
10431 ErrorMessage("Decode_SpecificRequest: Unknown extensions (skipped)");
10432 }
10433 }
10434 }
10435
10436 /* <==========================================> */
10437 /* PER-Decoder for EncryptionCommand (CHOICE) */
10438 /* <==========================================> */
Decode_EncryptionCommand(PS_EncryptionCommand x,PS_InStream stream)10439 void Decode_EncryptionCommand(PS_EncryptionCommand x, PS_InStream stream)
10440 {
10441 x->index = GetChoiceIndex(3, 1, stream);
10442 switch (x->index)
10443 {
10444 case 0:
10445 x->encryptionSE = (PS_OCTETSTRING) OSCL_DEFAULT_MALLOC(sizeof(S_OCTETSTRING));
10446 GetOctetString(1, 0, 0, x->encryptionSE, stream);
10447 break;
10448 case 1:
10449 /* (encryptionIVRequest is NULL) */
10450 break;
10451 case 2:
10452 x->encryptionAlgorithmID = (PS_EncryptionAlgorithmID) OSCL_DEFAULT_MALLOC(sizeof(S_EncryptionAlgorithmID));
10453 Decode_EncryptionAlgorithmID(x->encryptionAlgorithmID, stream);
10454 break;
10455 /* ------------------------------- */
10456 /* ---- Extension Begins Here ---- */
10457 /* ------------------------------- */
10458 default:
10459 ErrorMessage("Decode_EncryptionCommand: Unsupported extension (skipping)");
10460 SkipOneExtension(stream);
10461 }
10462 }
10463
10464 /* <================================================> */
10465 /* PER-Decoder for EncryptionAlgorithmID (SEQUENCE) */
10466 /* <================================================> */
Decode_EncryptionAlgorithmID(PS_EncryptionAlgorithmID x,PS_InStream stream)10467 void Decode_EncryptionAlgorithmID(PS_EncryptionAlgorithmID x, PS_InStream stream)
10468 {
10469 x->h233AlgorithmIdentifier = (uint8) GetInteger(0, 255, stream);
10470 Decode_NonStandardParameter(&x->associatedAlgorithm, stream);
10471 }
10472
10473 /* <=============================================> */
10474 /* PER-Decoder for FlowControlCommand (SEQUENCE) */
10475 /* <=============================================> */
Decode_FlowControlCommand(PS_FlowControlCommand x,PS_InStream stream)10476 void Decode_FlowControlCommand(PS_FlowControlCommand x, PS_InStream stream)
10477 {
10478 uint8 extension;
10479 PS_UnknownSigMap map;
10480
10481 extension = GetBoolean(stream);
10482 Decode_FccScope(&x->fccScope, stream);
10483 Decode_FccRestriction(&x->fccRestriction, stream);
10484 /* ------------------------------- */
10485 /* ---- Extension Begins Here ---- */
10486 /* ------------------------------- */
10487 if (extension)
10488 {
10489 map = GetUnknownSigMap(stream);
10490 if (SkipUnreadExtensions(map, stream))
10491 {
10492 ErrorMessage("Decode_FlowControlCommand: Unknown extensions (skipped)");
10493 }
10494 }
10495 }
10496
10497 /* <=======================================> */
10498 /* PER-Decoder for FccRestriction (CHOICE) */
10499 /* <=======================================> */
Decode_FccRestriction(PS_FccRestriction x,PS_InStream stream)10500 void Decode_FccRestriction(PS_FccRestriction x, PS_InStream stream)
10501 {
10502 x->index = GetChoiceIndex(2, 0, stream);
10503 switch (x->index)
10504 {
10505 case 0:
10506 x->maximumBitRate = GetInteger(0, 16777215, stream);
10507 break;
10508 case 1:
10509 /* (noRestriction is NULL) */
10510 break;
10511 default:
10512 ErrorMessageAndLeave("Decode_FccRestriction: Illegal CHOICE index");
10513 }
10514 }
10515
10516 /* <=================================> */
10517 /* PER-Decoder for FccScope (CHOICE) */
10518 /* <=================================> */
Decode_FccScope(PS_FccScope x,PS_InStream stream)10519 void Decode_FccScope(PS_FccScope x, PS_InStream stream)
10520 {
10521 x->index = GetChoiceIndex(3, 0, stream);
10522 switch (x->index)
10523 {
10524 case 0:
10525 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
10526 break;
10527 case 1:
10528 x->resourceID = (uint16) GetInteger(0, 65535, stream);
10529 break;
10530 case 2:
10531 /* (wholeMultiplex is NULL) */
10532 break;
10533 default:
10534 ErrorMessageAndLeave("Decode_FccScope: Illegal CHOICE index");
10535 }
10536 }
10537
10538 /* <==========================================> */
10539 /* PER-Decoder for EndSessionCommand (CHOICE) */
10540 /* <==========================================> */
Decode_EndSessionCommand(PS_EndSessionCommand x,PS_InStream stream)10541 void Decode_EndSessionCommand(PS_EndSessionCommand x, PS_InStream stream)
10542 {
10543 x->index = GetChoiceIndex(3, 1, stream);
10544 switch (x->index)
10545 {
10546 case 0:
10547 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
10548 Decode_NonStandardParameter(x->nonStandard, stream);
10549 break;
10550 case 1:
10551 /* (disconnect is NULL) */
10552 break;
10553 case 2:
10554 x->gstnOptions = (PS_GstnOptions) OSCL_DEFAULT_MALLOC(sizeof(S_GstnOptions));
10555 Decode_GstnOptions(x->gstnOptions, stream);
10556 break;
10557 /* ------------------------------- */
10558 /* ---- Extension Begins Here ---- */
10559 /* ------------------------------- */
10560 case 3:
10561 GetLengthDet(stream);
10562 x->isdnOptions = (PS_IsdnOptions) OSCL_DEFAULT_MALLOC(sizeof(S_IsdnOptions));
10563 Decode_IsdnOptions(x->isdnOptions, stream);
10564 ReadRemainingBits(stream);
10565 break;
10566 default:
10567 ErrorMessage("Decode_EndSessionCommand: Unsupported extension (skipping)");
10568 SkipOneExtension(stream);
10569 }
10570 }
10571
10572 /* <====================================> */
10573 /* PER-Decoder for IsdnOptions (CHOICE) */
10574 /* <====================================> */
Decode_IsdnOptions(PS_IsdnOptions x,PS_InStream stream)10575 void Decode_IsdnOptions(PS_IsdnOptions x, PS_InStream stream)
10576 {
10577 x->index = GetChoiceIndex(3, 1, stream);
10578 switch (x->index)
10579 {
10580 case 0:
10581 /* (telephonyMode is NULL) */
10582 break;
10583 case 1:
10584 /* (v140 is NULL) */
10585 break;
10586 case 2:
10587 /* (terminalOnHold is NULL) */
10588 break;
10589 /* ------------------------------- */
10590 /* ---- Extension Begins Here ---- */
10591 /* ------------------------------- */
10592 default:
10593 ErrorMessage("Decode_IsdnOptions: Unsupported extension (skipping)");
10594 SkipOneExtension(stream);
10595 }
10596 }
10597
10598 /* <====================================> */
10599 /* PER-Decoder for GstnOptions (CHOICE) */
10600 /* <====================================> */
Decode_GstnOptions(PS_GstnOptions x,PS_InStream stream)10601 void Decode_GstnOptions(PS_GstnOptions x, PS_InStream stream)
10602 {
10603 x->index = GetChoiceIndex(5, 1, stream);
10604 switch (x->index)
10605 {
10606 case 0:
10607 /* (telephonyMode is NULL) */
10608 break;
10609 case 1:
10610 /* (v8bis is NULL) */
10611 break;
10612 case 2:
10613 /* (v34DSVD is NULL) */
10614 break;
10615 case 3:
10616 /* (v34DuplexFAX is NULL) */
10617 break;
10618 case 4:
10619 /* (v34H324 is NULL) */
10620 break;
10621 /* ------------------------------- */
10622 /* ---- Extension Begins Here ---- */
10623 /* ------------------------------- */
10624 default:
10625 ErrorMessage("Decode_GstnOptions: Unsupported extension (skipping)");
10626 SkipOneExtension(stream);
10627 }
10628 }
10629
10630 /* <==========================================> */
10631 /* PER-Decoder for ConferenceCommand (CHOICE) */
10632 /* <==========================================> */
Decode_ConferenceCommand(PS_ConferenceCommand x,PS_InStream stream)10633 void Decode_ConferenceCommand(PS_ConferenceCommand x, PS_InStream stream)
10634 {
10635 x->index = GetChoiceIndex(7, 1, stream);
10636 switch (x->index)
10637 {
10638 case 0:
10639 x->broadcastMyLogicalChannel = (uint16) GetInteger(1, 65535, stream);
10640 break;
10641 case 1:
10642 x->cancelBroadcastMyLogicalChannel = (uint16) GetInteger(1, 65535, stream);
10643 break;
10644 case 2:
10645 x->makeTerminalBroadcaster = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
10646 Decode_TerminalLabel(x->makeTerminalBroadcaster, stream);
10647 break;
10648 case 3:
10649 /* (cancelMakeTerminalBroadcaster is NULL) */
10650 break;
10651 case 4:
10652 x->sendThisSource = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
10653 Decode_TerminalLabel(x->sendThisSource, stream);
10654 break;
10655 case 5:
10656 /* (cancelSendThisSource is NULL) */
10657 break;
10658 case 6:
10659 /* (dropConference is NULL) */
10660 break;
10661 /* ------------------------------- */
10662 /* ---- Extension Begins Here ---- */
10663 /* ------------------------------- */
10664 case 7:
10665 GetLengthDet(stream);
10666 x->substituteConferenceIDCommand = (PS_SubstituteConferenceIDCommand) OSCL_DEFAULT_MALLOC(sizeof(S_SubstituteConferenceIDCommand));
10667 Decode_SubstituteConferenceIDCommand(x->substituteConferenceIDCommand, stream);
10668 ReadRemainingBits(stream);
10669 break;
10670 default:
10671 ErrorMessage("Decode_ConferenceCommand: Unsupported extension (skipping)");
10672 SkipOneExtension(stream);
10673 }
10674 }
10675
10676 /* <========================================================> */
10677 /* PER-Decoder for SubstituteConferenceIDCommand (SEQUENCE) */
10678 /* <========================================================> */
Decode_SubstituteConferenceIDCommand(PS_SubstituteConferenceIDCommand x,PS_InStream stream)10679 void Decode_SubstituteConferenceIDCommand(PS_SubstituteConferenceIDCommand x, PS_InStream stream)
10680 {
10681 uint8 extension;
10682 PS_UnknownSigMap map;
10683
10684 extension = GetBoolean(stream);
10685 GetOctetString(0, 16, 16, &x->conferenceIdentifier, stream);
10686 /* ------------------------------- */
10687 /* ---- Extension Begins Here ---- */
10688 /* ------------------------------- */
10689 if (extension)
10690 {
10691 map = GetUnknownSigMap(stream);
10692 if (SkipUnreadExtensions(map, stream))
10693 {
10694 ErrorMessage("Decode_SubstituteConferenceIDCommand: Unknown extensions (skipped)");
10695 }
10696 }
10697 }
10698
10699 /* <===============================================> */
10700 /* PER-Decoder for MiscellaneousCommand (SEQUENCE) */
10701 /* <===============================================> */
Decode_MiscellaneousCommand(PS_MiscellaneousCommand x,PS_InStream stream)10702 void Decode_MiscellaneousCommand(PS_MiscellaneousCommand x, PS_InStream stream)
10703 {
10704 uint8 extension;
10705 PS_UnknownSigMap map;
10706
10707 extension = GetBoolean(stream);
10708 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
10709 Decode_McType(&x->mcType, stream);
10710 /* ------------------------------- */
10711 /* ---- Extension Begins Here ---- */
10712 /* ------------------------------- */
10713 if (extension)
10714 {
10715 map = GetUnknownSigMap(stream);
10716 if (SkipUnreadExtensions(map, stream))
10717 {
10718 ErrorMessage("Decode_MiscellaneousCommand: Unknown extensions (skipped)");
10719 }
10720 }
10721 }
10722
10723 /* <===============================> */
10724 /* PER-Decoder for McType (CHOICE) */
10725 /* <===============================> */
Decode_McType(PS_McType x,PS_InStream stream)10726 void Decode_McType(PS_McType x, PS_InStream stream)
10727 {
10728 x->index = GetChoiceIndex(10, 1, stream);
10729 switch (x->index)
10730 {
10731 case 0:
10732 /* (equaliseDelay is NULL) */
10733 break;
10734 case 1:
10735 /* (zeroDelay is NULL) */
10736 break;
10737 case 2:
10738 /* (multipointModeCommand is NULL) */
10739 break;
10740 case 3:
10741 /* (cancelMultipointModeCommand is NULL) */
10742 break;
10743 case 4:
10744 /* (videoFreezePicture is NULL) */
10745 break;
10746 case 5:
10747 /* (videoFastUpdatePicture is NULL) */
10748 break;
10749 case 6:
10750 x->videoFastUpdateGOB = (PS_VideoFastUpdateGOB) OSCL_DEFAULT_MALLOC(sizeof(S_VideoFastUpdateGOB));
10751 Decode_VideoFastUpdateGOB(x->videoFastUpdateGOB, stream);
10752 break;
10753 case 7:
10754 x->videoTemporalSpatialTradeOff = (uint8) GetInteger(0, 31, stream);
10755 break;
10756 case 8:
10757 /* (videoSendSyncEveryGOB is NULL) */
10758 break;
10759 case 9:
10760 /* (videoSendSyncEveryGOBCancel is NULL) */
10761 break;
10762 /* ------------------------------- */
10763 /* ---- Extension Begins Here ---- */
10764 /* ------------------------------- */
10765 case 10:
10766 GetLengthDet(stream);
10767 x->videoFastUpdateMB = (PS_VideoFastUpdateMB) OSCL_DEFAULT_MALLOC(sizeof(S_VideoFastUpdateMB));
10768 Decode_VideoFastUpdateMB(x->videoFastUpdateMB, stream);
10769 ReadRemainingBits(stream);
10770 break;
10771 case 11:
10772 GetLengthDet(stream);
10773 x->maxH223MUXPDUsize = (uint16) GetInteger(1, (uint16) 65535, stream);
10774 ReadRemainingBits(stream);
10775 break;
10776 case 12:
10777 GetLengthDet(stream);
10778 x->encryptionUpdate = (PS_EncryptionSync) OSCL_DEFAULT_MALLOC(sizeof(S_EncryptionSync));
10779 Decode_EncryptionSync(x->encryptionUpdate, stream);
10780 ReadRemainingBits(stream);
10781 break;
10782 case 13:
10783 GetLengthDet(stream);
10784 x->encryptionUpdateRequest = (PS_EncryptionUpdateRequest) OSCL_DEFAULT_MALLOC(sizeof(S_EncryptionUpdateRequest));
10785 Decode_EncryptionUpdateRequest(x->encryptionUpdateRequest, stream);
10786 ReadRemainingBits(stream);
10787 break;
10788 case 14:
10789 GetLengthDet(stream);
10790 /* (switchReceiveMediaOff is NULL) */
10791 SkipOneOctet(stream);
10792 break;
10793 case 15:
10794 GetLengthDet(stream);
10795 /* (switchReceiveMediaOn is NULL) */
10796 SkipOneOctet(stream);
10797 break;
10798 case 16:
10799 GetLengthDet(stream);
10800 x->progressiveRefinementStart = (PS_ProgressiveRefinementStart) OSCL_DEFAULT_MALLOC(sizeof(S_ProgressiveRefinementStart));
10801 Decode_ProgressiveRefinementStart(x->progressiveRefinementStart, stream);
10802 ReadRemainingBits(stream);
10803 break;
10804 case 17:
10805 GetLengthDet(stream);
10806 /* (progressiveRefinementAbortOne is NULL) */
10807 SkipOneOctet(stream);
10808 break;
10809 case 18:
10810 GetLengthDet(stream);
10811 /* (progressiveRefinementAbortContinuous is NULL) */
10812 SkipOneOctet(stream);
10813 break;
10814 default:
10815 ErrorMessage("Decode_McType: Unsupported extension (skipping)");
10816 SkipOneExtension(stream);
10817 }
10818 }
10819
10820 /* <=====================================================> */
10821 /* PER-Decoder for ProgressiveRefinementStart (SEQUENCE) */
10822 /* <=====================================================> */
Decode_ProgressiveRefinementStart(PS_ProgressiveRefinementStart x,PS_InStream stream)10823 void Decode_ProgressiveRefinementStart(PS_ProgressiveRefinementStart x, PS_InStream stream)
10824 {
10825 uint8 extension;
10826 PS_UnknownSigMap map;
10827
10828 extension = GetBoolean(stream);
10829 Decode_PrsRepeatCount(&x->prsRepeatCount, stream);
10830 /* ------------------------------- */
10831 /* ---- Extension Begins Here ---- */
10832 /* ------------------------------- */
10833 if (extension)
10834 {
10835 map = GetUnknownSigMap(stream);
10836 if (SkipUnreadExtensions(map, stream))
10837 {
10838 ErrorMessage("Decode_ProgressiveRefinementStart: Unknown extensions (skipped)");
10839 }
10840 }
10841 }
10842
10843 /* <=======================================> */
10844 /* PER-Decoder for PrsRepeatCount (CHOICE) */
10845 /* <=======================================> */
Decode_PrsRepeatCount(PS_PrsRepeatCount x,PS_InStream stream)10846 void Decode_PrsRepeatCount(PS_PrsRepeatCount x, PS_InStream stream)
10847 {
10848 x->index = GetChoiceIndex(4, 1, stream);
10849 switch (x->index)
10850 {
10851 case 0:
10852 /* (doOneProgression is NULL) */
10853 break;
10854 case 1:
10855 /* (doContinuousProgressions is NULL) */
10856 break;
10857 case 2:
10858 /* (doOneIndependentProgression is NULL) */
10859 break;
10860 case 3:
10861 /* (doContinuousIndependentProgressions is NULL) */
10862 break;
10863 /* ------------------------------- */
10864 /* ---- Extension Begins Here ---- */
10865 /* ------------------------------- */
10866 default:
10867 ErrorMessage("Decode_PrsRepeatCount: Unsupported extension (skipping)");
10868 SkipOneExtension(stream);
10869 }
10870 }
10871
10872 /* <============================================> */
10873 /* PER-Decoder for VideoFastUpdateMB (SEQUENCE) */
10874 /* <============================================> */
Decode_VideoFastUpdateMB(PS_VideoFastUpdateMB x,PS_InStream stream)10875 void Decode_VideoFastUpdateMB(PS_VideoFastUpdateMB x, PS_InStream stream)
10876 {
10877 uint8 extension;
10878 PS_UnknownSigMap map;
10879
10880 extension = GetBoolean(stream);
10881 x->option_of_firstGOB = GetBoolean(stream);
10882 x->option_of_firstMB = GetBoolean(stream);
10883 if (x->option_of_firstGOB)
10884 {
10885 x->firstGOB = (uint8) GetInteger(0, 255, stream);
10886 }
10887 if (x->option_of_firstMB)
10888 {
10889 x->firstMB = (uint16) GetInteger(1, 8192, stream);
10890 }
10891 x->numberOfMBs = (uint16) GetInteger(1, 8192, stream);
10892 /* ------------------------------- */
10893 /* ---- Extension Begins Here ---- */
10894 /* ------------------------------- */
10895 if (extension)
10896 {
10897 map = GetUnknownSigMap(stream);
10898 if (SkipUnreadExtensions(map, stream))
10899 {
10900 ErrorMessage("Decode_VideoFastUpdateMB: Unknown extensions (skipped)");
10901 }
10902 }
10903 }
10904
10905 /* <=============================================> */
10906 /* PER-Decoder for VideoFastUpdateGOB (SEQUENCE) */
10907 /* <=============================================> */
Decode_VideoFastUpdateGOB(PS_VideoFastUpdateGOB x,PS_InStream stream)10908 void Decode_VideoFastUpdateGOB(PS_VideoFastUpdateGOB x, PS_InStream stream)
10909 {
10910 x->firstGOB = (uint8) GetInteger(0, 17, stream);
10911 x->numberOfGOBs = (uint8) GetInteger(1, 18, stream);
10912 }
10913
10914 /* <==============================================> */
10915 /* PER-Decoder for KeyProtectionMethod (SEQUENCE) */
10916 /* <==============================================> */
Decode_KeyProtectionMethod(PS_KeyProtectionMethod x,PS_InStream stream)10917 void Decode_KeyProtectionMethod(PS_KeyProtectionMethod x, PS_InStream stream)
10918 {
10919 uint8 extension;
10920 PS_UnknownSigMap map;
10921
10922 extension = GetBoolean(stream);
10923 x->secureChannel = GetBoolean(stream);
10924 x->sharedSecret = GetBoolean(stream);
10925 x->certProtectedKey = GetBoolean(stream);
10926 /* ------------------------------- */
10927 /* ---- Extension Begins Here ---- */
10928 /* ------------------------------- */
10929 if (extension)
10930 {
10931 map = GetUnknownSigMap(stream);
10932 if (SkipUnreadExtensions(map, stream))
10933 {
10934 ErrorMessage("Decode_KeyProtectionMethod: Unknown extensions (skipped)");
10935 }
10936 }
10937 }
10938
10939 /* <==================================================> */
10940 /* PER-Decoder for EncryptionUpdateRequest (SEQUENCE) */
10941 /* <==================================================> */
Decode_EncryptionUpdateRequest(PS_EncryptionUpdateRequest x,PS_InStream stream)10942 void Decode_EncryptionUpdateRequest(PS_EncryptionUpdateRequest x, PS_InStream stream)
10943 {
10944 uint8 extension;
10945 PS_UnknownSigMap map;
10946
10947 extension = GetBoolean(stream);
10948 x->option_of_keyProtectionMethod = GetBoolean(stream);
10949 if (x->option_of_keyProtectionMethod)
10950 {
10951 Decode_KeyProtectionMethod(&x->keyProtectionMethod, stream);
10952 }
10953 /* ------------------------------- */
10954 /* ---- Extension Begins Here ---- */
10955 /* ------------------------------- */
10956 if (extension)
10957 {
10958 map = GetUnknownSigMap(stream);
10959 if (SkipUnreadExtensions(map, stream))
10960 {
10961 ErrorMessage("Decode_EncryptionUpdateRequest: Unknown extensions (skipped)");
10962 }
10963 }
10964 }
10965
10966 /* <=====================================================> */
10967 /* PER-Decoder for H223MultiplexReconfiguration (CHOICE) */
10968 /* <=====================================================> */
Decode_H223MultiplexReconfiguration(PS_H223MultiplexReconfiguration x,PS_InStream stream)10969 void Decode_H223MultiplexReconfiguration(PS_H223MultiplexReconfiguration x, PS_InStream stream)
10970 {
10971 x->index = GetChoiceIndex(2, 1, stream);
10972 switch (x->index)
10973 {
10974 case 0:
10975 x->h223ModeChange = (PS_H223ModeChange) OSCL_DEFAULT_MALLOC(sizeof(S_H223ModeChange));
10976 Decode_H223ModeChange(x->h223ModeChange, stream);
10977 break;
10978 case 1:
10979 x->h223AnnexADoubleFlag = (PS_H223AnnexADoubleFlag) OSCL_DEFAULT_MALLOC(sizeof(S_H223AnnexADoubleFlag));
10980 Decode_H223AnnexADoubleFlag(x->h223AnnexADoubleFlag, stream);
10981 break;
10982 /* ------------------------------- */
10983 /* ---- Extension Begins Here ---- */
10984 /* ------------------------------- */
10985 default:
10986 ErrorMessage("Decode_H223MultiplexReconfiguration: Unsupported extension (skipping)");
10987 SkipOneExtension(stream);
10988 }
10989 }
10990
10991 /* <=============================================> */
10992 /* PER-Decoder for H223AnnexADoubleFlag (CHOICE) */
10993 /* <=============================================> */
Decode_H223AnnexADoubleFlag(PS_H223AnnexADoubleFlag x,PS_InStream stream)10994 void Decode_H223AnnexADoubleFlag(PS_H223AnnexADoubleFlag x, PS_InStream stream)
10995 {
10996 x->index = GetChoiceIndex(2, 1, stream);
10997 switch (x->index)
10998 {
10999 case 0:
11000 /* (start is NULL) */
11001 break;
11002 case 1:
11003 /* (stop is NULL) */
11004 break;
11005 /* ------------------------------- */
11006 /* ---- Extension Begins Here ---- */
11007 /* ------------------------------- */
11008 default:
11009 ErrorMessage("Decode_H223AnnexADoubleFlag: Unsupported extension (skipping)");
11010 SkipOneExtension(stream);
11011 }
11012 }
11013
11014 /* <=======================================> */
11015 /* PER-Decoder for H223ModeChange (CHOICE) */
11016 /* <=======================================> */
Decode_H223ModeChange(PS_H223ModeChange x,PS_InStream stream)11017 void Decode_H223ModeChange(PS_H223ModeChange x, PS_InStream stream)
11018 {
11019 x->index = GetChoiceIndex(4, 1, stream);
11020 switch (x->index)
11021 {
11022 case 0:
11023 /* (toLevel0 is NULL) */
11024 break;
11025 case 1:
11026 /* (toLevel1 is NULL) */
11027 break;
11028 case 2:
11029 /* (toLevel2 is NULL) */
11030 break;
11031 case 3:
11032 /* (toLevel2withOptionalHeader is NULL) */
11033 break;
11034 /* ------------------------------- */
11035 /* ---- Extension Begins Here ---- */
11036 /* ------------------------------- */
11037 default:
11038 ErrorMessage("Decode_H223ModeChange: Unsupported extension (skipping)");
11039 SkipOneExtension(stream);
11040 }
11041 }
11042
11043 /* <==========================================> */
11044 /* PER-Decoder for NewATMVCCommand (SEQUENCE) */
11045 /* <==========================================> */
Decode_NewATMVCCommand(PS_NewATMVCCommand x,PS_InStream stream)11046 void Decode_NewATMVCCommand(PS_NewATMVCCommand x, PS_InStream stream)
11047 {
11048 uint8 extension;
11049 PS_UnknownSigMap map;
11050
11051 extension = GetBoolean(stream);
11052 x->resourceID = (uint16) GetInteger(0, 65535, stream);
11053 x->bitRate = (uint16) GetInteger(1, 65535, stream);
11054 x->bitRateLockedToPCRClock = GetBoolean(stream);
11055 x->bitRateLockedToNetworkClock = GetBoolean(stream);
11056 Decode_CmdAal(&x->cmdAal, stream);
11057 Decode_CmdMultiplex(&x->cmdMultiplex, stream);
11058 Decode_CmdReverseParameters(&x->cmdReverseParameters, stream);
11059 /* ------------------------------- */
11060 /* ---- Extension Begins Here ---- */
11061 /* ------------------------------- */
11062 if (extension)
11063 {
11064 map = GetUnknownSigMap(stream);
11065 if (SkipUnreadExtensions(map, stream))
11066 {
11067 ErrorMessage("Decode_NewATMVCCommand: Unknown extensions (skipped)");
11068 }
11069 }
11070 }
11071
11072 /* <===============================================> */
11073 /* PER-Decoder for CmdReverseParameters (SEQUENCE) */
11074 /* <===============================================> */
Decode_CmdReverseParameters(PS_CmdReverseParameters x,PS_InStream stream)11075 void Decode_CmdReverseParameters(PS_CmdReverseParameters x, PS_InStream stream)
11076 {
11077 uint8 extension;
11078 PS_UnknownSigMap map;
11079
11080 extension = GetBoolean(stream);
11081 x->bitRate = (uint16) GetInteger(1, 65535, stream);
11082 x->bitRateLockedToPCRClock = GetBoolean(stream);
11083 x->bitRateLockedToNetworkClock = GetBoolean(stream);
11084 Decode_Multiplex(&x->multiplex, stream);
11085 /* ------------------------------- */
11086 /* ---- Extension Begins Here ---- */
11087 /* ------------------------------- */
11088 if (extension)
11089 {
11090 map = GetUnknownSigMap(stream);
11091 if (SkipUnreadExtensions(map, stream))
11092 {
11093 ErrorMessage("Decode_CmdReverseParameters: Unknown extensions (skipped)");
11094 }
11095 }
11096 }
11097
11098 /* <==================================> */
11099 /* PER-Decoder for Multiplex (CHOICE) */
11100 /* <==================================> */
Decode_Multiplex(PS_Multiplex x,PS_InStream stream)11101 void Decode_Multiplex(PS_Multiplex x, PS_InStream stream)
11102 {
11103 x->index = GetChoiceIndex(3, 1, stream);
11104 switch (x->index)
11105 {
11106 case 0:
11107 /* (noMultiplex is NULL) */
11108 break;
11109 case 1:
11110 /* (transportStream is NULL) */
11111 break;
11112 case 2:
11113 /* (programStream is NULL) */
11114 break;
11115 /* ------------------------------- */
11116 /* ---- Extension Begins Here ---- */
11117 /* ------------------------------- */
11118 default:
11119 ErrorMessage("Decode_Multiplex: Unsupported extension (skipping)");
11120 SkipOneExtension(stream);
11121 }
11122 }
11123
11124 /* <=====================================> */
11125 /* PER-Decoder for CmdMultiplex (CHOICE) */
11126 /* <=====================================> */
Decode_CmdMultiplex(PS_CmdMultiplex x,PS_InStream stream)11127 void Decode_CmdMultiplex(PS_CmdMultiplex x, PS_InStream stream)
11128 {
11129 x->index = GetChoiceIndex(3, 1, stream);
11130 switch (x->index)
11131 {
11132 case 0:
11133 /* (noMultiplex is NULL) */
11134 break;
11135 case 1:
11136 /* (transportStream is NULL) */
11137 break;
11138 case 2:
11139 /* (programStream is NULL) */
11140 break;
11141 /* ------------------------------- */
11142 /* ---- Extension Begins Here ---- */
11143 /* ------------------------------- */
11144 default:
11145 ErrorMessage("Decode_CmdMultiplex: Unsupported extension (skipping)");
11146 SkipOneExtension(stream);
11147 }
11148 }
11149
11150 /* <===============================> */
11151 /* PER-Decoder for CmdAal (CHOICE) */
11152 /* <===============================> */
Decode_CmdAal(PS_CmdAal x,PS_InStream stream)11153 void Decode_CmdAal(PS_CmdAal x, PS_InStream stream)
11154 {
11155 x->index = GetChoiceIndex(2, 1, stream);
11156 switch (x->index)
11157 {
11158 case 0:
11159 x->cmdAal1 = (PS_CmdAal1) OSCL_DEFAULT_MALLOC(sizeof(S_CmdAal1));
11160 Decode_CmdAal1(x->cmdAal1, stream);
11161 break;
11162 case 1:
11163 x->cmdAal5 = (PS_CmdAal5) OSCL_DEFAULT_MALLOC(sizeof(S_CmdAal5));
11164 Decode_CmdAal5(x->cmdAal5, stream);
11165 break;
11166 /* ------------------------------- */
11167 /* ---- Extension Begins Here ---- */
11168 /* ------------------------------- */
11169 default:
11170 ErrorMessage("Decode_CmdAal: Unsupported extension (skipping)");
11171 SkipOneExtension(stream);
11172 }
11173 }
11174
11175 /* <==================================> */
11176 /* PER-Decoder for CmdAal5 (SEQUENCE) */
11177 /* <==================================> */
Decode_CmdAal5(PS_CmdAal5 x,PS_InStream stream)11178 void Decode_CmdAal5(PS_CmdAal5 x, PS_InStream stream)
11179 {
11180 uint8 extension;
11181 PS_UnknownSigMap map;
11182
11183 extension = GetBoolean(stream);
11184 x->forwardMaximumSDUSize = (uint16) GetInteger(0, 65535, stream);
11185 x->backwardMaximumSDUSize = (uint16) GetInteger(0, 65535, stream);
11186 /* ------------------------------- */
11187 /* ---- Extension Begins Here ---- */
11188 /* ------------------------------- */
11189 if (extension)
11190 {
11191 map = GetUnknownSigMap(stream);
11192 if (SkipUnreadExtensions(map, stream))
11193 {
11194 ErrorMessage("Decode_CmdAal5: Unknown extensions (skipped)");
11195 }
11196 }
11197 }
11198
11199 /* <==================================> */
11200 /* PER-Decoder for CmdAal1 (SEQUENCE) */
11201 /* <==================================> */
Decode_CmdAal1(PS_CmdAal1 x,PS_InStream stream)11202 void Decode_CmdAal1(PS_CmdAal1 x, PS_InStream stream)
11203 {
11204 uint8 extension;
11205 PS_UnknownSigMap map;
11206
11207 extension = GetBoolean(stream);
11208 Decode_CmdClockRecovery(&x->cmdClockRecovery, stream);
11209 Decode_CmdErrorCorrection(&x->cmdErrorCorrection, stream);
11210 x->structuredDataTransfer = GetBoolean(stream);
11211 x->partiallyFilledCells = GetBoolean(stream);
11212 /* ------------------------------- */
11213 /* ---- Extension Begins Here ---- */
11214 /* ------------------------------- */
11215 if (extension)
11216 {
11217 map = GetUnknownSigMap(stream);
11218 if (SkipUnreadExtensions(map, stream))
11219 {
11220 ErrorMessage("Decode_CmdAal1: Unknown extensions (skipped)");
11221 }
11222 }
11223 }
11224
11225 /* <===========================================> */
11226 /* PER-Decoder for CmdErrorCorrection (CHOICE) */
11227 /* <===========================================> */
Decode_CmdErrorCorrection(PS_CmdErrorCorrection x,PS_InStream stream)11228 void Decode_CmdErrorCorrection(PS_CmdErrorCorrection x, PS_InStream stream)
11229 {
11230 x->index = GetChoiceIndex(4, 1, stream);
11231 switch (x->index)
11232 {
11233 case 0:
11234 /* (nullErrorCorrection is NULL) */
11235 break;
11236 case 1:
11237 /* (longInterleaver is NULL) */
11238 break;
11239 case 2:
11240 /* (shortInterleaver is NULL) */
11241 break;
11242 case 3:
11243 /* (errorCorrectionOnly is NULL) */
11244 break;
11245 /* ------------------------------- */
11246 /* ---- Extension Begins Here ---- */
11247 /* ------------------------------- */
11248 default:
11249 ErrorMessage("Decode_CmdErrorCorrection: Unsupported extension (skipping)");
11250 SkipOneExtension(stream);
11251 }
11252 }
11253
11254 /* <=========================================> */
11255 /* PER-Decoder for CmdClockRecovery (CHOICE) */
11256 /* <=========================================> */
Decode_CmdClockRecovery(PS_CmdClockRecovery x,PS_InStream stream)11257 void Decode_CmdClockRecovery(PS_CmdClockRecovery x, PS_InStream stream)
11258 {
11259 x->index = GetChoiceIndex(3, 1, stream);
11260 switch (x->index)
11261 {
11262 case 0:
11263 /* (nullClockRecovery is NULL) */
11264 break;
11265 case 1:
11266 /* (srtsClockRecovery is NULL) */
11267 break;
11268 case 2:
11269 /* (adaptiveClockRecovery is NULL) */
11270 break;
11271 /* ------------------------------- */
11272 /* ---- Extension Begins Here ---- */
11273 /* ------------------------------- */
11274 default:
11275 ErrorMessage("Decode_CmdClockRecovery: Unsupported extension (skipping)");
11276 SkipOneExtension(stream);
11277 }
11278 }
11279
11280 /* <==============================================> */
11281 /* PER-Decoder for FunctionNotUnderstood (CHOICE) */
11282 /* <==============================================> */
Decode_FunctionNotUnderstood(PS_FunctionNotUnderstood x,PS_InStream stream)11283 void Decode_FunctionNotUnderstood(PS_FunctionNotUnderstood x, PS_InStream stream)
11284 {
11285 x->index = GetChoiceIndex(3, 0, stream);
11286 switch (x->index)
11287 {
11288 case 0:
11289 x->request = (PS_RequestMessage) OSCL_DEFAULT_MALLOC(sizeof(S_RequestMessage));
11290 Decode_RequestMessage(x->request, stream);
11291 break;
11292 case 1:
11293 x->response = (PS_ResponseMessage) OSCL_DEFAULT_MALLOC(sizeof(S_ResponseMessage));
11294 Decode_ResponseMessage(x->response, stream);
11295 break;
11296 case 2:
11297 x->command = (PS_CommandMessage) OSCL_DEFAULT_MALLOC(sizeof(S_CommandMessage));
11298 Decode_CommandMessage(x->command, stream);
11299 break;
11300 default:
11301 ErrorMessageAndLeave("Decode_FunctionNotUnderstood: Illegal CHOICE index");
11302 }
11303 }
11304
11305 /* <===============================================> */
11306 /* PER-Decoder for FunctionNotSupported (SEQUENCE) */
11307 /* <===============================================> */
Decode_FunctionNotSupported(PS_FunctionNotSupported x,PS_InStream stream)11308 void Decode_FunctionNotSupported(PS_FunctionNotSupported x, PS_InStream stream)
11309 {
11310 uint8 extension;
11311 PS_UnknownSigMap map;
11312
11313 extension = GetBoolean(stream);
11314 x->option_of_returnedFunction = GetBoolean(stream);
11315 Decode_FnsCause(&x->fnsCause, stream);
11316 if (x->option_of_returnedFunction)
11317 {
11318 GetOctetString(1, 0, 0, &x->returnedFunction, stream);
11319 }
11320 /* ------------------------------- */
11321 /* ---- Extension Begins Here ---- */
11322 /* ------------------------------- */
11323 if (extension)
11324 {
11325 map = GetUnknownSigMap(stream);
11326 if (SkipUnreadExtensions(map, stream))
11327 {
11328 ErrorMessage("Decode_FunctionNotSupported: Unknown extensions (skipped)");
11329 }
11330 }
11331 }
11332
11333 /* <=================================> */
11334 /* PER-Decoder for FnsCause (CHOICE) */
11335 /* <=================================> */
Decode_FnsCause(PS_FnsCause x,PS_InStream stream)11336 void Decode_FnsCause(PS_FnsCause x, PS_InStream stream)
11337 {
11338 x->index = GetChoiceIndex(3, 1, stream);
11339 switch (x->index)
11340 {
11341 case 0:
11342 /* (syntaxError is NULL) */
11343 break;
11344 case 1:
11345 /* (semanticError is NULL) */
11346 break;
11347 case 2:
11348 /* (unknownFunction is NULL) */
11349 break;
11350 /* ------------------------------- */
11351 /* ---- Extension Begins Here ---- */
11352 /* ------------------------------- */
11353 default:
11354 ErrorMessage("Decode_FnsCause: Unsupported extension (skipping)");
11355 SkipOneExtension(stream);
11356 }
11357 }
11358
11359 /* <=============================================> */
11360 /* PER-Decoder for ConferenceIndication (CHOICE) */
11361 /* <=============================================> */
Decode_ConferenceIndication(PS_ConferenceIndication x,PS_InStream stream)11362 void Decode_ConferenceIndication(PS_ConferenceIndication x, PS_InStream stream)
11363 {
11364 x->index = GetChoiceIndex(10, 1, stream);
11365 switch (x->index)
11366 {
11367 case 0:
11368 x->sbeNumber = (uint8) GetInteger(0, 9, stream);
11369 break;
11370 case 1:
11371 x->terminalNumberAssign = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
11372 Decode_TerminalLabel(x->terminalNumberAssign, stream);
11373 break;
11374 case 2:
11375 x->terminalJoinedConference = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
11376 Decode_TerminalLabel(x->terminalJoinedConference, stream);
11377 break;
11378 case 3:
11379 x->terminalLeftConference = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
11380 Decode_TerminalLabel(x->terminalLeftConference, stream);
11381 break;
11382 case 4:
11383 /* (seenByAtLeastOneOther is NULL) */
11384 break;
11385 case 5:
11386 /* (cancelSeenByAtLeastOneOther is NULL) */
11387 break;
11388 case 6:
11389 /* (seenByAll is NULL) */
11390 break;
11391 case 7:
11392 /* (cancelSeenByAll is NULL) */
11393 break;
11394 case 8:
11395 x->terminalYouAreSeeing = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
11396 Decode_TerminalLabel(x->terminalYouAreSeeing, stream);
11397 break;
11398 case 9:
11399 /* (requestForFloor is NULL) */
11400 break;
11401 /* ------------------------------- */
11402 /* ---- Extension Begins Here ---- */
11403 /* ------------------------------- */
11404 case 10:
11405 GetLengthDet(stream);
11406 /* (withdrawChairToken is NULL) */
11407 SkipOneOctet(stream);
11408 break;
11409 case 11:
11410 GetLengthDet(stream);
11411 x->floorRequested = (PS_TerminalLabel) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalLabel));
11412 Decode_TerminalLabel(x->floorRequested, stream);
11413 ReadRemainingBits(stream);
11414 break;
11415 case 12:
11416 GetLengthDet(stream);
11417 x->terminalYouAreSeeingInSubPictureNumber = (PS_TerminalYouAreSeeingInSubPictureNumber) OSCL_DEFAULT_MALLOC(sizeof(S_TerminalYouAreSeeingInSubPictureNumber));
11418 Decode_TerminalYouAreSeeingInSubPictureNumber(x->terminalYouAreSeeingInSubPictureNumber, stream);
11419 ReadRemainingBits(stream);
11420 break;
11421 case 13:
11422 GetLengthDet(stream);
11423 x->videoIndicateCompose = (PS_VideoIndicateCompose) OSCL_DEFAULT_MALLOC(sizeof(S_VideoIndicateCompose));
11424 Decode_VideoIndicateCompose(x->videoIndicateCompose, stream);
11425 ReadRemainingBits(stream);
11426 break;
11427 default:
11428 ErrorMessage("Decode_ConferenceIndication: Unsupported extension (skipping)");
11429 SkipOneExtension(stream);
11430 }
11431 }
11432
11433 /* <=================================================================> */
11434 /* PER-Decoder for TerminalYouAreSeeingInSubPictureNumber (SEQUENCE) */
11435 /* <=================================================================> */
Decode_TerminalYouAreSeeingInSubPictureNumber(PS_TerminalYouAreSeeingInSubPictureNumber x,PS_InStream stream)11436 void Decode_TerminalYouAreSeeingInSubPictureNumber(PS_TerminalYouAreSeeingInSubPictureNumber x, PS_InStream stream)
11437 {
11438 uint8 extension;
11439 PS_UnknownSigMap map;
11440
11441 extension = GetBoolean(stream);
11442 x->terminalNumber = (uint8) GetInteger(0, 192, stream);
11443 x->subPictureNumber = (uint8) GetInteger(0, 255, stream);
11444 /* ------------------------------- */
11445 /* ---- Extension Begins Here ---- */
11446 /* ------------------------------- */
11447 if (extension)
11448 {
11449 map = GetUnknownSigMap(stream);
11450 if (SkipUnreadExtensions(map, stream))
11451 {
11452 ErrorMessage("Decode_TerminalYouAreSeeingInSubPictureNumber: Unknown extensions (skipped)");
11453 }
11454 }
11455 }
11456
11457 /* <===============================================> */
11458 /* PER-Decoder for VideoIndicateCompose (SEQUENCE) */
11459 /* <===============================================> */
Decode_VideoIndicateCompose(PS_VideoIndicateCompose x,PS_InStream stream)11460 void Decode_VideoIndicateCompose(PS_VideoIndicateCompose x, PS_InStream stream)
11461 {
11462 uint8 extension;
11463 PS_UnknownSigMap map;
11464
11465 extension = GetBoolean(stream);
11466 x->compositionNumber = (uint8) GetInteger(0, 255, stream);
11467 /* ------------------------------- */
11468 /* ---- Extension Begins Here ---- */
11469 /* ------------------------------- */
11470 if (extension)
11471 {
11472 map = GetUnknownSigMap(stream);
11473 if (SkipUnreadExtensions(map, stream))
11474 {
11475 ErrorMessage("Decode_VideoIndicateCompose: Unknown extensions (skipped)");
11476 }
11477 }
11478 }
11479
11480 /* <==================================================> */
11481 /* PER-Decoder for MiscellaneousIndication (SEQUENCE) */
11482 /* <==================================================> */
Decode_MiscellaneousIndication(PS_MiscellaneousIndication x,PS_InStream stream)11483 void Decode_MiscellaneousIndication(PS_MiscellaneousIndication x, PS_InStream stream)
11484 {
11485 uint8 extension;
11486 PS_UnknownSigMap map;
11487
11488 extension = GetBoolean(stream);
11489 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
11490 Decode_MiType(&x->miType, stream);
11491 /* ------------------------------- */
11492 /* ---- Extension Begins Here ---- */
11493 /* ------------------------------- */
11494 if (extension)
11495 {
11496 map = GetUnknownSigMap(stream);
11497 if (SkipUnreadExtensions(map, stream))
11498 {
11499 ErrorMessage("Decode_MiscellaneousIndication: Unknown extensions (skipped)");
11500 }
11501 }
11502 }
11503
11504 /* <===============================> */
11505 /* PER-Decoder for MiType (CHOICE) */
11506 /* <===============================> */
Decode_MiType(PS_MiType x,PS_InStream stream)11507 void Decode_MiType(PS_MiType x, PS_InStream stream)
11508 {
11509 x->index = GetChoiceIndex(10, 1, stream);
11510 switch (x->index)
11511 {
11512 case 0:
11513 /* (logicalChannelActive is NULL) */
11514 break;
11515 case 1:
11516 /* (logicalChannelInactive is NULL) */
11517 break;
11518 case 2:
11519 /* (multipointConference is NULL) */
11520 break;
11521 case 3:
11522 /* (cancelMultipointConference is NULL) */
11523 break;
11524 case 4:
11525 /* (multipointZeroComm is NULL) */
11526 break;
11527 case 5:
11528 /* (cancelMultipointZeroComm is NULL) */
11529 break;
11530 case 6:
11531 /* (multipointSecondaryStatus is NULL) */
11532 break;
11533 case 7:
11534 /* (cancelMultipointSecondaryStatus is NULL) */
11535 break;
11536 case 8:
11537 /* (videoIndicateReadyToActivate is NULL) */
11538 break;
11539 case 9:
11540 x->videoTemporalSpatialTradeOff = (uint8) GetInteger(0, 31, stream);
11541 break;
11542 /* ------------------------------- */
11543 /* ---- Extension Begins Here ---- */
11544 /* ------------------------------- */
11545 case 10:
11546 GetLengthDet(stream);
11547 x->videoNotDecodedMBs = (PS_VideoNotDecodedMBs) OSCL_DEFAULT_MALLOC(sizeof(S_VideoNotDecodedMBs));
11548 Decode_VideoNotDecodedMBs(x->videoNotDecodedMBs, stream);
11549 ReadRemainingBits(stream);
11550 break;
11551 case 11:
11552 GetLengthDet(stream);
11553 x->transportCapability = (PS_TransportCapability) OSCL_DEFAULT_MALLOC(sizeof(S_TransportCapability));
11554 Decode_TransportCapability(x->transportCapability, stream);
11555 ReadRemainingBits(stream);
11556 break;
11557 default:
11558 ErrorMessage("Decode_MiType: Unsupported extension (skipping)");
11559 SkipOneExtension(stream);
11560 }
11561 }
11562
11563 /* <=============================================> */
11564 /* PER-Decoder for VideoNotDecodedMBs (SEQUENCE) */
11565 /* <=============================================> */
Decode_VideoNotDecodedMBs(PS_VideoNotDecodedMBs x,PS_InStream stream)11566 void Decode_VideoNotDecodedMBs(PS_VideoNotDecodedMBs x, PS_InStream stream)
11567 {
11568 uint8 extension;
11569 PS_UnknownSigMap map;
11570
11571 extension = GetBoolean(stream);
11572 x->firstMB = (uint16) GetInteger(1, 8192, stream);
11573 x->numberOfMBs = (uint16) GetInteger(1, 8192, stream);
11574 x->temporalReference = (uint8) GetInteger(0, 255, stream);
11575 /* ------------------------------- */
11576 /* ---- Extension Begins Here ---- */
11577 /* ------------------------------- */
11578 if (extension)
11579 {
11580 map = GetUnknownSigMap(stream);
11581 if (SkipUnreadExtensions(map, stream))
11582 {
11583 ErrorMessage("Decode_VideoNotDecodedMBs: Unknown extensions (skipped)");
11584 }
11585 }
11586 }
11587
11588 /* <===========================================> */
11589 /* PER-Decoder for JitterIndication (SEQUENCE) */
11590 /* <===========================================> */
Decode_JitterIndication(PS_JitterIndication x,PS_InStream stream)11591 void Decode_JitterIndication(PS_JitterIndication x, PS_InStream stream)
11592 {
11593 uint8 extension;
11594 PS_UnknownSigMap map;
11595
11596 extension = GetBoolean(stream);
11597 x->option_of_skippedFrameCount = GetBoolean(stream);
11598 x->option_of_additionalDecoderBuffer = GetBoolean(stream);
11599 Decode_JiScope(&x->jiScope, stream);
11600 x->estimatedReceivedJitterMantissa = (uint8) GetInteger(0, 3, stream);
11601 x->estimatedReceivedJitterExponent = (uint8) GetInteger(0, 7, stream);
11602 if (x->option_of_skippedFrameCount)
11603 {
11604 x->skippedFrameCount = (uint8) GetInteger(0, 15, stream);
11605 }
11606 if (x->option_of_additionalDecoderBuffer)
11607 {
11608 x->additionalDecoderBuffer = GetInteger(0, 262143, stream);
11609 }
11610 /* ------------------------------- */
11611 /* ---- Extension Begins Here ---- */
11612 /* ------------------------------- */
11613 if (extension)
11614 {
11615 map = GetUnknownSigMap(stream);
11616 if (SkipUnreadExtensions(map, stream))
11617 {
11618 ErrorMessage("Decode_JitterIndication: Unknown extensions (skipped)");
11619 }
11620 }
11621 }
11622
11623 /* <================================> */
11624 /* PER-Decoder for JiScope (CHOICE) */
11625 /* <================================> */
Decode_JiScope(PS_JiScope x,PS_InStream stream)11626 void Decode_JiScope(PS_JiScope x, PS_InStream stream)
11627 {
11628 x->index = GetChoiceIndex(3, 0, stream);
11629 switch (x->index)
11630 {
11631 case 0:
11632 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
11633 break;
11634 case 1:
11635 x->resourceID = (uint16) GetInteger(0, 65535, stream);
11636 break;
11637 case 2:
11638 /* (wholeMultiplex is NULL) */
11639 break;
11640 default:
11641 ErrorMessageAndLeave("Decode_JiScope: Illegal CHOICE index");
11642 }
11643 }
11644
11645 /* <=============================================> */
11646 /* PER-Decoder for H223SkewIndication (SEQUENCE) */
11647 /* <=============================================> */
Decode_H223SkewIndication(PS_H223SkewIndication x,PS_InStream stream)11648 void Decode_H223SkewIndication(PS_H223SkewIndication x, PS_InStream stream)
11649 {
11650 uint8 extension;
11651 PS_UnknownSigMap map;
11652
11653 extension = GetBoolean(stream);
11654 x->logicalChannelNumber1 = (uint16) GetInteger(1, 65535, stream);
11655 x->logicalChannelNumber2 = (uint16) GetInteger(1, 65535, stream);
11656 x->skew = (uint16) GetInteger(0, 4095, stream);
11657 /* ------------------------------- */
11658 /* ---- Extension Begins Here ---- */
11659 /* ------------------------------- */
11660 if (extension)
11661 {
11662 map = GetUnknownSigMap(stream);
11663 if (SkipUnreadExtensions(map, stream))
11664 {
11665 ErrorMessage("Decode_H223SkewIndication: Unknown extensions (skipped)");
11666 }
11667 }
11668 }
11669
11670 /* <=====================================================> */
11671 /* PER-Decoder for H2250MaximumSkewIndication (SEQUENCE) */
11672 /* <=====================================================> */
Decode_H2250MaximumSkewIndication(PS_H2250MaximumSkewIndication x,PS_InStream stream)11673 void Decode_H2250MaximumSkewIndication(PS_H2250MaximumSkewIndication x, PS_InStream stream)
11674 {
11675 uint8 extension;
11676 PS_UnknownSigMap map;
11677
11678 extension = GetBoolean(stream);
11679 x->logicalChannelNumber1 = (uint16) GetInteger(1, 65535, stream);
11680 x->logicalChannelNumber2 = (uint16) GetInteger(1, 65535, stream);
11681 x->maximumSkew = (uint16) GetInteger(0, 4095, stream);
11682 /* ------------------------------- */
11683 /* ---- Extension Begins Here ---- */
11684 /* ------------------------------- */
11685 if (extension)
11686 {
11687 map = GetUnknownSigMap(stream);
11688 if (SkipUnreadExtensions(map, stream))
11689 {
11690 ErrorMessage("Decode_H2250MaximumSkewIndication: Unknown extensions (skipped)");
11691 }
11692 }
11693 }
11694
11695 /* <===============================================> */
11696 /* PER-Decoder for MCLocationIndication (SEQUENCE) */
11697 /* <===============================================> */
Decode_MCLocationIndication(PS_MCLocationIndication x,PS_InStream stream)11698 void Decode_MCLocationIndication(PS_MCLocationIndication x, PS_InStream stream)
11699 {
11700 uint8 extension;
11701 PS_UnknownSigMap map;
11702
11703 extension = GetBoolean(stream);
11704 Decode_TransportAddress(&x->signalAddress, stream);
11705 /* ------------------------------- */
11706 /* ---- Extension Begins Here ---- */
11707 /* ------------------------------- */
11708 if (extension)
11709 {
11710 map = GetUnknownSigMap(stream);
11711 if (SkipUnreadExtensions(map, stream))
11712 {
11713 ErrorMessage("Decode_MCLocationIndication: Unknown extensions (skipped)");
11714 }
11715 }
11716 }
11717
11718 /* <===============================================> */
11719 /* PER-Decoder for VendorIdentification (SEQUENCE) */
11720 /* <===============================================> */
Decode_VendorIdentification(PS_VendorIdentification x,PS_InStream stream)11721 void Decode_VendorIdentification(PS_VendorIdentification x, PS_InStream stream)
11722 {
11723 uint8 extension;
11724 PS_UnknownSigMap map;
11725
11726 extension = GetBoolean(stream);
11727 x->option_of_productNumber = GetBoolean(stream);
11728 x->option_of_versionNumber = GetBoolean(stream);
11729 Decode_NonStandardIdentifier(&x->vendor, stream);
11730 if (x->option_of_productNumber)
11731 {
11732 GetOctetString(0, 1, 256, &x->productNumber, stream);
11733 }
11734 if (x->option_of_versionNumber)
11735 {
11736 GetOctetString(0, 1, 256, &x->versionNumber, stream);
11737 }
11738 /* ------------------------------- */
11739 /* ---- Extension Begins Here ---- */
11740 /* ------------------------------- */
11741 if (extension)
11742 {
11743 map = GetUnknownSigMap(stream);
11744 if (SkipUnreadExtensions(map, stream))
11745 {
11746 ErrorMessage("Decode_VendorIdentification: Unknown extensions (skipped)");
11747 }
11748 }
11749 }
11750
11751 /* <=============================================> */
11752 /* PER-Decoder for NewATMVCIndication (SEQUENCE) */
11753 /* <=============================================> */
Decode_NewATMVCIndication(PS_NewATMVCIndication x,PS_InStream stream)11754 void Decode_NewATMVCIndication(PS_NewATMVCIndication x, PS_InStream stream)
11755 {
11756 uint8 extension;
11757 PS_UnknownSigMap map;
11758
11759 extension = GetBoolean(stream);
11760 x->resourceID = (uint16) GetInteger(0, 65535, stream);
11761 x->bitRate = (uint16) GetInteger(1, 65535, stream);
11762 x->bitRateLockedToPCRClock = GetBoolean(stream);
11763 x->bitRateLockedToNetworkClock = GetBoolean(stream);
11764 Decode_IndAal(&x->indAal, stream);
11765 Decode_IndMultiplex(&x->indMultiplex, stream);
11766 /* ------------------------------- */
11767 /* ---- Extension Begins Here ---- */
11768 /* ------------------------------- */
11769 x->option_of_indReverseParameters = OFF;
11770 if (extension)
11771 {
11772 map = GetUnknownSigMap(stream);
11773 x->option_of_indReverseParameters = SigMapValue(0, map);
11774 if (x->option_of_indReverseParameters)
11775 {
11776 ExtensionPrep(map, stream);
11777 Decode_IndReverseParameters(&x->indReverseParameters, stream);
11778 ReadRemainingBits(stream);
11779 }
11780 if (SkipUnreadExtensions(map, stream))
11781 {
11782 ErrorMessage("Decode_NewATMVCIndication: Unknown extensions (skipped)");
11783 }
11784 }
11785 }
11786
11787 /* <===============================================> */
11788 /* PER-Decoder for IndReverseParameters (SEQUENCE) */
11789 /* <===============================================> */
Decode_IndReverseParameters(PS_IndReverseParameters x,PS_InStream stream)11790 void Decode_IndReverseParameters(PS_IndReverseParameters x, PS_InStream stream)
11791 {
11792 uint8 extension;
11793 PS_UnknownSigMap map;
11794
11795 extension = GetBoolean(stream);
11796 x->bitRate = (uint16) GetInteger(1, 65535, stream);
11797 x->bitRateLockedToPCRClock = GetBoolean(stream);
11798 x->bitRateLockedToNetworkClock = GetBoolean(stream);
11799 Decode_IrpMultiplex(&x->irpMultiplex, stream);
11800 /* ------------------------------- */
11801 /* ---- Extension Begins Here ---- */
11802 /* ------------------------------- */
11803 if (extension)
11804 {
11805 map = GetUnknownSigMap(stream);
11806 if (SkipUnreadExtensions(map, stream))
11807 {
11808 ErrorMessage("Decode_IndReverseParameters: Unknown extensions (skipped)");
11809 }
11810 }
11811 }
11812
11813 /* <=====================================> */
11814 /* PER-Decoder for IrpMultiplex (CHOICE) */
11815 /* <=====================================> */
Decode_IrpMultiplex(PS_IrpMultiplex x,PS_InStream stream)11816 void Decode_IrpMultiplex(PS_IrpMultiplex x, PS_InStream stream)
11817 {
11818 x->index = GetChoiceIndex(3, 1, stream);
11819 switch (x->index)
11820 {
11821 case 0:
11822 /* (noMultiplex is NULL) */
11823 break;
11824 case 1:
11825 /* (transportStream is NULL) */
11826 break;
11827 case 2:
11828 /* (programStream is NULL) */
11829 break;
11830 /* ------------------------------- */
11831 /* ---- Extension Begins Here ---- */
11832 /* ------------------------------- */
11833 default:
11834 ErrorMessage("Decode_IrpMultiplex: Unsupported extension (skipping)");
11835 SkipOneExtension(stream);
11836 }
11837 }
11838
11839 /* <=====================================> */
11840 /* PER-Decoder for IndMultiplex (CHOICE) */
11841 /* <=====================================> */
Decode_IndMultiplex(PS_IndMultiplex x,PS_InStream stream)11842 void Decode_IndMultiplex(PS_IndMultiplex x, PS_InStream stream)
11843 {
11844 x->index = GetChoiceIndex(3, 1, stream);
11845 switch (x->index)
11846 {
11847 case 0:
11848 /* (noMultiplex is NULL) */
11849 break;
11850 case 1:
11851 /* (transportStream is NULL) */
11852 break;
11853 case 2:
11854 /* (programStream is NULL) */
11855 break;
11856 /* ------------------------------- */
11857 /* ---- Extension Begins Here ---- */
11858 /* ------------------------------- */
11859 default:
11860 ErrorMessage("Decode_IndMultiplex: Unsupported extension (skipping)");
11861 SkipOneExtension(stream);
11862 }
11863 }
11864
11865 /* <===============================> */
11866 /* PER-Decoder for IndAal (CHOICE) */
11867 /* <===============================> */
Decode_IndAal(PS_IndAal x,PS_InStream stream)11868 void Decode_IndAal(PS_IndAal x, PS_InStream stream)
11869 {
11870 x->index = GetChoiceIndex(2, 1, stream);
11871 switch (x->index)
11872 {
11873 case 0:
11874 x->indAal1 = (PS_IndAal1) OSCL_DEFAULT_MALLOC(sizeof(S_IndAal1));
11875 Decode_IndAal1(x->indAal1, stream);
11876 break;
11877 case 1:
11878 x->indAal5 = (PS_IndAal5) OSCL_DEFAULT_MALLOC(sizeof(S_IndAal5));
11879 Decode_IndAal5(x->indAal5, stream);
11880 break;
11881 /* ------------------------------- */
11882 /* ---- Extension Begins Here ---- */
11883 /* ------------------------------- */
11884 default:
11885 ErrorMessage("Decode_IndAal: Unsupported extension (skipping)");
11886 SkipOneExtension(stream);
11887 }
11888 }
11889
11890 /* <==================================> */
11891 /* PER-Decoder for IndAal5 (SEQUENCE) */
11892 /* <==================================> */
Decode_IndAal5(PS_IndAal5 x,PS_InStream stream)11893 void Decode_IndAal5(PS_IndAal5 x, PS_InStream stream)
11894 {
11895 uint8 extension;
11896 PS_UnknownSigMap map;
11897
11898 extension = GetBoolean(stream);
11899 x->forwardMaximumSDUSize = (uint16) GetInteger(0, 65535, stream);
11900 x->backwardMaximumSDUSize = (uint16) GetInteger(0, 65535, stream);
11901 /* ------------------------------- */
11902 /* ---- Extension Begins Here ---- */
11903 /* ------------------------------- */
11904 if (extension)
11905 {
11906 map = GetUnknownSigMap(stream);
11907 if (SkipUnreadExtensions(map, stream))
11908 {
11909 ErrorMessage("Decode_IndAal5: Unknown extensions (skipped)");
11910 }
11911 }
11912 }
11913
11914 /* <==================================> */
11915 /* PER-Decoder for IndAal1 (SEQUENCE) */
11916 /* <==================================> */
Decode_IndAal1(PS_IndAal1 x,PS_InStream stream)11917 void Decode_IndAal1(PS_IndAal1 x, PS_InStream stream)
11918 {
11919 uint8 extension;
11920 PS_UnknownSigMap map;
11921
11922 extension = GetBoolean(stream);
11923 Decode_IndClockRecovery(&x->indClockRecovery, stream);
11924 Decode_IndErrorCorrection(&x->indErrorCorrection, stream);
11925 x->structuredDataTransfer = GetBoolean(stream);
11926 x->partiallyFilledCells = GetBoolean(stream);
11927 /* ------------------------------- */
11928 /* ---- Extension Begins Here ---- */
11929 /* ------------------------------- */
11930 if (extension)
11931 {
11932 map = GetUnknownSigMap(stream);
11933 if (SkipUnreadExtensions(map, stream))
11934 {
11935 ErrorMessage("Decode_IndAal1: Unknown extensions (skipped)");
11936 }
11937 }
11938 }
11939
11940 /* <===========================================> */
11941 /* PER-Decoder for IndErrorCorrection (CHOICE) */
11942 /* <===========================================> */
Decode_IndErrorCorrection(PS_IndErrorCorrection x,PS_InStream stream)11943 void Decode_IndErrorCorrection(PS_IndErrorCorrection x, PS_InStream stream)
11944 {
11945 x->index = GetChoiceIndex(4, 1, stream);
11946 switch (x->index)
11947 {
11948 case 0:
11949 /* (nullErrorCorrection is NULL) */
11950 break;
11951 case 1:
11952 /* (longInterleaver is NULL) */
11953 break;
11954 case 2:
11955 /* (shortInterleaver is NULL) */
11956 break;
11957 case 3:
11958 /* (errorCorrectionOnly is NULL) */
11959 break;
11960 /* ------------------------------- */
11961 /* ---- Extension Begins Here ---- */
11962 /* ------------------------------- */
11963 default:
11964 ErrorMessage("Decode_IndErrorCorrection: Unsupported extension (skipping)");
11965 SkipOneExtension(stream);
11966 }
11967 }
11968
11969 /* <=========================================> */
11970 /* PER-Decoder for IndClockRecovery (CHOICE) */
11971 /* <=========================================> */
Decode_IndClockRecovery(PS_IndClockRecovery x,PS_InStream stream)11972 void Decode_IndClockRecovery(PS_IndClockRecovery x, PS_InStream stream)
11973 {
11974 x->index = GetChoiceIndex(3, 1, stream);
11975 switch (x->index)
11976 {
11977 case 0:
11978 /* (nullClockRecovery is NULL) */
11979 break;
11980 case 1:
11981 /* (srtsClockRecovery is NULL) */
11982 break;
11983 case 2:
11984 /* (adaptiveClockRecovery is NULL) */
11985 break;
11986 /* ------------------------------- */
11987 /* ---- Extension Begins Here ---- */
11988 /* ------------------------------- */
11989 default:
11990 ErrorMessage("Decode_IndClockRecovery: Unsupported extension (skipping)");
11991 SkipOneExtension(stream);
11992 }
11993 }
11994
11995 /* <============================================> */
11996 /* PER-Decoder for UserInputIndication (CHOICE) */
11997 /* <============================================> */
Decode_UserInputIndication(PS_UserInputIndication x,PS_InStream stream)11998 void Decode_UserInputIndication(PS_UserInputIndication x, PS_InStream stream)
11999 {
12000 x->index = GetChoiceIndex(2, 1, stream);
12001 switch (x->index)
12002 {
12003 case 0:
12004 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
12005 Decode_NonStandardParameter(x->nonStandard, stream);
12006 break;
12007 case 1:
12008 x->alphanumeric = (PS_int8STRING) OSCL_DEFAULT_MALLOC(sizeof(S_int8STRING));
12009 GetCharString("GeneralString", 1, 0, 0, NULL, x->alphanumeric, stream);
12010 break;
12011 /* ------------------------------- */
12012 /* ---- Extension Begins Here ---- */
12013 /* ------------------------------- */
12014 case 2:
12015 GetLengthDet(stream);
12016 x->userInputSupportIndication = (PS_UserInputSupportIndication) OSCL_DEFAULT_MALLOC(sizeof(S_UserInputSupportIndication));
12017 Decode_UserInputSupportIndication(x->userInputSupportIndication, stream);
12018 ReadRemainingBits(stream);
12019 break;
12020 case 3:
12021 GetLengthDet(stream);
12022 x->signal = (PS_Signal) OSCL_DEFAULT_MALLOC(sizeof(S_Signal));
12023 Decode_Signal(x->signal, stream);
12024 ReadRemainingBits(stream);
12025 break;
12026 case 4:
12027 GetLengthDet(stream);
12028 x->signalUpdate = (PS_SignalUpdate) OSCL_DEFAULT_MALLOC(sizeof(S_SignalUpdate));
12029 Decode_SignalUpdate(x->signalUpdate, stream);
12030 ReadRemainingBits(stream);
12031 break;
12032 default:
12033 ErrorMessage("Decode_UserInputIndication: Unsupported extension (skipping)");
12034 SkipOneExtension(stream);
12035 }
12036 }
12037
12038 /* <=======================================> */
12039 /* PER-Decoder for SignalUpdate (SEQUENCE) */
12040 /* <=======================================> */
Decode_SignalUpdate(PS_SignalUpdate x,PS_InStream stream)12041 void Decode_SignalUpdate(PS_SignalUpdate x, PS_InStream stream)
12042 {
12043 uint8 extension;
12044 PS_UnknownSigMap map;
12045
12046 extension = GetBoolean(stream);
12047 x->option_of_rtp = GetBoolean(stream);
12048 x->duration = (uint16) GetInteger(1, 65535, stream);
12049 if (x->option_of_rtp)
12050 {
12051 Decode_Rtp(&x->rtp, stream);
12052 }
12053 /* ------------------------------- */
12054 /* ---- Extension Begins Here ---- */
12055 /* ------------------------------- */
12056 if (extension)
12057 {
12058 map = GetUnknownSigMap(stream);
12059 if (SkipUnreadExtensions(map, stream))
12060 {
12061 ErrorMessage("Decode_SignalUpdate: Unknown extensions (skipped)");
12062 }
12063 }
12064 }
12065
12066 /* <==============================> */
12067 /* PER-Decoder for Rtp (SEQUENCE) */
12068 /* <==============================> */
Decode_Rtp(PS_Rtp x,PS_InStream stream)12069 void Decode_Rtp(PS_Rtp x, PS_InStream stream)
12070 {
12071 uint8 extension;
12072 PS_UnknownSigMap map;
12073
12074 extension = GetBoolean(stream);
12075 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
12076 /* ------------------------------- */
12077 /* ---- Extension Begins Here ---- */
12078 /* ------------------------------- */
12079 if (extension)
12080 {
12081 map = GetUnknownSigMap(stream);
12082 if (SkipUnreadExtensions(map, stream))
12083 {
12084 ErrorMessage("Decode_Rtp: Unknown extensions (skipped)");
12085 }
12086 }
12087 }
12088
12089 /* <=================================> */
12090 /* PER-Decoder for Signal (SEQUENCE) */
12091 /* <=================================> */
Decode_Signal(PS_Signal x,PS_InStream stream)12092 void Decode_Signal(PS_Signal x, PS_InStream stream)
12093 {
12094 uint8 extension;
12095 PS_UnknownSigMap map;
12096
12097 extension = GetBoolean(stream);
12098 x->option_of_duration = GetBoolean(stream);
12099 x->option_of_signalRtp = GetBoolean(stream);
12100 GetCharString("IA5String", 0, 1, 1, "0123456789#*ABCD!", &x->signalType, stream);
12101 if (x->option_of_duration)
12102 {
12103 x->duration = (uint16) GetInteger(1, 65535, stream);
12104 }
12105 if (x->option_of_signalRtp)
12106 {
12107 Decode_SignalRtp(&x->signalRtp, stream);
12108 }
12109 /* ------------------------------- */
12110 /* ---- Extension Begins Here ---- */
12111 /* ------------------------------- */
12112 if (extension)
12113 {
12114 map = GetUnknownSigMap(stream);
12115 if (SkipUnreadExtensions(map, stream))
12116 {
12117 ErrorMessage("Decode_Signal: Unknown extensions (skipped)");
12118 }
12119 }
12120 }
12121
12122 /* <====================================> */
12123 /* PER-Decoder for SignalRtp (SEQUENCE) */
12124 /* <====================================> */
Decode_SignalRtp(PS_SignalRtp x,PS_InStream stream)12125 void Decode_SignalRtp(PS_SignalRtp x, PS_InStream stream)
12126 {
12127 uint8 extension;
12128 PS_UnknownSigMap map;
12129
12130 extension = GetBoolean(stream);
12131 x->option_of_timestamp = GetBoolean(stream);
12132 x->option_of_expirationTime = GetBoolean(stream);
12133 if (x->option_of_timestamp)
12134 {
12135 x->timestamp = GetInteger(0, 0xffffffff, stream);
12136 }
12137 if (x->option_of_expirationTime)
12138 {
12139 x->expirationTime = GetInteger(0, 0xffffffff, stream);
12140 }
12141 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
12142 /* ------------------------------- */
12143 /* ---- Extension Begins Here ---- */
12144 /* ------------------------------- */
12145 if (extension)
12146 {
12147 map = GetUnknownSigMap(stream);
12148 if (SkipUnreadExtensions(map, stream))
12149 {
12150 ErrorMessage("Decode_SignalRtp: Unknown extensions (skipped)");
12151 }
12152 }
12153 }
12154
12155 /* <===================================================> */
12156 /* PER-Decoder for UserInputSupportIndication (CHOICE) */
12157 /* <===================================================> */
Decode_UserInputSupportIndication(PS_UserInputSupportIndication x,PS_InStream stream)12158 void Decode_UserInputSupportIndication(PS_UserInputSupportIndication x, PS_InStream stream)
12159 {
12160 x->index = GetChoiceIndex(4, 1, stream);
12161 switch (x->index)
12162 {
12163 case 0:
12164 x->nonStandard = (PS_NonStandardParameter) OSCL_DEFAULT_MALLOC(sizeof(S_NonStandardParameter));
12165 Decode_NonStandardParameter(x->nonStandard, stream);
12166 break;
12167 case 1:
12168 /* (basicString is NULL) */
12169 break;
12170 case 2:
12171 /* (iA5String is NULL) */
12172 break;
12173 case 3:
12174 /* (generalString is NULL) */
12175 break;
12176 /* ------------------------------- */
12177 /* ---- Extension Begins Here ---- */
12178 /* ------------------------------- */
12179 default:
12180 ErrorMessage("Decode_UserInputSupportIndication: Unsupported extension (skipping)");
12181 SkipOneExtension(stream);
12182 }
12183 }
12184
12185 /* <================================================> */
12186 /* PER-Decoder for FlowControlIndication (SEQUENCE) */
12187 /* <================================================> */
Decode_FlowControlIndication(PS_FlowControlIndication x,PS_InStream stream)12188 void Decode_FlowControlIndication(PS_FlowControlIndication x, PS_InStream stream)
12189 {
12190 uint8 extension;
12191 PS_UnknownSigMap map;
12192
12193 extension = GetBoolean(stream);
12194 Decode_FciScope(&x->fciScope, stream);
12195 Decode_FciRestriction(&x->fciRestriction, stream);
12196 /* ------------------------------- */
12197 /* ---- Extension Begins Here ---- */
12198 /* ------------------------------- */
12199 if (extension)
12200 {
12201 map = GetUnknownSigMap(stream);
12202 if (SkipUnreadExtensions(map, stream))
12203 {
12204 ErrorMessage("Decode_FlowControlIndication: Unknown extensions (skipped)");
12205 }
12206 }
12207 }
12208
12209 /* <=======================================> */
12210 /* PER-Decoder for FciRestriction (CHOICE) */
12211 /* <=======================================> */
Decode_FciRestriction(PS_FciRestriction x,PS_InStream stream)12212 void Decode_FciRestriction(PS_FciRestriction x, PS_InStream stream)
12213 {
12214 x->index = GetChoiceIndex(2, 0, stream);
12215 switch (x->index)
12216 {
12217 case 0:
12218 x->maximumBitRate = GetInteger(0, 16777215, stream);
12219 break;
12220 case 1:
12221 /* (noRestriction is NULL) */
12222 break;
12223 default:
12224 ErrorMessageAndLeave("Decode_FciRestriction: Illegal CHOICE index");
12225 }
12226 }
12227
12228 /* <=================================> */
12229 /* PER-Decoder for FciScope (CHOICE) */
12230 /* <=================================> */
Decode_FciScope(PS_FciScope x,PS_InStream stream)12231 void Decode_FciScope(PS_FciScope x, PS_InStream stream)
12232 {
12233 x->index = GetChoiceIndex(3, 0, stream);
12234 switch (x->index)
12235 {
12236 case 0:
12237 x->logicalChannelNumber = (uint16) GetInteger(1, 65535, stream);
12238 break;
12239 case 1:
12240 x->resourceID = (uint16) GetInteger(0, 65535, stream);
12241 break;
12242 case 2:
12243 /* (wholeMultiplex is NULL) */
12244 break;
12245 default:
12246 ErrorMessageAndLeave("Decode_FciScope: Illegal CHOICE index");
12247 }
12248 }
12249
12250