Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20932 lines
654 KiB

  1. /* Copyright (C) Microsoft Corporation, 1995-1999. All rights reserved. */
  2. /* ASN.1 definitions for Multimedia System Control (H.245) */
  3. #include <windows.h>
  4. #include "h245pp.h"
  5. ASN1module_t H245PP_Module = NULL;
  6. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal_aal1_errorCorrection(ASN1encoding_t enc, NewATMVCIndication_aal_aal1_errorCorrection *val);
  7. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal_aal1_clockRecovery(ASN1encoding_t enc, NewATMVCIndication_aal_aal1_clockRecovery *val);
  8. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type_progressiveRefinementStart_repeatCount(ASN1encoding_t enc, MiscellaneousCommand_type_progressiveRefinementStart_repeatCount *val);
  9. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters_mode_eRM_recovery(ASN1encoding_t enc, V76LogicalChannelParameters_mode_eRM_recovery *val);
  10. static int ASN1CALL ASN1Enc_CustomPictureFormat_pixelAspectInformation_extendedPAR_Set(ASN1encoding_t enc, CustomPictureFormat_pixelAspectInformation_extendedPAR_Set *val);
  11. static int ASN1CALL ASN1Enc_CustomPictureFormat_mPI_customPCF_Set(ASN1encoding_t enc, CustomPictureFormat_mPI_customPCF_Set *val);
  12. static int ASN1CALL ASN1Enc_VCCapability_availableBitRates_type_rangeOfBitRates(ASN1encoding_t enc, VCCapability_availableBitRates_type_rangeOfBitRates *val);
  13. static int ASN1CALL ASN1Enc_TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded(ASN1encoding_t enc, TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded *val);
  14. static int ASN1CALL ASN1Enc_VCCapability_availableBitRates_type(ASN1encoding_t enc, VCCapability_availableBitRates_type *val);
  15. static int ASN1CALL ASN1Enc_H223Capability_h223MultiplexTableCapability_enhanced(ASN1encoding_t enc, H223Capability_h223MultiplexTableCapability_enhanced *val);
  16. static int ASN1CALL ASN1Enc_CustomPictureFormat_mPI_customPCF(ASN1encoding_t enc, CustomPictureFormat_mPI_customPCF *val);
  17. static int ASN1CALL ASN1Enc_CustomPictureFormat_pixelAspectInformation_extendedPAR(ASN1encoding_t enc, CustomPictureFormat_pixelAspectInformation_extendedPAR *val);
  18. static int ASN1CALL ASN1Enc_CustomPictureFormat_pixelAspectInformation_pixelAspectCode(ASN1encoding_t enc, CustomPictureFormat_pixelAspectInformation_pixelAspectCode *val);
  19. static int ASN1CALL ASN1Enc_H223LogicalChannelParameters_adaptationLayerType_al3(ASN1encoding_t enc, H223LogicalChannelParameters_adaptationLayerType_al3 *val);
  20. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters_mode_eRM(ASN1encoding_t enc, V76LogicalChannelParameters_mode_eRM *val);
  21. static int ASN1CALL ASN1Enc_UnicastAddress_iPSourceRouteAddress_route(ASN1encoding_t enc, PUnicastAddress_iPSourceRouteAddress_route *val);
  22. static int ASN1CALL ASN1Enc_UnicastAddress_iPSourceRouteAddress_routing(ASN1encoding_t enc, UnicastAddress_iPSourceRouteAddress_routing *val);
  23. static int ASN1CALL ASN1Enc_H223ModeParameters_adaptationLayerType_al3(ASN1encoding_t enc, H223ModeParameters_adaptationLayerType_al3 *val);
  24. static int ASN1CALL ASN1Enc_SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers(ASN1encoding_t enc, SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers *val);
  25. static int ASN1CALL ASN1Enc_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers(ASN1encoding_t enc, PSendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers *val);
  26. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type_progressiveRefinementStart(ASN1encoding_t enc, MiscellaneousCommand_type_progressiveRefinementStart *val);
  27. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type_videoFastUpdateMB(ASN1encoding_t enc, MiscellaneousCommand_type_videoFastUpdateMB *val);
  28. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type_videoFastUpdateGOB(ASN1encoding_t enc, MiscellaneousCommand_type_videoFastUpdateGOB *val);
  29. static int ASN1CALL ASN1Enc_MiscellaneousIndication_type_videoNotDecodedMBs(ASN1encoding_t enc, MiscellaneousIndication_type_videoNotDecodedMBs *val);
  30. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal_aal5(ASN1encoding_t enc, NewATMVCIndication_aal_aal5 *val);
  31. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal_aal1(ASN1encoding_t enc, NewATMVCIndication_aal_aal1 *val);
  32. static int ASN1CALL ASN1Enc_NewATMVCIndication_reverseParameters_multiplex(ASN1encoding_t enc, NewATMVCIndication_reverseParameters_multiplex *val);
  33. static int ASN1CALL ASN1Enc_UserInputIndication_signal_rtp(ASN1encoding_t enc, UserInputIndication_signal_rtp *val);
  34. static int ASN1CALL ASN1Enc_UserInputIndication_signalUpdate_rtp(ASN1encoding_t enc, UserInputIndication_signalUpdate_rtp *val);
  35. static int ASN1CALL ASN1Enc_UserInputIndication_signalUpdate(ASN1encoding_t enc, UserInputIndication_signalUpdate *val);
  36. static int ASN1CALL ASN1Enc_UserInputIndication_signal(ASN1encoding_t enc, UserInputIndication_signal *val);
  37. static int ASN1CALL ASN1Enc_NewATMVCIndication_reverseParameters(ASN1encoding_t enc, NewATMVCIndication_reverseParameters *val);
  38. static int ASN1CALL ASN1Enc_NewATMVCIndication_multiplex(ASN1encoding_t enc, NewATMVCIndication_multiplex *val);
  39. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal(ASN1encoding_t enc, NewATMVCIndication_aal *val);
  40. static int ASN1CALL ASN1Enc_JitterIndication_scope(ASN1encoding_t enc, JitterIndication_scope *val);
  41. static int ASN1CALL ASN1Enc_FunctionNotSupported_cause(ASN1encoding_t enc, FunctionNotSupported_cause *val);
  42. static int ASN1CALL ASN1Enc_H223MultiplexReconfiguration_h223AnnexADoubleFlag(ASN1encoding_t enc, H223MultiplexReconfiguration_h223AnnexADoubleFlag *val);
  43. static int ASN1CALL ASN1Enc_H223MultiplexReconfiguration_h223ModeChange(ASN1encoding_t enc, H223MultiplexReconfiguration_h223ModeChange *val);
  44. static int ASN1CALL ASN1Enc_EndSessionCommand_isdnOptions(ASN1encoding_t enc, EndSessionCommand_isdnOptions *val);
  45. static int ASN1CALL ASN1Enc_EndSessionCommand_gstnOptions(ASN1encoding_t enc, EndSessionCommand_gstnOptions *val);
  46. static int ASN1CALL ASN1Enc_FlowControlCommand_restriction(ASN1encoding_t enc, FlowControlCommand_restriction *val);
  47. static int ASN1CALL ASN1Enc_FlowControlCommand_scope(ASN1encoding_t enc, FlowControlCommand_scope *val);
  48. static int ASN1CALL ASN1Enc_SendTerminalCapabilitySet_specificRequest(ASN1encoding_t enc, SendTerminalCapabilitySet_specificRequest *val);
  49. static int ASN1CALL ASN1Enc_RemoteMCResponse_reject(ASN1encoding_t enc, RemoteMCResponse_reject *val);
  50. static int ASN1CALL ASN1Enc_ConferenceResponse_sendThisSourceResponse(ASN1encoding_t enc, ConferenceResponse_sendThisSourceResponse *val);
  51. static int ASN1CALL ASN1Enc_ConferenceResponse_makeTerminalBroadcasterResponse(ASN1encoding_t enc, ConferenceResponse_makeTerminalBroadcasterResponse *val);
  52. static int ASN1CALL ASN1Enc_ConferenceResponse_broadcastMyLogicalChannelResponse(ASN1encoding_t enc, ConferenceResponse_broadcastMyLogicalChannelResponse *val);
  53. static int ASN1CALL ASN1Enc_ConferenceResponse_extensionAddressResponse(ASN1encoding_t enc, ConferenceResponse_extensionAddressResponse *val);
  54. static int ASN1CALL ASN1Enc_ConferenceResponse_makeMeChairResponse(ASN1encoding_t enc, ConferenceResponse_makeMeChairResponse *val);
  55. static int ASN1CALL ASN1Enc_MaintenanceLoopReject_cause(ASN1encoding_t enc, MaintenanceLoopReject_cause *val);
  56. static int ASN1CALL ASN1Enc_MaintenanceLoopReject_type(ASN1encoding_t enc, MaintenanceLoopReject_type *val);
  57. static int ASN1CALL ASN1Enc_MaintenanceLoopAck_type(ASN1encoding_t enc, MaintenanceLoopAck_type *val);
  58. static int ASN1CALL ASN1Enc_MaintenanceLoopRequest_type(ASN1encoding_t enc, MaintenanceLoopRequest_type *val);
  59. static int ASN1CALL ASN1Enc_G7231AnnexCMode_g723AnnexCAudioMode(ASN1encoding_t enc, G7231AnnexCMode_g723AnnexCAudioMode *val);
  60. static int ASN1CALL ASN1Enc_IS13818AudioMode_multichannelType(ASN1encoding_t enc, IS13818AudioMode_multichannelType *val);
  61. static int ASN1CALL ASN1Enc_IS13818AudioMode_audioSampling(ASN1encoding_t enc, IS13818AudioMode_audioSampling *val);
  62. static int ASN1CALL ASN1Enc_IS13818AudioMode_audioLayer(ASN1encoding_t enc, IS13818AudioMode_audioLayer *val);
  63. static int ASN1CALL ASN1Enc_IS11172AudioMode_multichannelType(ASN1encoding_t enc, IS11172AudioMode_multichannelType *val);
  64. static int ASN1CALL ASN1Enc_IS11172AudioMode_audioSampling(ASN1encoding_t enc, IS11172AudioMode_audioSampling *val);
  65. static int ASN1CALL ASN1Enc_IS11172AudioMode_audioLayer(ASN1encoding_t enc, IS11172AudioMode_audioLayer *val);
  66. static int ASN1CALL ASN1Enc_AudioMode_g7231(ASN1encoding_t enc, AudioMode_g7231 *val);
  67. static int ASN1CALL ASN1Enc_H263VideoMode_resolution(ASN1encoding_t enc, H263VideoMode_resolution *val);
  68. static int ASN1CALL ASN1Enc_H262VideoMode_profileAndLevel(ASN1encoding_t enc, H262VideoMode_profileAndLevel *val);
  69. static int ASN1CALL ASN1Enc_H261VideoMode_resolution(ASN1encoding_t enc, H261VideoMode_resolution *val);
  70. static int ASN1CALL ASN1Enc_RequestModeReject_cause(ASN1encoding_t enc, RequestModeReject_cause *val);
  71. static int ASN1CALL ASN1Enc_RequestModeAck_response(ASN1encoding_t enc, RequestModeAck_response *val);
  72. static int ASN1CALL ASN1Enc_RequestMultiplexEntryRelease_entryNumbers(ASN1encoding_t enc, RequestMultiplexEntryRelease_entryNumbers *val);
  73. static int ASN1CALL ASN1Enc_RequestMultiplexEntryRejectionDescriptions_cause(ASN1encoding_t enc, RequestMultiplexEntryRejectionDescriptions_cause *val);
  74. static int ASN1CALL ASN1Enc_RequestMultiplexEntryReject_entryNumbers(ASN1encoding_t enc, RequestMultiplexEntryReject_entryNumbers *val);
  75. static int ASN1CALL ASN1Enc_RequestMultiplexEntryAck_entryNumbers(ASN1encoding_t enc, RequestMultiplexEntryAck_entryNumbers *val);
  76. static int ASN1CALL ASN1Enc_RequestMultiplexEntry_entryNumbers(ASN1encoding_t enc, RequestMultiplexEntry_entryNumbers *val);
  77. static int ASN1CALL ASN1Enc_MultiplexEntrySendRelease_multiplexTableEntryNumber(ASN1encoding_t enc, MultiplexEntrySendRelease_multiplexTableEntryNumber *val);
  78. static int ASN1CALL ASN1Enc_MultiplexEntryRejectionDescriptions_cause(ASN1encoding_t enc, MultiplexEntryRejectionDescriptions_cause *val);
  79. static int ASN1CALL ASN1Enc_MultiplexEntrySendAck_multiplexTableEntryNumber(ASN1encoding_t enc, MultiplexEntrySendAck_multiplexTableEntryNumber *val);
  80. static int ASN1CALL ASN1Enc_MultiplexElement_repeatCount(ASN1encoding_t enc, MultiplexElement_repeatCount *val);
  81. static int ASN1CALL ASN1Enc_MultiplexElement_type(ASN1encoding_t enc, MultiplexElement_type *val);
  82. static int ASN1CALL ASN1Enc_RequestChannelCloseReject_cause(ASN1encoding_t enc, RequestChannelCloseReject_cause *val);
  83. static int ASN1CALL ASN1Enc_RequestChannelClose_reason(ASN1encoding_t enc, RequestChannelClose_reason *val);
  84. static int ASN1CALL ASN1Enc_CloseLogicalChannel_reason(ASN1encoding_t enc, CloseLogicalChannel_reason *val);
  85. static int ASN1CALL ASN1Enc_CloseLogicalChannel_source(ASN1encoding_t enc, CloseLogicalChannel_source *val);
  86. static int ASN1CALL ASN1Enc_OpenLogicalChannelReject_cause(ASN1encoding_t enc, OpenLogicalChannelReject_cause *val);
  87. static int ASN1CALL ASN1Enc_MulticastAddress_iP6Address(ASN1encoding_t enc, MulticastAddress_iP6Address *val);
  88. static int ASN1CALL ASN1Enc_MulticastAddress_iPAddress(ASN1encoding_t enc, MulticastAddress_iPAddress *val);
  89. static int ASN1CALL ASN1Enc_UnicastAddress_iPSourceRouteAddress(ASN1encoding_t enc, UnicastAddress_iPSourceRouteAddress *val);
  90. static int ASN1CALL ASN1Enc_UnicastAddress_iP6Address(ASN1encoding_t enc, UnicastAddress_iP6Address *val);
  91. static int ASN1CALL ASN1Enc_UnicastAddress_iPXAddress(ASN1encoding_t enc, UnicastAddress_iPXAddress *val);
  92. static int ASN1CALL ASN1Enc_UnicastAddress_iPAddress(ASN1encoding_t enc, UnicastAddress_iPAddress *val);
  93. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters_mode(ASN1encoding_t enc, V76LogicalChannelParameters_mode *val);
  94. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters_suspendResume(ASN1encoding_t enc, V76LogicalChannelParameters_suspendResume *val);
  95. static int ASN1CALL ASN1Enc_H223AnnexCArqParameters_numberOfRetransmissions(ASN1encoding_t enc, H223AnnexCArqParameters_numberOfRetransmissions *val);
  96. static int ASN1CALL ASN1Enc_H223AL3MParameters_crcLength(ASN1encoding_t enc, H223AL3MParameters_crcLength *val);
  97. static int ASN1CALL ASN1Enc_H223AL3MParameters_headerFormat(ASN1encoding_t enc, H223AL3MParameters_headerFormat *val);
  98. static int ASN1CALL ASN1Enc_H223AL2MParameters_headerFEC(ASN1encoding_t enc, H223AL2MParameters_headerFEC *val);
  99. static int ASN1CALL ASN1Enc_H223AL1MParameters_crcLength(ASN1encoding_t enc, H223AL1MParameters_crcLength *val);
  100. static int ASN1CALL ASN1Enc_H223AL1MParameters_headerFEC(ASN1encoding_t enc, H223AL1MParameters_headerFEC *val);
  101. static int ASN1CALL ASN1Enc_H223AL1MParameters_transferMode(ASN1encoding_t enc, H223AL1MParameters_transferMode *val);
  102. static int ASN1CALL ASN1Enc_Q2931Address_address(ASN1encoding_t enc, Q2931Address_address *val);
  103. static int ASN1CALL ASN1Enc_NetworkAccessParameters_t120SetupProcedure(ASN1encoding_t enc, NetworkAccessParameters_t120SetupProcedure *val);
  104. static int ASN1CALL ASN1Enc_NetworkAccessParameters_distribution(ASN1encoding_t enc, NetworkAccessParameters_distribution *val);
  105. static int ASN1CALL ASN1Enc_T84Profile_t84Restricted(ASN1encoding_t enc, T84Profile_t84Restricted *val);
  106. static int ASN1CALL ASN1Enc_G7231AnnexCCapability_g723AnnexCAudioMode(ASN1encoding_t enc, G7231AnnexCCapability_g723AnnexCAudioMode *val);
  107. static int ASN1CALL ASN1Enc_AudioCapability_g7231(ASN1encoding_t enc, AudioCapability_g7231 *val);
  108. static int ASN1CALL ASN1Enc_CustomPictureFormat_pixelAspectInformation(ASN1encoding_t enc, CustomPictureFormat_pixelAspectInformation *val);
  109. static int ASN1CALL ASN1Enc_CustomPictureFormat_mPI(ASN1encoding_t enc, CustomPictureFormat_mPI *val);
  110. static int ASN1CALL ASN1Enc_RefPictureSelection_videoBackChannelSend(ASN1encoding_t enc, RefPictureSelection_videoBackChannelSend *val);
  111. static int ASN1CALL ASN1Enc_RefPictureSelection_additionalPictureMemory(ASN1encoding_t enc, RefPictureSelection_additionalPictureMemory *val);
  112. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyFrameMapping_frameSequence(ASN1encoding_t enc, RTPH263VideoRedundancyFrameMapping_frameSequence *val);
  113. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyEncoding_containedThreads(ASN1encoding_t enc, RTPH263VideoRedundancyEncoding_containedThreads *val);
  114. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyEncoding_frameToThreadMapping(ASN1encoding_t enc, RTPH263VideoRedundancyEncoding_frameToThreadMapping *val);
  115. static int ASN1CALL ASN1Enc_RedundancyEncodingCapability_secondaryEncoding(ASN1encoding_t enc, PRedundancyEncodingCapability_secondaryEncoding *val);
  116. static int ASN1CALL ASN1Enc_H2250Capability_mcCapability(ASN1encoding_t enc, H2250Capability_mcCapability *val);
  117. static int ASN1CALL ASN1Enc_H223Capability_mobileOperationTransmitCapability(ASN1encoding_t enc, H223Capability_mobileOperationTransmitCapability *val);
  118. static int ASN1CALL ASN1Enc_H223Capability_h223MultiplexTableCapability(ASN1encoding_t enc, H223Capability_h223MultiplexTableCapability *val);
  119. static int ASN1CALL ASN1Enc_VCCapability_availableBitRates(ASN1encoding_t enc, VCCapability_availableBitRates *val);
  120. static int ASN1CALL ASN1Enc_VCCapability_aal5(ASN1encoding_t enc, VCCapability_aal5 *val);
  121. static int ASN1CALL ASN1Enc_VCCapability_aal1(ASN1encoding_t enc, VCCapability_aal1 *val);
  122. static int ASN1CALL ASN1Enc_Capability_h233EncryptionReceiveCapability(ASN1encoding_t enc, Capability_h233EncryptionReceiveCapability *val);
  123. static int ASN1CALL ASN1Enc_TerminalCapabilitySetReject_cause(ASN1encoding_t enc, TerminalCapabilitySetReject_cause *val);
  124. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationReject_cause(ASN1encoding_t enc, MasterSlaveDeterminationReject_cause *val);
  125. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationAck_decision(ASN1encoding_t enc, MasterSlaveDeterminationAck_decision *val);
  126. static int ASN1CALL ASN1Enc_NonStandardIdentifier_h221NonStandard(ASN1encoding_t enc, NonStandardIdentifier_h221NonStandard *val);
  127. static int ASN1CALL ASN1Enc_NonStandardIdentifier(ASN1encoding_t enc, NonStandardIdentifier *val);
  128. static int ASN1CALL ASN1Enc_MasterSlaveDetermination(ASN1encoding_t enc, MasterSlaveDetermination *val);
  129. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationAck(ASN1encoding_t enc, MasterSlaveDeterminationAck *val);
  130. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationReject(ASN1encoding_t enc, MasterSlaveDeterminationReject *val);
  131. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationRelease(ASN1encoding_t enc, MasterSlaveDeterminationRelease *val);
  132. static int ASN1CALL ASN1Enc_CapabilityDescriptor(ASN1encoding_t enc, CapabilityDescriptor *val);
  133. static int ASN1CALL ASN1Enc_AlternativeCapabilitySet(ASN1encoding_t enc, AlternativeCapabilitySet *val);
  134. static int ASN1CALL ASN1Enc_TerminalCapabilitySetAck(ASN1encoding_t enc, TerminalCapabilitySetAck *val);
  135. static int ASN1CALL ASN1Enc_TerminalCapabilitySetReject(ASN1encoding_t enc, TerminalCapabilitySetReject *val);
  136. static int ASN1CALL ASN1Enc_TerminalCapabilitySetRelease(ASN1encoding_t enc, TerminalCapabilitySetRelease *val);
  137. static int ASN1CALL ASN1Enc_H222Capability(ASN1encoding_t enc, H222Capability *val);
  138. static int ASN1CALL ASN1Enc_VCCapability(ASN1encoding_t enc, VCCapability *val);
  139. static int ASN1CALL ASN1Enc_H223AnnexCCapability(ASN1encoding_t enc, H223AnnexCCapability *val);
  140. static int ASN1CALL ASN1Enc_V75Capability(ASN1encoding_t enc, V75Capability *val);
  141. static int ASN1CALL ASN1Enc_QOSMode(ASN1encoding_t enc, QOSMode *val);
  142. static int ASN1CALL ASN1Enc_ATMParameters(ASN1encoding_t enc, ATMParameters *val);
  143. static int ASN1CALL ASN1Enc_MediaTransportType(ASN1encoding_t enc, MediaTransportType *val);
  144. static int ASN1CALL ASN1Enc_MediaChannelCapability(ASN1encoding_t enc, MediaChannelCapability *val);
  145. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyEncoding(ASN1encoding_t enc, RTPH263VideoRedundancyEncoding *val);
  146. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyFrameMapping(ASN1encoding_t enc, RTPH263VideoRedundancyFrameMapping *val);
  147. static int ASN1CALL ASN1Enc_MultipointCapability(ASN1encoding_t enc, MultipointCapability *val);
  148. static int ASN1CALL ASN1Enc_MediaDistributionCapability(ASN1encoding_t enc, MediaDistributionCapability *val);
  149. static int ASN1CALL ASN1Enc_H261VideoCapability(ASN1encoding_t enc, H261VideoCapability *val);
  150. static int ASN1CALL ASN1Enc_H262VideoCapability(ASN1encoding_t enc, H262VideoCapability *val);
  151. static int ASN1CALL ASN1Enc_EnhancementLayerInfo(ASN1encoding_t enc, EnhancementLayerInfo *val);
  152. static int ASN1CALL ASN1Enc_TransparencyParameters(ASN1encoding_t enc, TransparencyParameters *val);
  153. static int ASN1CALL ASN1Enc_RefPictureSelection(ASN1encoding_t enc, RefPictureSelection *val);
  154. static int ASN1CALL ASN1Enc_CustomPictureClockFrequency(ASN1encoding_t enc, CustomPictureClockFrequency *val);
  155. static int ASN1CALL ASN1Enc_CustomPictureFormat(ASN1encoding_t enc, CustomPictureFormat *val);
  156. static int ASN1CALL ASN1Enc_H263ModeComboFlags(ASN1encoding_t enc, H263ModeComboFlags *val);
  157. static int ASN1CALL ASN1Enc_IS11172VideoCapability(ASN1encoding_t enc, IS11172VideoCapability *val);
  158. static int ASN1CALL ASN1Enc_G7231AnnexCCapability(ASN1encoding_t enc, G7231AnnexCCapability *val);
  159. static int ASN1CALL ASN1Enc_IS11172AudioCapability(ASN1encoding_t enc, IS11172AudioCapability *val);
  160. static int ASN1CALL ASN1Enc_IS13818AudioCapability(ASN1encoding_t enc, IS13818AudioCapability *val);
  161. static int ASN1CALL ASN1Enc_GSMAudioCapability(ASN1encoding_t enc, GSMAudioCapability *val);
  162. static int ASN1CALL ASN1Enc_V42bis(ASN1encoding_t enc, V42bis *val);
  163. static int ASN1CALL ASN1Enc_T84Profile(ASN1encoding_t enc, T84Profile *val);
  164. static int ASN1CALL ASN1Enc_ConferenceCapability(ASN1encoding_t enc, ConferenceCapability *val);
  165. static int ASN1CALL ASN1Enc_Q2931Address(ASN1encoding_t enc, Q2931Address *val);
  166. static int ASN1CALL ASN1Enc_V75Parameters(ASN1encoding_t enc, V75Parameters *val);
  167. static int ASN1CALL ASN1Enc_H222LogicalChannelParameters(ASN1encoding_t enc, H222LogicalChannelParameters *val);
  168. static int ASN1CALL ASN1Enc_H223AL2MParameters(ASN1encoding_t enc, H223AL2MParameters *val);
  169. static int ASN1CALL ASN1Enc_H223AnnexCArqParameters(ASN1encoding_t enc, H223AnnexCArqParameters *val);
  170. static int ASN1CALL ASN1Enc_CRCLength(ASN1encoding_t enc, CRCLength *val);
  171. static int ASN1CALL ASN1Enc_EscrowData(ASN1encoding_t enc, EscrowData *val);
  172. static int ASN1CALL ASN1Enc_OpenLogicalChannelReject(ASN1encoding_t enc, OpenLogicalChannelReject *val);
  173. static int ASN1CALL ASN1Enc_OpenLogicalChannelConfirm(ASN1encoding_t enc, OpenLogicalChannelConfirm *val);
  174. static int ASN1CALL ASN1Enc_CloseLogicalChannel(ASN1encoding_t enc, CloseLogicalChannel *val);
  175. static int ASN1CALL ASN1Enc_CloseLogicalChannelAck(ASN1encoding_t enc, CloseLogicalChannelAck *val);
  176. static int ASN1CALL ASN1Enc_RequestChannelCloseAck(ASN1encoding_t enc, RequestChannelCloseAck *val);
  177. static int ASN1CALL ASN1Enc_RequestChannelCloseReject(ASN1encoding_t enc, RequestChannelCloseReject *val);
  178. static int ASN1CALL ASN1Enc_RequestChannelCloseRelease(ASN1encoding_t enc, RequestChannelCloseRelease *val);
  179. static int ASN1CALL ASN1Enc_MultiplexEntrySend(ASN1encoding_t enc, MultiplexEntrySend *val);
  180. static int ASN1CALL ASN1Enc_MultiplexElement(ASN1encoding_t enc, MultiplexElement *val);
  181. static int ASN1CALL ASN1Enc_MultiplexEntrySendAck(ASN1encoding_t enc, MultiplexEntrySendAck *val);
  182. static int ASN1CALL ASN1Enc_MultiplexEntryRejectionDescriptions(ASN1encoding_t enc, MultiplexEntryRejectionDescriptions *val);
  183. static int ASN1CALL ASN1Enc_MultiplexEntrySendRelease(ASN1encoding_t enc, MultiplexEntrySendRelease *val);
  184. static int ASN1CALL ASN1Enc_RequestMultiplexEntry(ASN1encoding_t enc, RequestMultiplexEntry *val);
  185. static int ASN1CALL ASN1Enc_RequestMultiplexEntryAck(ASN1encoding_t enc, RequestMultiplexEntryAck *val);
  186. static int ASN1CALL ASN1Enc_RequestMultiplexEntryRejectionDescriptions(ASN1encoding_t enc, RequestMultiplexEntryRejectionDescriptions *val);
  187. static int ASN1CALL ASN1Enc_RequestMultiplexEntryRelease(ASN1encoding_t enc, RequestMultiplexEntryRelease *val);
  188. static int ASN1CALL ASN1Enc_RequestMode(ASN1encoding_t enc, RequestMode *val);
  189. static int ASN1CALL ASN1Enc_RequestModeAck(ASN1encoding_t enc, RequestModeAck *val);
  190. static int ASN1CALL ASN1Enc_RequestModeReject(ASN1encoding_t enc, RequestModeReject *val);
  191. static int ASN1CALL ASN1Enc_RequestModeRelease(ASN1encoding_t enc, RequestModeRelease *val);
  192. static int ASN1CALL ASN1Enc_V76ModeParameters(ASN1encoding_t enc, V76ModeParameters *val);
  193. static int ASN1CALL ASN1Enc_H261VideoMode(ASN1encoding_t enc, H261VideoMode *val);
  194. static int ASN1CALL ASN1Enc_H262VideoMode(ASN1encoding_t enc, H262VideoMode *val);
  195. static int ASN1CALL ASN1Enc_IS11172VideoMode(ASN1encoding_t enc, IS11172VideoMode *val);
  196. static int ASN1CALL ASN1Enc_IS11172AudioMode(ASN1encoding_t enc, IS11172AudioMode *val);
  197. static int ASN1CALL ASN1Enc_IS13818AudioMode(ASN1encoding_t enc, IS13818AudioMode *val);
  198. static int ASN1CALL ASN1Enc_G7231AnnexCMode(ASN1encoding_t enc, G7231AnnexCMode *val);
  199. static int ASN1CALL ASN1Enc_RoundTripDelayRequest(ASN1encoding_t enc, RoundTripDelayRequest *val);
  200. static int ASN1CALL ASN1Enc_RoundTripDelayResponse(ASN1encoding_t enc, RoundTripDelayResponse *val);
  201. static int ASN1CALL ASN1Enc_MaintenanceLoopRequest(ASN1encoding_t enc, MaintenanceLoopRequest *val);
  202. static int ASN1CALL ASN1Enc_MaintenanceLoopAck(ASN1encoding_t enc, MaintenanceLoopAck *val);
  203. static int ASN1CALL ASN1Enc_MaintenanceLoopReject(ASN1encoding_t enc, MaintenanceLoopReject *val);
  204. static int ASN1CALL ASN1Enc_MaintenanceLoopOffCommand(ASN1encoding_t enc, MaintenanceLoopOffCommand *val);
  205. static int ASN1CALL ASN1Enc_CommunicationModeCommand(ASN1encoding_t enc, CommunicationModeCommand *val);
  206. static int ASN1CALL ASN1Enc_CommunicationModeRequest(ASN1encoding_t enc, CommunicationModeRequest *val);
  207. static int ASN1CALL ASN1Enc_CommunicationModeResponse(ASN1encoding_t enc, CommunicationModeResponse *val);
  208. static int ASN1CALL ASN1Enc_Criteria(ASN1encoding_t enc, Criteria *val);
  209. static int ASN1CALL ASN1Enc_TerminalLabel(ASN1encoding_t enc, TerminalLabel *val);
  210. static int ASN1CALL ASN1Enc_RequestAllTerminalIDsResponse(ASN1encoding_t enc, RequestAllTerminalIDsResponse *val);
  211. static int ASN1CALL ASN1Enc_TerminalInformation(ASN1encoding_t enc, TerminalInformation *val);
  212. static int ASN1CALL ASN1Enc_RemoteMCRequest(ASN1encoding_t enc, RemoteMCRequest *val);
  213. static int ASN1CALL ASN1Enc_RemoteMCResponse(ASN1encoding_t enc, RemoteMCResponse *val);
  214. static int ASN1CALL ASN1Enc_SendTerminalCapabilitySet(ASN1encoding_t enc, SendTerminalCapabilitySet *val);
  215. static int ASN1CALL ASN1Enc_FlowControlCommand(ASN1encoding_t enc, FlowControlCommand *val);
  216. static int ASN1CALL ASN1Enc_SubstituteConferenceIDCommand(ASN1encoding_t enc, SubstituteConferenceIDCommand *val);
  217. static int ASN1CALL ASN1Enc_KeyProtectionMethod(ASN1encoding_t enc, KeyProtectionMethod *val);
  218. static int ASN1CALL ASN1Enc_EncryptionUpdateRequest(ASN1encoding_t enc, EncryptionUpdateRequest *val);
  219. static int ASN1CALL ASN1Enc_H223MultiplexReconfiguration(ASN1encoding_t enc, H223MultiplexReconfiguration *val);
  220. static int ASN1CALL ASN1Enc_FunctionNotSupported(ASN1encoding_t enc, FunctionNotSupported *val);
  221. static int ASN1CALL ASN1Enc_TerminalYouAreSeeingInSubPictureNumber(ASN1encoding_t enc, TerminalYouAreSeeingInSubPictureNumber *val);
  222. static int ASN1CALL ASN1Enc_VideoIndicateCompose(ASN1encoding_t enc, VideoIndicateCompose *val);
  223. static int ASN1CALL ASN1Enc_ConferenceIndication(ASN1encoding_t enc, ConferenceIndication *val);
  224. static int ASN1CALL ASN1Enc_JitterIndication(ASN1encoding_t enc, JitterIndication *val);
  225. static int ASN1CALL ASN1Enc_H223SkewIndication(ASN1encoding_t enc, H223SkewIndication *val);
  226. static int ASN1CALL ASN1Enc_H2250MaximumSkewIndication(ASN1encoding_t enc, H2250MaximumSkewIndication *val);
  227. static int ASN1CALL ASN1Enc_VendorIdentification(ASN1encoding_t enc, VendorIdentification *val);
  228. static int ASN1CALL ASN1Enc_NewATMVCIndication(ASN1encoding_t enc, NewATMVCIndication *val);
  229. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom(ASN1encoding_t enc, PRTPH263VideoRedundancyEncoding_frameToThreadMapping_custom *val);
  230. static int ASN1CALL ASN1Enc_MultiplexElement_type_subElementList(ASN1encoding_t enc, PMultiplexElement_type_subElementList *val);
  231. static int ASN1CALL ASN1Enc_RequestAllTerminalIDsResponse_terminalInformation(ASN1encoding_t enc, PRequestAllTerminalIDsResponse_terminalInformation *val);
  232. static int ASN1CALL ASN1Enc_ConferenceResponse_terminalCertificateResponse(ASN1encoding_t enc, ConferenceResponse_terminalCertificateResponse *val);
  233. static int ASN1CALL ASN1Enc_ConferenceResponse_chairTokenOwnerResponse(ASN1encoding_t enc, ConferenceResponse_chairTokenOwnerResponse *val);
  234. static int ASN1CALL ASN1Enc_ConferenceResponse_terminalListResponse(ASN1encoding_t enc, ConferenceResponse_terminalListResponse *val);
  235. static int ASN1CALL ASN1Enc_ConferenceResponse_passwordResponse(ASN1encoding_t enc, ConferenceResponse_passwordResponse *val);
  236. static int ASN1CALL ASN1Enc_ConferenceResponse_conferenceIDResponse(ASN1encoding_t enc, ConferenceResponse_conferenceIDResponse *val);
  237. static int ASN1CALL ASN1Enc_ConferenceResponse_terminalIDResponse(ASN1encoding_t enc, ConferenceResponse_terminalIDResponse *val);
  238. static int ASN1CALL ASN1Enc_ConferenceResponse_mCTerminalIDResponse(ASN1encoding_t enc, ConferenceResponse_mCTerminalIDResponse *val);
  239. static int ASN1CALL ASN1Enc_ConferenceRequest_requestTerminalCertificate(ASN1encoding_t enc, ConferenceRequest_requestTerminalCertificate *val);
  240. static int ASN1CALL ASN1Enc_RequestMultiplexEntryReject_rejectionDescriptions(ASN1encoding_t enc, RequestMultiplexEntryReject_rejectionDescriptions *val);
  241. static int ASN1CALL ASN1Enc_MultiplexEntrySendReject_rejectionDescriptions(ASN1encoding_t enc, MultiplexEntrySendReject_rejectionDescriptions *val);
  242. static int ASN1CALL ASN1Enc_MultiplexEntryDescriptor_elementList(ASN1encoding_t enc, MultiplexEntryDescriptor_elementList *val);
  243. static int ASN1CALL ASN1Enc_EncryptionSync_escrowentry(ASN1encoding_t enc, PEncryptionSync_escrowentry *val);
  244. static int ASN1CALL ASN1Enc_H223AL3MParameters_arqType(ASN1encoding_t enc, H223AL3MParameters_arqType *val);
  245. static int ASN1CALL ASN1Enc_H223AL1MParameters_arqType(ASN1encoding_t enc, H223AL1MParameters_arqType *val);
  246. static int ASN1CALL ASN1Enc_H263VideoModeCombos_h263VideoCoupledModes(ASN1encoding_t enc, H263VideoModeCombos_h263VideoCoupledModes *val);
  247. static int ASN1CALL ASN1Enc_H263Options_customPictureFormat(ASN1encoding_t enc, PH263Options_customPictureFormat *val);
  248. static int ASN1CALL ASN1Enc_H263Options_customPictureClockFrequency(ASN1encoding_t enc, PH263Options_customPictureClockFrequency *val);
  249. static int ASN1CALL ASN1Enc_MultipointCapability_mediaDistributionCapability(ASN1encoding_t enc, PMultipointCapability_mediaDistributionCapability *val);
  250. static int ASN1CALL ASN1Enc_TransportCapability_mediaChannelCapabilities(ASN1encoding_t enc, TransportCapability_mediaChannelCapabilities *val);
  251. static int ASN1CALL ASN1Enc_H222Capability_vcCapability(ASN1encoding_t enc, PH222Capability_vcCapability *val);
  252. static int ASN1CALL ASN1Enc_CapabilityDescriptor_simultaneousCapabilities(ASN1encoding_t enc, PCapabilityDescriptor_simultaneousCapabilities *val);
  253. static int ASN1CALL ASN1Enc_TerminalCapabilitySet_capabilityDescriptors(ASN1encoding_t enc, TerminalCapabilitySet_capabilityDescriptors *val);
  254. static int ASN1CALL ASN1Enc_NonStandardParameter(ASN1encoding_t enc, NonStandardParameter *val);
  255. static int ASN1CALL ASN1Enc_H223Capability(ASN1encoding_t enc, H223Capability *val);
  256. static int ASN1CALL ASN1Enc_V76Capability(ASN1encoding_t enc, V76Capability *val);
  257. static int ASN1CALL ASN1Enc_RSVPParameters(ASN1encoding_t enc, RSVPParameters *val);
  258. static int ASN1CALL ASN1Enc_QOSCapability(ASN1encoding_t enc, QOSCapability *val);
  259. static int ASN1CALL ASN1Enc_TransportCapability(ASN1encoding_t enc, TransportCapability *val);
  260. static int ASN1CALL ASN1Enc_RedundancyEncodingMethod(ASN1encoding_t enc, RedundancyEncodingMethod *val);
  261. static int ASN1CALL ASN1Enc_H263Options(ASN1encoding_t enc, H263Options *val);
  262. static int ASN1CALL ASN1Enc_H263VideoModeCombos(ASN1encoding_t enc, H263VideoModeCombos *val);
  263. static int ASN1CALL ASN1Enc_AudioCapability(ASN1encoding_t enc, AudioCapability *val);
  264. static int ASN1CALL ASN1Enc_CompressionType(ASN1encoding_t enc, CompressionType *val);
  265. static int ASN1CALL ASN1Enc_MediaEncryptionAlgorithm(ASN1encoding_t enc, MediaEncryptionAlgorithm *val);
  266. static int ASN1CALL ASN1Enc_AuthenticationCapability(ASN1encoding_t enc, AuthenticationCapability *val);
  267. static int ASN1CALL ASN1Enc_IntegrityCapability(ASN1encoding_t enc, IntegrityCapability *val);
  268. static int ASN1CALL ASN1Enc_H223AL1MParameters(ASN1encoding_t enc, H223AL1MParameters *val);
  269. static int ASN1CALL ASN1Enc_H223AL3MParameters(ASN1encoding_t enc, H223AL3MParameters *val);
  270. static int ASN1CALL ASN1Enc_V76HDLCParameters(ASN1encoding_t enc, V76HDLCParameters *val);
  271. static int ASN1CALL ASN1Enc_UnicastAddress(ASN1encoding_t enc, UnicastAddress *val);
  272. static int ASN1CALL ASN1Enc_MulticastAddress(ASN1encoding_t enc, MulticastAddress *val);
  273. static int ASN1CALL ASN1Enc_EncryptionSync(ASN1encoding_t enc, EncryptionSync *val);
  274. static int ASN1CALL ASN1Enc_RequestChannelClose(ASN1encoding_t enc, RequestChannelClose *val);
  275. static int ASN1CALL ASN1Enc_MultiplexEntryDescriptor(ASN1encoding_t enc, MultiplexEntryDescriptor *val);
  276. static int ASN1CALL ASN1Enc_MultiplexEntrySendReject(ASN1encoding_t enc, MultiplexEntrySendReject *val);
  277. static int ASN1CALL ASN1Enc_RequestMultiplexEntryReject(ASN1encoding_t enc, RequestMultiplexEntryReject *val);
  278. static int ASN1CALL ASN1Enc_H263VideoMode(ASN1encoding_t enc, H263VideoMode *val);
  279. static int ASN1CALL ASN1Enc_AudioMode(ASN1encoding_t enc, AudioMode *val);
  280. static int ASN1CALL ASN1Enc_EncryptionMode(ASN1encoding_t enc, EncryptionMode *val);
  281. static int ASN1CALL ASN1Enc_ConferenceRequest(ASN1encoding_t enc, ConferenceRequest *val);
  282. static int ASN1CALL ASN1Enc_CertSelectionCriteria(ASN1encoding_t enc, PCertSelectionCriteria *val);
  283. static int ASN1CALL ASN1Enc_ConferenceResponse(ASN1encoding_t enc, ConferenceResponse *val);
  284. static int ASN1CALL ASN1Enc_EndSessionCommand(ASN1encoding_t enc, EndSessionCommand *val);
  285. static int ASN1CALL ASN1Enc_ConferenceCommand(ASN1encoding_t enc, ConferenceCommand *val);
  286. static int ASN1CALL ASN1Enc_UserInputIndication_userInputSupportIndication(ASN1encoding_t enc, UserInputIndication_userInputSupportIndication *val);
  287. static int ASN1CALL ASN1Enc_MiscellaneousIndication_type(ASN1encoding_t enc, MiscellaneousIndication_type *val);
  288. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type(ASN1encoding_t enc, MiscellaneousCommand_type *val);
  289. static int ASN1CALL ASN1Enc_EncryptionCommand_encryptionAlgorithmID(ASN1encoding_t enc, EncryptionCommand_encryptionAlgorithmID *val);
  290. static int ASN1CALL ASN1Enc_CommunicationModeTableEntry_nonStandard(ASN1encoding_t enc, PCommunicationModeTableEntry_nonStandard *val);
  291. static int ASN1CALL ASN1Enc_RedundancyEncodingMode_secondaryEncoding(ASN1encoding_t enc, RedundancyEncodingMode_secondaryEncoding *val);
  292. static int ASN1CALL ASN1Enc_H223ModeParameters_adaptationLayerType(ASN1encoding_t enc, H223ModeParameters_adaptationLayerType *val);
  293. static int ASN1CALL ASN1Enc_MultiplexEntrySend_multiplexEntryDescriptors(ASN1encoding_t enc, PMultiplexEntrySend_multiplexEntryDescriptors *val);
  294. static int ASN1CALL ASN1Enc_H2250LogicalChannelAckParameters_nonStandard(ASN1encoding_t enc, PH2250LogicalChannelAckParameters_nonStandard *val);
  295. static int ASN1CALL ASN1Enc_RTPPayloadType_payloadDescriptor(ASN1encoding_t enc, RTPPayloadType_payloadDescriptor *val);
  296. static int ASN1CALL ASN1Enc_H2250LogicalChannelParameters_nonStandard(ASN1encoding_t enc, PH2250LogicalChannelParameters_nonStandard *val);
  297. static int ASN1CALL ASN1Enc_H223LogicalChannelParameters_adaptationLayerType(ASN1encoding_t enc, H223LogicalChannelParameters_adaptationLayerType *val);
  298. static int ASN1CALL ASN1Enc_ConferenceCapability_nonStandardData(ASN1encoding_t enc, PConferenceCapability_nonStandardData *val);
  299. static int ASN1CALL ASN1Enc_UserInputCapability_nonStandard(ASN1encoding_t enc, UserInputCapability_nonStandard *val);
  300. static int ASN1CALL ASN1Enc_DataProtocolCapability_v76wCompression(ASN1encoding_t enc, DataProtocolCapability_v76wCompression *val);
  301. static int ASN1CALL ASN1Enc_H263Options_modeCombos(ASN1encoding_t enc, PH263Options_modeCombos *val);
  302. static int ASN1CALL ASN1Enc_TransportCapability_qOSCapabilities(ASN1encoding_t enc, PTransportCapability_qOSCapabilities *val);
  303. static int ASN1CALL ASN1Enc_NonStandardMessage(ASN1encoding_t enc, NonStandardMessage *val);
  304. static int ASN1CALL ASN1Enc_RedundancyEncodingCapability(ASN1encoding_t enc, RedundancyEncodingCapability *val);
  305. static int ASN1CALL ASN1Enc_H263VideoCapability(ASN1encoding_t enc, H263VideoCapability *val);
  306. static int ASN1CALL ASN1Enc_EnhancementOptions(ASN1encoding_t enc, EnhancementOptions *val);
  307. static int ASN1CALL ASN1Enc_DataProtocolCapability(ASN1encoding_t enc, DataProtocolCapability *val);
  308. static int ASN1CALL ASN1Enc_EncryptionAuthenticationAndIntegrity(ASN1encoding_t enc, EncryptionAuthenticationAndIntegrity *val);
  309. static int ASN1CALL ASN1Enc_EncryptionCapability(ASN1encoding_t enc, PEncryptionCapability *val);
  310. static int ASN1CALL ASN1Enc_UserInputCapability(ASN1encoding_t enc, UserInputCapability *val);
  311. static int ASN1CALL ASN1Enc_H223LogicalChannelParameters(ASN1encoding_t enc, H223LogicalChannelParameters *val);
  312. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters(ASN1encoding_t enc, V76LogicalChannelParameters *val);
  313. static int ASN1CALL ASN1Enc_RTPPayloadType(ASN1encoding_t enc, RTPPayloadType *val);
  314. static int ASN1CALL ASN1Enc_H245TransportAddress(ASN1encoding_t enc, H245TransportAddress *val);
  315. static int ASN1CALL ASN1Enc_H2250LogicalChannelAckParameters(ASN1encoding_t enc, H2250LogicalChannelAckParameters *val);
  316. static int ASN1CALL ASN1Enc_H223ModeParameters(ASN1encoding_t enc, H223ModeParameters *val);
  317. static int ASN1CALL ASN1Enc_RedundancyEncodingMode(ASN1encoding_t enc, RedundancyEncodingMode *val);
  318. static int ASN1CALL ASN1Enc_VideoMode(ASN1encoding_t enc, VideoMode *val);
  319. static int ASN1CALL ASN1Enc_EncryptionCommand(ASN1encoding_t enc, EncryptionCommand *val);
  320. static int ASN1CALL ASN1Enc_MiscellaneousCommand(ASN1encoding_t enc, MiscellaneousCommand *val);
  321. static int ASN1CALL ASN1Enc_MiscellaneousIndication(ASN1encoding_t enc, MiscellaneousIndication *val);
  322. static int ASN1CALL ASN1Enc_MCLocationIndication(ASN1encoding_t enc, MCLocationIndication *val);
  323. static int ASN1CALL ASN1Enc_UserInputIndication(ASN1encoding_t enc, UserInputIndication *val);
  324. static int ASN1CALL ASN1Enc_DataApplicationCapability_application_nlpid(ASN1encoding_t enc, DataApplicationCapability_application_nlpid *val);
  325. static int ASN1CALL ASN1Enc_DataApplicationCapability_application_t84(ASN1encoding_t enc, DataApplicationCapability_application_t84 *val);
  326. static int ASN1CALL ASN1Enc_DataMode_application_nlpid(ASN1encoding_t enc, DataMode_application_nlpid *val);
  327. static int ASN1CALL ASN1Enc_DataMode_application(ASN1encoding_t enc, DataMode_application *val);
  328. static int ASN1CALL ASN1Enc_OpenLogicalChannelAck_forwardMultiplexAckParameters(ASN1encoding_t enc, OpenLogicalChannelAck_forwardMultiplexAckParameters *val);
  329. static int ASN1CALL ASN1Enc_H2250LogicalChannelParameters_mediaPacketization(ASN1encoding_t enc, H2250LogicalChannelParameters_mediaPacketization *val);
  330. static int ASN1CALL ASN1Enc_NetworkAccessParameters_networkAddress(ASN1encoding_t enc, NetworkAccessParameters_networkAddress *val);
  331. static int ASN1CALL ASN1Enc_DataApplicationCapability_application(ASN1encoding_t enc, DataApplicationCapability_application *val);
  332. static int ASN1CALL ASN1Enc_EnhancementLayerInfo_spatialEnhancement(ASN1encoding_t enc, PEnhancementLayerInfo_spatialEnhancement *val);
  333. static int ASN1CALL ASN1Enc_EnhancementLayerInfo_snrEnhancement(ASN1encoding_t enc, PEnhancementLayerInfo_snrEnhancement *val);
  334. static int ASN1CALL ASN1Enc_MediaPacketizationCapability_rtpPayloadType(ASN1encoding_t enc, MediaPacketizationCapability_rtpPayloadType *val);
  335. static int ASN1CALL ASN1Enc_H2250Capability_redundancyEncodingCapability(ASN1encoding_t enc, PH2250Capability_redundancyEncodingCapability *val);
  336. static int ASN1CALL ASN1Enc_CommandMessage(ASN1encoding_t enc, CommandMessage *val);
  337. static int ASN1CALL ASN1Enc_H235SecurityCapability(ASN1encoding_t enc, H235SecurityCapability *val);
  338. static int ASN1CALL ASN1Enc_MediaPacketizationCapability(ASN1encoding_t enc, MediaPacketizationCapability *val);
  339. static int ASN1CALL ASN1Enc_VideoCapability(ASN1encoding_t enc, VideoCapability *val);
  340. static int ASN1CALL ASN1Enc_BEnhancementParameters(ASN1encoding_t enc, BEnhancementParameters *val);
  341. static int ASN1CALL ASN1Enc_DataApplicationCapability(ASN1encoding_t enc, DataApplicationCapability *val);
  342. static int ASN1CALL ASN1Enc_NetworkAccessParameters(ASN1encoding_t enc, NetworkAccessParameters *val);
  343. static int ASN1CALL ASN1Enc_H2250ModeParameters(ASN1encoding_t enc, H2250ModeParameters *val);
  344. static int ASN1CALL ASN1Enc_DataMode(ASN1encoding_t enc, DataMode *val);
  345. static int ASN1CALL ASN1Enc_CommunicationModeTableEntry_dataType(ASN1encoding_t enc, CommunicationModeTableEntry_dataType *val);
  346. static int ASN1CALL ASN1Enc_H235Mode_mediaMode(ASN1encoding_t enc, H235Mode_mediaMode *val);
  347. static int ASN1CALL ASN1Enc_H235Media_mediaType(ASN1encoding_t enc, H235Media_mediaType *val);
  348. static int ASN1CALL ASN1Enc_EnhancementLayerInfo_bPictureEnhancement(ASN1encoding_t enc, PEnhancementLayerInfo_bPictureEnhancement *val);
  349. static int ASN1CALL ASN1Enc_MediaDistributionCapability_distributedData(ASN1encoding_t enc, PMediaDistributionCapability_distributedData *val);
  350. static int ASN1CALL ASN1Enc_MediaDistributionCapability_centralizedData(ASN1encoding_t enc, PMediaDistributionCapability_centralizedData *val);
  351. static int ASN1CALL ASN1Enc_Capability(ASN1encoding_t enc, Capability *val);
  352. static int ASN1CALL ASN1Enc_H2250Capability(ASN1encoding_t enc, H2250Capability *val);
  353. static int ASN1CALL ASN1Enc_H235Media(ASN1encoding_t enc, H235Media *val);
  354. static int ASN1CALL ASN1Enc_H235Mode(ASN1encoding_t enc, H235Mode *val);
  355. static int ASN1CALL ASN1Enc_ModeElement_type(ASN1encoding_t enc, ModeElement_type *val);
  356. static int ASN1CALL ASN1Enc_CapabilityTableEntry(ASN1encoding_t enc, CapabilityTableEntry *val);
  357. static int ASN1CALL ASN1Enc_MultiplexCapability(ASN1encoding_t enc, MultiplexCapability *val);
  358. static int ASN1CALL ASN1Enc_DataType(ASN1encoding_t enc, DataType *val);
  359. static int ASN1CALL ASN1Enc_RedundancyEncoding(ASN1encoding_t enc, RedundancyEncoding *val);
  360. static int ASN1CALL ASN1Enc_ModeElement(ASN1encoding_t enc, ModeElement *val);
  361. static int ASN1CALL ASN1Enc_CommunicationModeTableEntry(ASN1encoding_t enc, CommunicationModeTableEntry *val);
  362. static int ASN1CALL ASN1Enc_CommunicationModeResponse_communicationModeTable(ASN1encoding_t enc, PCommunicationModeResponse_communicationModeTable *val);
  363. static int ASN1CALL ASN1Enc_CommunicationModeCommand_communicationModeTable(ASN1encoding_t enc, PCommunicationModeCommand_communicationModeTable *val);
  364. static int ASN1CALL ASN1Enc_TerminalCapabilitySet_capabilityTable(ASN1encoding_t enc, PTerminalCapabilitySet_capabilityTable *val);
  365. static int ASN1CALL ASN1Enc_TerminalCapabilitySet(ASN1encoding_t enc, TerminalCapabilitySet *val);
  366. static int ASN1CALL ASN1Enc_H2250LogicalChannelParameters(ASN1encoding_t enc, H2250LogicalChannelParameters *val);
  367. static int ASN1CALL ASN1Enc_ModeDescription(ASN1encoding_t enc, ModeDescription *val);
  368. static int ASN1CALL ASN1Enc_OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters(ASN1encoding_t enc, OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters *val);
  369. static int ASN1CALL ASN1Enc_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters(ASN1encoding_t enc, OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters *val);
  370. static int ASN1CALL ASN1Enc_OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters(ASN1encoding_t enc, OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters *val);
  371. static int ASN1CALL ASN1Enc_RequestMode_requestedModes(ASN1encoding_t enc, PRequestMode_requestedModes *val);
  372. static int ASN1CALL ASN1Enc_OpenLogicalChannelAck_reverseLogicalChannelParameters(ASN1encoding_t enc, OpenLogicalChannelAck_reverseLogicalChannelParameters *val);
  373. static int ASN1CALL ASN1Enc_OpenLogicalChannel_reverseLogicalChannelParameters(ASN1encoding_t enc, OpenLogicalChannel_reverseLogicalChannelParameters *val);
  374. static int ASN1CALL ASN1Enc_OpenLogicalChannel_forwardLogicalChannelParameters(ASN1encoding_t enc, OpenLogicalChannel_forwardLogicalChannelParameters *val);
  375. static int ASN1CALL ASN1Enc_OpenLogicalChannel(ASN1encoding_t enc, OpenLogicalChannel *val);
  376. static int ASN1CALL ASN1Enc_OpenLogicalChannelAck(ASN1encoding_t enc, OpenLogicalChannelAck *val);
  377. static int ASN1CALL ASN1Enc_RequestMessage(ASN1encoding_t enc, RequestMessage *val);
  378. static int ASN1CALL ASN1Enc_ResponseMessage(ASN1encoding_t enc, ResponseMessage *val);
  379. static int ASN1CALL ASN1Enc_FastConnectOLC(ASN1encoding_t enc, FastConnectOLC *val);
  380. static int ASN1CALL ASN1Enc_FunctionNotUnderstood(ASN1encoding_t enc, FunctionNotUnderstood *val);
  381. static int ASN1CALL ASN1Enc_IndicationMessage(ASN1encoding_t enc, IndicationMessage *val);
  382. static int ASN1CALL ASN1Enc_MultimediaSystemControlMessage(ASN1encoding_t enc, MultimediaSystemControlMessage *val);
  383. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal_aal1_errorCorrection(ASN1decoding_t dec, NewATMVCIndication_aal_aal1_errorCorrection *val);
  384. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal_aal1_clockRecovery(ASN1decoding_t dec, NewATMVCIndication_aal_aal1_clockRecovery *val);
  385. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type_progressiveRefinementStart_repeatCount(ASN1decoding_t dec, MiscellaneousCommand_type_progressiveRefinementStart_repeatCount *val);
  386. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters_mode_eRM_recovery(ASN1decoding_t dec, V76LogicalChannelParameters_mode_eRM_recovery *val);
  387. static int ASN1CALL ASN1Dec_CustomPictureFormat_pixelAspectInformation_extendedPAR_Set(ASN1decoding_t dec, CustomPictureFormat_pixelAspectInformation_extendedPAR_Set *val);
  388. static int ASN1CALL ASN1Dec_CustomPictureFormat_mPI_customPCF_Set(ASN1decoding_t dec, CustomPictureFormat_mPI_customPCF_Set *val);
  389. static int ASN1CALL ASN1Dec_VCCapability_availableBitRates_type_rangeOfBitRates(ASN1decoding_t dec, VCCapability_availableBitRates_type_rangeOfBitRates *val);
  390. static int ASN1CALL ASN1Dec_TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded(ASN1decoding_t dec, TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded *val);
  391. static int ASN1CALL ASN1Dec_VCCapability_availableBitRates_type(ASN1decoding_t dec, VCCapability_availableBitRates_type *val);
  392. static int ASN1CALL ASN1Dec_H223Capability_h223MultiplexTableCapability_enhanced(ASN1decoding_t dec, H223Capability_h223MultiplexTableCapability_enhanced *val);
  393. static int ASN1CALL ASN1Dec_CustomPictureFormat_mPI_customPCF(ASN1decoding_t dec, CustomPictureFormat_mPI_customPCF *val);
  394. static int ASN1CALL ASN1Dec_CustomPictureFormat_pixelAspectInformation_extendedPAR(ASN1decoding_t dec, CustomPictureFormat_pixelAspectInformation_extendedPAR *val);
  395. static int ASN1CALL ASN1Dec_CustomPictureFormat_pixelAspectInformation_pixelAspectCode(ASN1decoding_t dec, CustomPictureFormat_pixelAspectInformation_pixelAspectCode *val);
  396. static int ASN1CALL ASN1Dec_H223LogicalChannelParameters_adaptationLayerType_al3(ASN1decoding_t dec, H223LogicalChannelParameters_adaptationLayerType_al3 *val);
  397. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters_mode_eRM(ASN1decoding_t dec, V76LogicalChannelParameters_mode_eRM *val);
  398. static int ASN1CALL ASN1Dec_UnicastAddress_iPSourceRouteAddress_route(ASN1decoding_t dec, PUnicastAddress_iPSourceRouteAddress_route *val);
  399. static int ASN1CALL ASN1Dec_UnicastAddress_iPSourceRouteAddress_routing(ASN1decoding_t dec, UnicastAddress_iPSourceRouteAddress_routing *val);
  400. static int ASN1CALL ASN1Dec_H223ModeParameters_adaptationLayerType_al3(ASN1decoding_t dec, H223ModeParameters_adaptationLayerType_al3 *val);
  401. static int ASN1CALL ASN1Dec_SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers(ASN1decoding_t dec, SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers *val);
  402. static int ASN1CALL ASN1Dec_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers(ASN1decoding_t dec, PSendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers *val);
  403. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type_progressiveRefinementStart(ASN1decoding_t dec, MiscellaneousCommand_type_progressiveRefinementStart *val);
  404. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type_videoFastUpdateMB(ASN1decoding_t dec, MiscellaneousCommand_type_videoFastUpdateMB *val);
  405. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type_videoFastUpdateGOB(ASN1decoding_t dec, MiscellaneousCommand_type_videoFastUpdateGOB *val);
  406. static int ASN1CALL ASN1Dec_MiscellaneousIndication_type_videoNotDecodedMBs(ASN1decoding_t dec, MiscellaneousIndication_type_videoNotDecodedMBs *val);
  407. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal_aal5(ASN1decoding_t dec, NewATMVCIndication_aal_aal5 *val);
  408. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal_aal1(ASN1decoding_t dec, NewATMVCIndication_aal_aal1 *val);
  409. static int ASN1CALL ASN1Dec_NewATMVCIndication_reverseParameters_multiplex(ASN1decoding_t dec, NewATMVCIndication_reverseParameters_multiplex *val);
  410. static int ASN1CALL ASN1Dec_UserInputIndication_signal_rtp(ASN1decoding_t dec, UserInputIndication_signal_rtp *val);
  411. static int ASN1CALL ASN1Dec_UserInputIndication_signalUpdate_rtp(ASN1decoding_t dec, UserInputIndication_signalUpdate_rtp *val);
  412. static int ASN1CALL ASN1Dec_UserInputIndication_signalUpdate(ASN1decoding_t dec, UserInputIndication_signalUpdate *val);
  413. static int ASN1CALL ASN1Dec_UserInputIndication_signal(ASN1decoding_t dec, UserInputIndication_signal *val);
  414. static int ASN1CALL ASN1Dec_NewATMVCIndication_reverseParameters(ASN1decoding_t dec, NewATMVCIndication_reverseParameters *val);
  415. static int ASN1CALL ASN1Dec_NewATMVCIndication_multiplex(ASN1decoding_t dec, NewATMVCIndication_multiplex *val);
  416. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal(ASN1decoding_t dec, NewATMVCIndication_aal *val);
  417. static int ASN1CALL ASN1Dec_JitterIndication_scope(ASN1decoding_t dec, JitterIndication_scope *val);
  418. static int ASN1CALL ASN1Dec_FunctionNotSupported_cause(ASN1decoding_t dec, FunctionNotSupported_cause *val);
  419. static int ASN1CALL ASN1Dec_H223MultiplexReconfiguration_h223AnnexADoubleFlag(ASN1decoding_t dec, H223MultiplexReconfiguration_h223AnnexADoubleFlag *val);
  420. static int ASN1CALL ASN1Dec_H223MultiplexReconfiguration_h223ModeChange(ASN1decoding_t dec, H223MultiplexReconfiguration_h223ModeChange *val);
  421. static int ASN1CALL ASN1Dec_EndSessionCommand_isdnOptions(ASN1decoding_t dec, EndSessionCommand_isdnOptions *val);
  422. static int ASN1CALL ASN1Dec_EndSessionCommand_gstnOptions(ASN1decoding_t dec, EndSessionCommand_gstnOptions *val);
  423. static int ASN1CALL ASN1Dec_FlowControlCommand_restriction(ASN1decoding_t dec, FlowControlCommand_restriction *val);
  424. static int ASN1CALL ASN1Dec_FlowControlCommand_scope(ASN1decoding_t dec, FlowControlCommand_scope *val);
  425. static int ASN1CALL ASN1Dec_SendTerminalCapabilitySet_specificRequest(ASN1decoding_t dec, SendTerminalCapabilitySet_specificRequest *val);
  426. static int ASN1CALL ASN1Dec_RemoteMCResponse_reject(ASN1decoding_t dec, RemoteMCResponse_reject *val);
  427. static int ASN1CALL ASN1Dec_ConferenceResponse_sendThisSourceResponse(ASN1decoding_t dec, ConferenceResponse_sendThisSourceResponse *val);
  428. static int ASN1CALL ASN1Dec_ConferenceResponse_makeTerminalBroadcasterResponse(ASN1decoding_t dec, ConferenceResponse_makeTerminalBroadcasterResponse *val);
  429. static int ASN1CALL ASN1Dec_ConferenceResponse_broadcastMyLogicalChannelResponse(ASN1decoding_t dec, ConferenceResponse_broadcastMyLogicalChannelResponse *val);
  430. static int ASN1CALL ASN1Dec_ConferenceResponse_extensionAddressResponse(ASN1decoding_t dec, ConferenceResponse_extensionAddressResponse *val);
  431. static int ASN1CALL ASN1Dec_ConferenceResponse_makeMeChairResponse(ASN1decoding_t dec, ConferenceResponse_makeMeChairResponse *val);
  432. static int ASN1CALL ASN1Dec_MaintenanceLoopReject_cause(ASN1decoding_t dec, MaintenanceLoopReject_cause *val);
  433. static int ASN1CALL ASN1Dec_MaintenanceLoopReject_type(ASN1decoding_t dec, MaintenanceLoopReject_type *val);
  434. static int ASN1CALL ASN1Dec_MaintenanceLoopAck_type(ASN1decoding_t dec, MaintenanceLoopAck_type *val);
  435. static int ASN1CALL ASN1Dec_MaintenanceLoopRequest_type(ASN1decoding_t dec, MaintenanceLoopRequest_type *val);
  436. static int ASN1CALL ASN1Dec_G7231AnnexCMode_g723AnnexCAudioMode(ASN1decoding_t dec, G7231AnnexCMode_g723AnnexCAudioMode *val);
  437. static int ASN1CALL ASN1Dec_IS13818AudioMode_multichannelType(ASN1decoding_t dec, IS13818AudioMode_multichannelType *val);
  438. static int ASN1CALL ASN1Dec_IS13818AudioMode_audioSampling(ASN1decoding_t dec, IS13818AudioMode_audioSampling *val);
  439. static int ASN1CALL ASN1Dec_IS13818AudioMode_audioLayer(ASN1decoding_t dec, IS13818AudioMode_audioLayer *val);
  440. static int ASN1CALL ASN1Dec_IS11172AudioMode_multichannelType(ASN1decoding_t dec, IS11172AudioMode_multichannelType *val);
  441. static int ASN1CALL ASN1Dec_IS11172AudioMode_audioSampling(ASN1decoding_t dec, IS11172AudioMode_audioSampling *val);
  442. static int ASN1CALL ASN1Dec_IS11172AudioMode_audioLayer(ASN1decoding_t dec, IS11172AudioMode_audioLayer *val);
  443. static int ASN1CALL ASN1Dec_AudioMode_g7231(ASN1decoding_t dec, AudioMode_g7231 *val);
  444. static int ASN1CALL ASN1Dec_H263VideoMode_resolution(ASN1decoding_t dec, H263VideoMode_resolution *val);
  445. static int ASN1CALL ASN1Dec_H262VideoMode_profileAndLevel(ASN1decoding_t dec, H262VideoMode_profileAndLevel *val);
  446. static int ASN1CALL ASN1Dec_H261VideoMode_resolution(ASN1decoding_t dec, H261VideoMode_resolution *val);
  447. static int ASN1CALL ASN1Dec_RequestModeReject_cause(ASN1decoding_t dec, RequestModeReject_cause *val);
  448. static int ASN1CALL ASN1Dec_RequestModeAck_response(ASN1decoding_t dec, RequestModeAck_response *val);
  449. static int ASN1CALL ASN1Dec_RequestMultiplexEntryRelease_entryNumbers(ASN1decoding_t dec, RequestMultiplexEntryRelease_entryNumbers *val);
  450. static int ASN1CALL ASN1Dec_RequestMultiplexEntryRejectionDescriptions_cause(ASN1decoding_t dec, RequestMultiplexEntryRejectionDescriptions_cause *val);
  451. static int ASN1CALL ASN1Dec_RequestMultiplexEntryReject_entryNumbers(ASN1decoding_t dec, RequestMultiplexEntryReject_entryNumbers *val);
  452. static int ASN1CALL ASN1Dec_RequestMultiplexEntryAck_entryNumbers(ASN1decoding_t dec, RequestMultiplexEntryAck_entryNumbers *val);
  453. static int ASN1CALL ASN1Dec_RequestMultiplexEntry_entryNumbers(ASN1decoding_t dec, RequestMultiplexEntry_entryNumbers *val);
  454. static int ASN1CALL ASN1Dec_MultiplexEntrySendRelease_multiplexTableEntryNumber(ASN1decoding_t dec, MultiplexEntrySendRelease_multiplexTableEntryNumber *val);
  455. static int ASN1CALL ASN1Dec_MultiplexEntryRejectionDescriptions_cause(ASN1decoding_t dec, MultiplexEntryRejectionDescriptions_cause *val);
  456. static int ASN1CALL ASN1Dec_MultiplexEntrySendAck_multiplexTableEntryNumber(ASN1decoding_t dec, MultiplexEntrySendAck_multiplexTableEntryNumber *val);
  457. static int ASN1CALL ASN1Dec_MultiplexElement_repeatCount(ASN1decoding_t dec, MultiplexElement_repeatCount *val);
  458. static int ASN1CALL ASN1Dec_MultiplexElement_type(ASN1decoding_t dec, MultiplexElement_type *val);
  459. static int ASN1CALL ASN1Dec_RequestChannelCloseReject_cause(ASN1decoding_t dec, RequestChannelCloseReject_cause *val);
  460. static int ASN1CALL ASN1Dec_RequestChannelClose_reason(ASN1decoding_t dec, RequestChannelClose_reason *val);
  461. static int ASN1CALL ASN1Dec_CloseLogicalChannel_reason(ASN1decoding_t dec, CloseLogicalChannel_reason *val);
  462. static int ASN1CALL ASN1Dec_CloseLogicalChannel_source(ASN1decoding_t dec, CloseLogicalChannel_source *val);
  463. static int ASN1CALL ASN1Dec_OpenLogicalChannelReject_cause(ASN1decoding_t dec, OpenLogicalChannelReject_cause *val);
  464. static int ASN1CALL ASN1Dec_MulticastAddress_iP6Address(ASN1decoding_t dec, MulticastAddress_iP6Address *val);
  465. static int ASN1CALL ASN1Dec_MulticastAddress_iPAddress(ASN1decoding_t dec, MulticastAddress_iPAddress *val);
  466. static int ASN1CALL ASN1Dec_UnicastAddress_iPSourceRouteAddress(ASN1decoding_t dec, UnicastAddress_iPSourceRouteAddress *val);
  467. static int ASN1CALL ASN1Dec_UnicastAddress_iP6Address(ASN1decoding_t dec, UnicastAddress_iP6Address *val);
  468. static int ASN1CALL ASN1Dec_UnicastAddress_iPXAddress(ASN1decoding_t dec, UnicastAddress_iPXAddress *val);
  469. static int ASN1CALL ASN1Dec_UnicastAddress_iPAddress(ASN1decoding_t dec, UnicastAddress_iPAddress *val);
  470. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters_mode(ASN1decoding_t dec, V76LogicalChannelParameters_mode *val);
  471. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters_suspendResume(ASN1decoding_t dec, V76LogicalChannelParameters_suspendResume *val);
  472. static int ASN1CALL ASN1Dec_H223AnnexCArqParameters_numberOfRetransmissions(ASN1decoding_t dec, H223AnnexCArqParameters_numberOfRetransmissions *val);
  473. static int ASN1CALL ASN1Dec_H223AL3MParameters_crcLength(ASN1decoding_t dec, H223AL3MParameters_crcLength *val);
  474. static int ASN1CALL ASN1Dec_H223AL3MParameters_headerFormat(ASN1decoding_t dec, H223AL3MParameters_headerFormat *val);
  475. static int ASN1CALL ASN1Dec_H223AL2MParameters_headerFEC(ASN1decoding_t dec, H223AL2MParameters_headerFEC *val);
  476. static int ASN1CALL ASN1Dec_H223AL1MParameters_crcLength(ASN1decoding_t dec, H223AL1MParameters_crcLength *val);
  477. static int ASN1CALL ASN1Dec_H223AL1MParameters_headerFEC(ASN1decoding_t dec, H223AL1MParameters_headerFEC *val);
  478. static int ASN1CALL ASN1Dec_H223AL1MParameters_transferMode(ASN1decoding_t dec, H223AL1MParameters_transferMode *val);
  479. static int ASN1CALL ASN1Dec_Q2931Address_address(ASN1decoding_t dec, Q2931Address_address *val);
  480. static int ASN1CALL ASN1Dec_NetworkAccessParameters_t120SetupProcedure(ASN1decoding_t dec, NetworkAccessParameters_t120SetupProcedure *val);
  481. static int ASN1CALL ASN1Dec_NetworkAccessParameters_distribution(ASN1decoding_t dec, NetworkAccessParameters_distribution *val);
  482. static int ASN1CALL ASN1Dec_T84Profile_t84Restricted(ASN1decoding_t dec, T84Profile_t84Restricted *val);
  483. static int ASN1CALL ASN1Dec_G7231AnnexCCapability_g723AnnexCAudioMode(ASN1decoding_t dec, G7231AnnexCCapability_g723AnnexCAudioMode *val);
  484. static int ASN1CALL ASN1Dec_AudioCapability_g7231(ASN1decoding_t dec, AudioCapability_g7231 *val);
  485. static int ASN1CALL ASN1Dec_CustomPictureFormat_pixelAspectInformation(ASN1decoding_t dec, CustomPictureFormat_pixelAspectInformation *val);
  486. static int ASN1CALL ASN1Dec_CustomPictureFormat_mPI(ASN1decoding_t dec, CustomPictureFormat_mPI *val);
  487. static int ASN1CALL ASN1Dec_RefPictureSelection_videoBackChannelSend(ASN1decoding_t dec, RefPictureSelection_videoBackChannelSend *val);
  488. static int ASN1CALL ASN1Dec_RefPictureSelection_additionalPictureMemory(ASN1decoding_t dec, RefPictureSelection_additionalPictureMemory *val);
  489. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyFrameMapping_frameSequence(ASN1decoding_t dec, RTPH263VideoRedundancyFrameMapping_frameSequence *val);
  490. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyEncoding_containedThreads(ASN1decoding_t dec, RTPH263VideoRedundancyEncoding_containedThreads *val);
  491. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyEncoding_frameToThreadMapping(ASN1decoding_t dec, RTPH263VideoRedundancyEncoding_frameToThreadMapping *val);
  492. static int ASN1CALL ASN1Dec_RedundancyEncodingCapability_secondaryEncoding(ASN1decoding_t dec, PRedundancyEncodingCapability_secondaryEncoding *val);
  493. static int ASN1CALL ASN1Dec_H2250Capability_mcCapability(ASN1decoding_t dec, H2250Capability_mcCapability *val);
  494. static int ASN1CALL ASN1Dec_H223Capability_mobileOperationTransmitCapability(ASN1decoding_t dec, H223Capability_mobileOperationTransmitCapability *val);
  495. static int ASN1CALL ASN1Dec_H223Capability_h223MultiplexTableCapability(ASN1decoding_t dec, H223Capability_h223MultiplexTableCapability *val);
  496. static int ASN1CALL ASN1Dec_VCCapability_availableBitRates(ASN1decoding_t dec, VCCapability_availableBitRates *val);
  497. static int ASN1CALL ASN1Dec_VCCapability_aal5(ASN1decoding_t dec, VCCapability_aal5 *val);
  498. static int ASN1CALL ASN1Dec_VCCapability_aal1(ASN1decoding_t dec, VCCapability_aal1 *val);
  499. static int ASN1CALL ASN1Dec_Capability_h233EncryptionReceiveCapability(ASN1decoding_t dec, Capability_h233EncryptionReceiveCapability *val);
  500. static int ASN1CALL ASN1Dec_TerminalCapabilitySetReject_cause(ASN1decoding_t dec, TerminalCapabilitySetReject_cause *val);
  501. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationReject_cause(ASN1decoding_t dec, MasterSlaveDeterminationReject_cause *val);
  502. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationAck_decision(ASN1decoding_t dec, MasterSlaveDeterminationAck_decision *val);
  503. static int ASN1CALL ASN1Dec_NonStandardIdentifier_h221NonStandard(ASN1decoding_t dec, NonStandardIdentifier_h221NonStandard *val);
  504. static int ASN1CALL ASN1Dec_NonStandardIdentifier(ASN1decoding_t dec, NonStandardIdentifier *val);
  505. static int ASN1CALL ASN1Dec_MasterSlaveDetermination(ASN1decoding_t dec, MasterSlaveDetermination *val);
  506. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationAck(ASN1decoding_t dec, MasterSlaveDeterminationAck *val);
  507. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationReject(ASN1decoding_t dec, MasterSlaveDeterminationReject *val);
  508. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationRelease(ASN1decoding_t dec, MasterSlaveDeterminationRelease *val);
  509. static int ASN1CALL ASN1Dec_CapabilityDescriptor(ASN1decoding_t dec, CapabilityDescriptor *val);
  510. static int ASN1CALL ASN1Dec_AlternativeCapabilitySet(ASN1decoding_t dec, AlternativeCapabilitySet *val);
  511. static int ASN1CALL ASN1Dec_TerminalCapabilitySetAck(ASN1decoding_t dec, TerminalCapabilitySetAck *val);
  512. static int ASN1CALL ASN1Dec_TerminalCapabilitySetReject(ASN1decoding_t dec, TerminalCapabilitySetReject *val);
  513. static int ASN1CALL ASN1Dec_TerminalCapabilitySetRelease(ASN1decoding_t dec, TerminalCapabilitySetRelease *val);
  514. static int ASN1CALL ASN1Dec_H222Capability(ASN1decoding_t dec, H222Capability *val);
  515. static int ASN1CALL ASN1Dec_VCCapability(ASN1decoding_t dec, VCCapability *val);
  516. static int ASN1CALL ASN1Dec_H223AnnexCCapability(ASN1decoding_t dec, H223AnnexCCapability *val);
  517. static int ASN1CALL ASN1Dec_V75Capability(ASN1decoding_t dec, V75Capability *val);
  518. static int ASN1CALL ASN1Dec_QOSMode(ASN1decoding_t dec, QOSMode *val);
  519. static int ASN1CALL ASN1Dec_ATMParameters(ASN1decoding_t dec, ATMParameters *val);
  520. static int ASN1CALL ASN1Dec_MediaTransportType(ASN1decoding_t dec, MediaTransportType *val);
  521. static int ASN1CALL ASN1Dec_MediaChannelCapability(ASN1decoding_t dec, MediaChannelCapability *val);
  522. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyEncoding(ASN1decoding_t dec, RTPH263VideoRedundancyEncoding *val);
  523. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyFrameMapping(ASN1decoding_t dec, RTPH263VideoRedundancyFrameMapping *val);
  524. static int ASN1CALL ASN1Dec_MultipointCapability(ASN1decoding_t dec, MultipointCapability *val);
  525. static int ASN1CALL ASN1Dec_MediaDistributionCapability(ASN1decoding_t dec, MediaDistributionCapability *val);
  526. static int ASN1CALL ASN1Dec_H261VideoCapability(ASN1decoding_t dec, H261VideoCapability *val);
  527. static int ASN1CALL ASN1Dec_H262VideoCapability(ASN1decoding_t dec, H262VideoCapability *val);
  528. static int ASN1CALL ASN1Dec_EnhancementLayerInfo(ASN1decoding_t dec, EnhancementLayerInfo *val);
  529. static int ASN1CALL ASN1Dec_TransparencyParameters(ASN1decoding_t dec, TransparencyParameters *val);
  530. static int ASN1CALL ASN1Dec_RefPictureSelection(ASN1decoding_t dec, RefPictureSelection *val);
  531. static int ASN1CALL ASN1Dec_CustomPictureClockFrequency(ASN1decoding_t dec, CustomPictureClockFrequency *val);
  532. static int ASN1CALL ASN1Dec_CustomPictureFormat(ASN1decoding_t dec, CustomPictureFormat *val);
  533. static int ASN1CALL ASN1Dec_H263ModeComboFlags(ASN1decoding_t dec, H263ModeComboFlags *val);
  534. static int ASN1CALL ASN1Dec_IS11172VideoCapability(ASN1decoding_t dec, IS11172VideoCapability *val);
  535. static int ASN1CALL ASN1Dec_G7231AnnexCCapability(ASN1decoding_t dec, G7231AnnexCCapability *val);
  536. static int ASN1CALL ASN1Dec_IS11172AudioCapability(ASN1decoding_t dec, IS11172AudioCapability *val);
  537. static int ASN1CALL ASN1Dec_IS13818AudioCapability(ASN1decoding_t dec, IS13818AudioCapability *val);
  538. static int ASN1CALL ASN1Dec_GSMAudioCapability(ASN1decoding_t dec, GSMAudioCapability *val);
  539. static int ASN1CALL ASN1Dec_V42bis(ASN1decoding_t dec, V42bis *val);
  540. static int ASN1CALL ASN1Dec_T84Profile(ASN1decoding_t dec, T84Profile *val);
  541. static int ASN1CALL ASN1Dec_ConferenceCapability(ASN1decoding_t dec, ConferenceCapability *val);
  542. static int ASN1CALL ASN1Dec_Q2931Address(ASN1decoding_t dec, Q2931Address *val);
  543. static int ASN1CALL ASN1Dec_V75Parameters(ASN1decoding_t dec, V75Parameters *val);
  544. static int ASN1CALL ASN1Dec_H222LogicalChannelParameters(ASN1decoding_t dec, H222LogicalChannelParameters *val);
  545. static int ASN1CALL ASN1Dec_H223AL2MParameters(ASN1decoding_t dec, H223AL2MParameters *val);
  546. static int ASN1CALL ASN1Dec_H223AnnexCArqParameters(ASN1decoding_t dec, H223AnnexCArqParameters *val);
  547. static int ASN1CALL ASN1Dec_CRCLength(ASN1decoding_t dec, CRCLength *val);
  548. static int ASN1CALL ASN1Dec_EscrowData(ASN1decoding_t dec, EscrowData *val);
  549. static int ASN1CALL ASN1Dec_OpenLogicalChannelReject(ASN1decoding_t dec, OpenLogicalChannelReject *val);
  550. static int ASN1CALL ASN1Dec_OpenLogicalChannelConfirm(ASN1decoding_t dec, OpenLogicalChannelConfirm *val);
  551. static int ASN1CALL ASN1Dec_CloseLogicalChannel(ASN1decoding_t dec, CloseLogicalChannel *val);
  552. static int ASN1CALL ASN1Dec_CloseLogicalChannelAck(ASN1decoding_t dec, CloseLogicalChannelAck *val);
  553. static int ASN1CALL ASN1Dec_RequestChannelCloseAck(ASN1decoding_t dec, RequestChannelCloseAck *val);
  554. static int ASN1CALL ASN1Dec_RequestChannelCloseReject(ASN1decoding_t dec, RequestChannelCloseReject *val);
  555. static int ASN1CALL ASN1Dec_RequestChannelCloseRelease(ASN1decoding_t dec, RequestChannelCloseRelease *val);
  556. static int ASN1CALL ASN1Dec_MultiplexEntrySend(ASN1decoding_t dec, MultiplexEntrySend *val);
  557. static int ASN1CALL ASN1Dec_MultiplexElement(ASN1decoding_t dec, MultiplexElement *val);
  558. static int ASN1CALL ASN1Dec_MultiplexEntrySendAck(ASN1decoding_t dec, MultiplexEntrySendAck *val);
  559. static int ASN1CALL ASN1Dec_MultiplexEntryRejectionDescriptions(ASN1decoding_t dec, MultiplexEntryRejectionDescriptions *val);
  560. static int ASN1CALL ASN1Dec_MultiplexEntrySendRelease(ASN1decoding_t dec, MultiplexEntrySendRelease *val);
  561. static int ASN1CALL ASN1Dec_RequestMultiplexEntry(ASN1decoding_t dec, RequestMultiplexEntry *val);
  562. static int ASN1CALL ASN1Dec_RequestMultiplexEntryAck(ASN1decoding_t dec, RequestMultiplexEntryAck *val);
  563. static int ASN1CALL ASN1Dec_RequestMultiplexEntryRejectionDescriptions(ASN1decoding_t dec, RequestMultiplexEntryRejectionDescriptions *val);
  564. static int ASN1CALL ASN1Dec_RequestMultiplexEntryRelease(ASN1decoding_t dec, RequestMultiplexEntryRelease *val);
  565. static int ASN1CALL ASN1Dec_RequestMode(ASN1decoding_t dec, RequestMode *val);
  566. static int ASN1CALL ASN1Dec_RequestModeAck(ASN1decoding_t dec, RequestModeAck *val);
  567. static int ASN1CALL ASN1Dec_RequestModeReject(ASN1decoding_t dec, RequestModeReject *val);
  568. static int ASN1CALL ASN1Dec_RequestModeRelease(ASN1decoding_t dec, RequestModeRelease *val);
  569. static int ASN1CALL ASN1Dec_V76ModeParameters(ASN1decoding_t dec, V76ModeParameters *val);
  570. static int ASN1CALL ASN1Dec_H261VideoMode(ASN1decoding_t dec, H261VideoMode *val);
  571. static int ASN1CALL ASN1Dec_H262VideoMode(ASN1decoding_t dec, H262VideoMode *val);
  572. static int ASN1CALL ASN1Dec_IS11172VideoMode(ASN1decoding_t dec, IS11172VideoMode *val);
  573. static int ASN1CALL ASN1Dec_IS11172AudioMode(ASN1decoding_t dec, IS11172AudioMode *val);
  574. static int ASN1CALL ASN1Dec_IS13818AudioMode(ASN1decoding_t dec, IS13818AudioMode *val);
  575. static int ASN1CALL ASN1Dec_G7231AnnexCMode(ASN1decoding_t dec, G7231AnnexCMode *val);
  576. static int ASN1CALL ASN1Dec_RoundTripDelayRequest(ASN1decoding_t dec, RoundTripDelayRequest *val);
  577. static int ASN1CALL ASN1Dec_RoundTripDelayResponse(ASN1decoding_t dec, RoundTripDelayResponse *val);
  578. static int ASN1CALL ASN1Dec_MaintenanceLoopRequest(ASN1decoding_t dec, MaintenanceLoopRequest *val);
  579. static int ASN1CALL ASN1Dec_MaintenanceLoopAck(ASN1decoding_t dec, MaintenanceLoopAck *val);
  580. static int ASN1CALL ASN1Dec_MaintenanceLoopReject(ASN1decoding_t dec, MaintenanceLoopReject *val);
  581. static int ASN1CALL ASN1Dec_MaintenanceLoopOffCommand(ASN1decoding_t dec, MaintenanceLoopOffCommand *val);
  582. static int ASN1CALL ASN1Dec_CommunicationModeCommand(ASN1decoding_t dec, CommunicationModeCommand *val);
  583. static int ASN1CALL ASN1Dec_CommunicationModeRequest(ASN1decoding_t dec, CommunicationModeRequest *val);
  584. static int ASN1CALL ASN1Dec_CommunicationModeResponse(ASN1decoding_t dec, CommunicationModeResponse *val);
  585. static int ASN1CALL ASN1Dec_Criteria(ASN1decoding_t dec, Criteria *val);
  586. static int ASN1CALL ASN1Dec_TerminalLabel(ASN1decoding_t dec, TerminalLabel *val);
  587. static int ASN1CALL ASN1Dec_RequestAllTerminalIDsResponse(ASN1decoding_t dec, RequestAllTerminalIDsResponse *val);
  588. static int ASN1CALL ASN1Dec_TerminalInformation(ASN1decoding_t dec, TerminalInformation *val);
  589. static int ASN1CALL ASN1Dec_RemoteMCRequest(ASN1decoding_t dec, RemoteMCRequest *val);
  590. static int ASN1CALL ASN1Dec_RemoteMCResponse(ASN1decoding_t dec, RemoteMCResponse *val);
  591. static int ASN1CALL ASN1Dec_SendTerminalCapabilitySet(ASN1decoding_t dec, SendTerminalCapabilitySet *val);
  592. static int ASN1CALL ASN1Dec_FlowControlCommand(ASN1decoding_t dec, FlowControlCommand *val);
  593. static int ASN1CALL ASN1Dec_SubstituteConferenceIDCommand(ASN1decoding_t dec, SubstituteConferenceIDCommand *val);
  594. static int ASN1CALL ASN1Dec_KeyProtectionMethod(ASN1decoding_t dec, KeyProtectionMethod *val);
  595. static int ASN1CALL ASN1Dec_EncryptionUpdateRequest(ASN1decoding_t dec, EncryptionUpdateRequest *val);
  596. static int ASN1CALL ASN1Dec_H223MultiplexReconfiguration(ASN1decoding_t dec, H223MultiplexReconfiguration *val);
  597. static int ASN1CALL ASN1Dec_FunctionNotSupported(ASN1decoding_t dec, FunctionNotSupported *val);
  598. static int ASN1CALL ASN1Dec_TerminalYouAreSeeingInSubPictureNumber(ASN1decoding_t dec, TerminalYouAreSeeingInSubPictureNumber *val);
  599. static int ASN1CALL ASN1Dec_VideoIndicateCompose(ASN1decoding_t dec, VideoIndicateCompose *val);
  600. static int ASN1CALL ASN1Dec_ConferenceIndication(ASN1decoding_t dec, ConferenceIndication *val);
  601. static int ASN1CALL ASN1Dec_JitterIndication(ASN1decoding_t dec, JitterIndication *val);
  602. static int ASN1CALL ASN1Dec_H223SkewIndication(ASN1decoding_t dec, H223SkewIndication *val);
  603. static int ASN1CALL ASN1Dec_H2250MaximumSkewIndication(ASN1decoding_t dec, H2250MaximumSkewIndication *val);
  604. static int ASN1CALL ASN1Dec_VendorIdentification(ASN1decoding_t dec, VendorIdentification *val);
  605. static int ASN1CALL ASN1Dec_NewATMVCIndication(ASN1decoding_t dec, NewATMVCIndication *val);
  606. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom(ASN1decoding_t dec, PRTPH263VideoRedundancyEncoding_frameToThreadMapping_custom *val);
  607. static int ASN1CALL ASN1Dec_MultiplexElement_type_subElementList(ASN1decoding_t dec, PMultiplexElement_type_subElementList *val);
  608. static int ASN1CALL ASN1Dec_RequestAllTerminalIDsResponse_terminalInformation(ASN1decoding_t dec, PRequestAllTerminalIDsResponse_terminalInformation *val);
  609. static int ASN1CALL ASN1Dec_ConferenceResponse_terminalCertificateResponse(ASN1decoding_t dec, ConferenceResponse_terminalCertificateResponse *val);
  610. static int ASN1CALL ASN1Dec_ConferenceResponse_chairTokenOwnerResponse(ASN1decoding_t dec, ConferenceResponse_chairTokenOwnerResponse *val);
  611. static int ASN1CALL ASN1Dec_ConferenceResponse_terminalListResponse(ASN1decoding_t dec, ConferenceResponse_terminalListResponse *val);
  612. static int ASN1CALL ASN1Dec_ConferenceResponse_passwordResponse(ASN1decoding_t dec, ConferenceResponse_passwordResponse *val);
  613. static int ASN1CALL ASN1Dec_ConferenceResponse_conferenceIDResponse(ASN1decoding_t dec, ConferenceResponse_conferenceIDResponse *val);
  614. static int ASN1CALL ASN1Dec_ConferenceResponse_terminalIDResponse(ASN1decoding_t dec, ConferenceResponse_terminalIDResponse *val);
  615. static int ASN1CALL ASN1Dec_ConferenceResponse_mCTerminalIDResponse(ASN1decoding_t dec, ConferenceResponse_mCTerminalIDResponse *val);
  616. static int ASN1CALL ASN1Dec_ConferenceRequest_requestTerminalCertificate(ASN1decoding_t dec, ConferenceRequest_requestTerminalCertificate *val);
  617. static int ASN1CALL ASN1Dec_RequestMultiplexEntryReject_rejectionDescriptions(ASN1decoding_t dec, RequestMultiplexEntryReject_rejectionDescriptions *val);
  618. static int ASN1CALL ASN1Dec_MultiplexEntrySendReject_rejectionDescriptions(ASN1decoding_t dec, MultiplexEntrySendReject_rejectionDescriptions *val);
  619. static int ASN1CALL ASN1Dec_MultiplexEntryDescriptor_elementList(ASN1decoding_t dec, MultiplexEntryDescriptor_elementList *val);
  620. static int ASN1CALL ASN1Dec_EncryptionSync_escrowentry(ASN1decoding_t dec, PEncryptionSync_escrowentry *val);
  621. static int ASN1CALL ASN1Dec_H223AL3MParameters_arqType(ASN1decoding_t dec, H223AL3MParameters_arqType *val);
  622. static int ASN1CALL ASN1Dec_H223AL1MParameters_arqType(ASN1decoding_t dec, H223AL1MParameters_arqType *val);
  623. static int ASN1CALL ASN1Dec_H263VideoModeCombos_h263VideoCoupledModes(ASN1decoding_t dec, H263VideoModeCombos_h263VideoCoupledModes *val);
  624. static int ASN1CALL ASN1Dec_H263Options_customPictureFormat(ASN1decoding_t dec, PH263Options_customPictureFormat *val);
  625. static int ASN1CALL ASN1Dec_H263Options_customPictureClockFrequency(ASN1decoding_t dec, PH263Options_customPictureClockFrequency *val);
  626. static int ASN1CALL ASN1Dec_MultipointCapability_mediaDistributionCapability(ASN1decoding_t dec, PMultipointCapability_mediaDistributionCapability *val);
  627. static int ASN1CALL ASN1Dec_TransportCapability_mediaChannelCapabilities(ASN1decoding_t dec, TransportCapability_mediaChannelCapabilities *val);
  628. static int ASN1CALL ASN1Dec_H222Capability_vcCapability(ASN1decoding_t dec, PH222Capability_vcCapability *val);
  629. static int ASN1CALL ASN1Dec_CapabilityDescriptor_simultaneousCapabilities(ASN1decoding_t dec, PCapabilityDescriptor_simultaneousCapabilities *val);
  630. static int ASN1CALL ASN1Dec_TerminalCapabilitySet_capabilityDescriptors(ASN1decoding_t dec, TerminalCapabilitySet_capabilityDescriptors *val);
  631. static int ASN1CALL ASN1Dec_NonStandardParameter(ASN1decoding_t dec, NonStandardParameter *val);
  632. static int ASN1CALL ASN1Dec_H223Capability(ASN1decoding_t dec, H223Capability *val);
  633. static int ASN1CALL ASN1Dec_V76Capability(ASN1decoding_t dec, V76Capability *val);
  634. static int ASN1CALL ASN1Dec_RSVPParameters(ASN1decoding_t dec, RSVPParameters *val);
  635. static int ASN1CALL ASN1Dec_QOSCapability(ASN1decoding_t dec, QOSCapability *val);
  636. static int ASN1CALL ASN1Dec_TransportCapability(ASN1decoding_t dec, TransportCapability *val);
  637. static int ASN1CALL ASN1Dec_RedundancyEncodingMethod(ASN1decoding_t dec, RedundancyEncodingMethod *val);
  638. static int ASN1CALL ASN1Dec_H263Options(ASN1decoding_t dec, H263Options *val);
  639. static int ASN1CALL ASN1Dec_H263VideoModeCombos(ASN1decoding_t dec, H263VideoModeCombos *val);
  640. static int ASN1CALL ASN1Dec_AudioCapability(ASN1decoding_t dec, AudioCapability *val);
  641. static int ASN1CALL ASN1Dec_CompressionType(ASN1decoding_t dec, CompressionType *val);
  642. static int ASN1CALL ASN1Dec_MediaEncryptionAlgorithm(ASN1decoding_t dec, MediaEncryptionAlgorithm *val);
  643. static int ASN1CALL ASN1Dec_AuthenticationCapability(ASN1decoding_t dec, AuthenticationCapability *val);
  644. static int ASN1CALL ASN1Dec_IntegrityCapability(ASN1decoding_t dec, IntegrityCapability *val);
  645. static int ASN1CALL ASN1Dec_H223AL1MParameters(ASN1decoding_t dec, H223AL1MParameters *val);
  646. static int ASN1CALL ASN1Dec_H223AL3MParameters(ASN1decoding_t dec, H223AL3MParameters *val);
  647. static int ASN1CALL ASN1Dec_V76HDLCParameters(ASN1decoding_t dec, V76HDLCParameters *val);
  648. static int ASN1CALL ASN1Dec_UnicastAddress(ASN1decoding_t dec, UnicastAddress *val);
  649. static int ASN1CALL ASN1Dec_MulticastAddress(ASN1decoding_t dec, MulticastAddress *val);
  650. static int ASN1CALL ASN1Dec_EncryptionSync(ASN1decoding_t dec, EncryptionSync *val);
  651. static int ASN1CALL ASN1Dec_RequestChannelClose(ASN1decoding_t dec, RequestChannelClose *val);
  652. static int ASN1CALL ASN1Dec_MultiplexEntryDescriptor(ASN1decoding_t dec, MultiplexEntryDescriptor *val);
  653. static int ASN1CALL ASN1Dec_MultiplexEntrySendReject(ASN1decoding_t dec, MultiplexEntrySendReject *val);
  654. static int ASN1CALL ASN1Dec_RequestMultiplexEntryReject(ASN1decoding_t dec, RequestMultiplexEntryReject *val);
  655. static int ASN1CALL ASN1Dec_H263VideoMode(ASN1decoding_t dec, H263VideoMode *val);
  656. static int ASN1CALL ASN1Dec_AudioMode(ASN1decoding_t dec, AudioMode *val);
  657. static int ASN1CALL ASN1Dec_EncryptionMode(ASN1decoding_t dec, EncryptionMode *val);
  658. static int ASN1CALL ASN1Dec_ConferenceRequest(ASN1decoding_t dec, ConferenceRequest *val);
  659. static int ASN1CALL ASN1Dec_CertSelectionCriteria(ASN1decoding_t dec, PCertSelectionCriteria *val);
  660. static int ASN1CALL ASN1Dec_ConferenceResponse(ASN1decoding_t dec, ConferenceResponse *val);
  661. static int ASN1CALL ASN1Dec_EndSessionCommand(ASN1decoding_t dec, EndSessionCommand *val);
  662. static int ASN1CALL ASN1Dec_ConferenceCommand(ASN1decoding_t dec, ConferenceCommand *val);
  663. static int ASN1CALL ASN1Dec_UserInputIndication_userInputSupportIndication(ASN1decoding_t dec, UserInputIndication_userInputSupportIndication *val);
  664. static int ASN1CALL ASN1Dec_MiscellaneousIndication_type(ASN1decoding_t dec, MiscellaneousIndication_type *val);
  665. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type(ASN1decoding_t dec, MiscellaneousCommand_type *val);
  666. static int ASN1CALL ASN1Dec_EncryptionCommand_encryptionAlgorithmID(ASN1decoding_t dec, EncryptionCommand_encryptionAlgorithmID *val);
  667. static int ASN1CALL ASN1Dec_CommunicationModeTableEntry_nonStandard(ASN1decoding_t dec, PCommunicationModeTableEntry_nonStandard *val);
  668. static int ASN1CALL ASN1Dec_RedundancyEncodingMode_secondaryEncoding(ASN1decoding_t dec, RedundancyEncodingMode_secondaryEncoding *val);
  669. static int ASN1CALL ASN1Dec_H223ModeParameters_adaptationLayerType(ASN1decoding_t dec, H223ModeParameters_adaptationLayerType *val);
  670. static int ASN1CALL ASN1Dec_MultiplexEntrySend_multiplexEntryDescriptors(ASN1decoding_t dec, PMultiplexEntrySend_multiplexEntryDescriptors *val);
  671. static int ASN1CALL ASN1Dec_H2250LogicalChannelAckParameters_nonStandard(ASN1decoding_t dec, PH2250LogicalChannelAckParameters_nonStandard *val);
  672. static int ASN1CALL ASN1Dec_RTPPayloadType_payloadDescriptor(ASN1decoding_t dec, RTPPayloadType_payloadDescriptor *val);
  673. static int ASN1CALL ASN1Dec_H2250LogicalChannelParameters_nonStandard(ASN1decoding_t dec, PH2250LogicalChannelParameters_nonStandard *val);
  674. static int ASN1CALL ASN1Dec_H223LogicalChannelParameters_adaptationLayerType(ASN1decoding_t dec, H223LogicalChannelParameters_adaptationLayerType *val);
  675. static int ASN1CALL ASN1Dec_ConferenceCapability_nonStandardData(ASN1decoding_t dec, PConferenceCapability_nonStandardData *val);
  676. static int ASN1CALL ASN1Dec_UserInputCapability_nonStandard(ASN1decoding_t dec, UserInputCapability_nonStandard *val);
  677. static int ASN1CALL ASN1Dec_DataProtocolCapability_v76wCompression(ASN1decoding_t dec, DataProtocolCapability_v76wCompression *val);
  678. static int ASN1CALL ASN1Dec_H263Options_modeCombos(ASN1decoding_t dec, PH263Options_modeCombos *val);
  679. static int ASN1CALL ASN1Dec_TransportCapability_qOSCapabilities(ASN1decoding_t dec, PTransportCapability_qOSCapabilities *val);
  680. static int ASN1CALL ASN1Dec_NonStandardMessage(ASN1decoding_t dec, NonStandardMessage *val);
  681. static int ASN1CALL ASN1Dec_RedundancyEncodingCapability(ASN1decoding_t dec, RedundancyEncodingCapability *val);
  682. static int ASN1CALL ASN1Dec_H263VideoCapability(ASN1decoding_t dec, H263VideoCapability *val);
  683. static int ASN1CALL ASN1Dec_EnhancementOptions(ASN1decoding_t dec, EnhancementOptions *val);
  684. static int ASN1CALL ASN1Dec_DataProtocolCapability(ASN1decoding_t dec, DataProtocolCapability *val);
  685. static int ASN1CALL ASN1Dec_EncryptionAuthenticationAndIntegrity(ASN1decoding_t dec, EncryptionAuthenticationAndIntegrity *val);
  686. static int ASN1CALL ASN1Dec_EncryptionCapability(ASN1decoding_t dec, PEncryptionCapability *val);
  687. static int ASN1CALL ASN1Dec_UserInputCapability(ASN1decoding_t dec, UserInputCapability *val);
  688. static int ASN1CALL ASN1Dec_H223LogicalChannelParameters(ASN1decoding_t dec, H223LogicalChannelParameters *val);
  689. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters(ASN1decoding_t dec, V76LogicalChannelParameters *val);
  690. static int ASN1CALL ASN1Dec_RTPPayloadType(ASN1decoding_t dec, RTPPayloadType *val);
  691. static int ASN1CALL ASN1Dec_H245TransportAddress(ASN1decoding_t dec, H245TransportAddress *val);
  692. static int ASN1CALL ASN1Dec_H2250LogicalChannelAckParameters(ASN1decoding_t dec, H2250LogicalChannelAckParameters *val);
  693. static int ASN1CALL ASN1Dec_H223ModeParameters(ASN1decoding_t dec, H223ModeParameters *val);
  694. static int ASN1CALL ASN1Dec_RedundancyEncodingMode(ASN1decoding_t dec, RedundancyEncodingMode *val);
  695. static int ASN1CALL ASN1Dec_VideoMode(ASN1decoding_t dec, VideoMode *val);
  696. static int ASN1CALL ASN1Dec_EncryptionCommand(ASN1decoding_t dec, EncryptionCommand *val);
  697. static int ASN1CALL ASN1Dec_MiscellaneousCommand(ASN1decoding_t dec, MiscellaneousCommand *val);
  698. static int ASN1CALL ASN1Dec_MiscellaneousIndication(ASN1decoding_t dec, MiscellaneousIndication *val);
  699. static int ASN1CALL ASN1Dec_MCLocationIndication(ASN1decoding_t dec, MCLocationIndication *val);
  700. static int ASN1CALL ASN1Dec_UserInputIndication(ASN1decoding_t dec, UserInputIndication *val);
  701. static int ASN1CALL ASN1Dec_DataApplicationCapability_application_nlpid(ASN1decoding_t dec, DataApplicationCapability_application_nlpid *val);
  702. static int ASN1CALL ASN1Dec_DataApplicationCapability_application_t84(ASN1decoding_t dec, DataApplicationCapability_application_t84 *val);
  703. static int ASN1CALL ASN1Dec_DataMode_application_nlpid(ASN1decoding_t dec, DataMode_application_nlpid *val);
  704. static int ASN1CALL ASN1Dec_DataMode_application(ASN1decoding_t dec, DataMode_application *val);
  705. static int ASN1CALL ASN1Dec_OpenLogicalChannelAck_forwardMultiplexAckParameters(ASN1decoding_t dec, OpenLogicalChannelAck_forwardMultiplexAckParameters *val);
  706. static int ASN1CALL ASN1Dec_H2250LogicalChannelParameters_mediaPacketization(ASN1decoding_t dec, H2250LogicalChannelParameters_mediaPacketization *val);
  707. static int ASN1CALL ASN1Dec_NetworkAccessParameters_networkAddress(ASN1decoding_t dec, NetworkAccessParameters_networkAddress *val);
  708. static int ASN1CALL ASN1Dec_DataApplicationCapability_application(ASN1decoding_t dec, DataApplicationCapability_application *val);
  709. static int ASN1CALL ASN1Dec_EnhancementLayerInfo_spatialEnhancement(ASN1decoding_t dec, PEnhancementLayerInfo_spatialEnhancement *val);
  710. static int ASN1CALL ASN1Dec_EnhancementLayerInfo_snrEnhancement(ASN1decoding_t dec, PEnhancementLayerInfo_snrEnhancement *val);
  711. static int ASN1CALL ASN1Dec_MediaPacketizationCapability_rtpPayloadType(ASN1decoding_t dec, MediaPacketizationCapability_rtpPayloadType *val);
  712. static int ASN1CALL ASN1Dec_H2250Capability_redundancyEncodingCapability(ASN1decoding_t dec, PH2250Capability_redundancyEncodingCapability *val);
  713. static int ASN1CALL ASN1Dec_CommandMessage(ASN1decoding_t dec, CommandMessage *val);
  714. static int ASN1CALL ASN1Dec_H235SecurityCapability(ASN1decoding_t dec, H235SecurityCapability *val);
  715. static int ASN1CALL ASN1Dec_MediaPacketizationCapability(ASN1decoding_t dec, MediaPacketizationCapability *val);
  716. static int ASN1CALL ASN1Dec_VideoCapability(ASN1decoding_t dec, VideoCapability *val);
  717. static int ASN1CALL ASN1Dec_BEnhancementParameters(ASN1decoding_t dec, BEnhancementParameters *val);
  718. static int ASN1CALL ASN1Dec_DataApplicationCapability(ASN1decoding_t dec, DataApplicationCapability *val);
  719. static int ASN1CALL ASN1Dec_NetworkAccessParameters(ASN1decoding_t dec, NetworkAccessParameters *val);
  720. static int ASN1CALL ASN1Dec_H2250ModeParameters(ASN1decoding_t dec, H2250ModeParameters *val);
  721. static int ASN1CALL ASN1Dec_DataMode(ASN1decoding_t dec, DataMode *val);
  722. static int ASN1CALL ASN1Dec_CommunicationModeTableEntry_dataType(ASN1decoding_t dec, CommunicationModeTableEntry_dataType *val);
  723. static int ASN1CALL ASN1Dec_H235Mode_mediaMode(ASN1decoding_t dec, H235Mode_mediaMode *val);
  724. static int ASN1CALL ASN1Dec_H235Media_mediaType(ASN1decoding_t dec, H235Media_mediaType *val);
  725. static int ASN1CALL ASN1Dec_EnhancementLayerInfo_bPictureEnhancement(ASN1decoding_t dec, PEnhancementLayerInfo_bPictureEnhancement *val);
  726. static int ASN1CALL ASN1Dec_MediaDistributionCapability_distributedData(ASN1decoding_t dec, PMediaDistributionCapability_distributedData *val);
  727. static int ASN1CALL ASN1Dec_MediaDistributionCapability_centralizedData(ASN1decoding_t dec, PMediaDistributionCapability_centralizedData *val);
  728. static int ASN1CALL ASN1Dec_Capability(ASN1decoding_t dec, Capability *val);
  729. static int ASN1CALL ASN1Dec_H2250Capability(ASN1decoding_t dec, H2250Capability *val);
  730. static int ASN1CALL ASN1Dec_H235Media(ASN1decoding_t dec, H235Media *val);
  731. static int ASN1CALL ASN1Dec_H235Mode(ASN1decoding_t dec, H235Mode *val);
  732. static int ASN1CALL ASN1Dec_ModeElement_type(ASN1decoding_t dec, ModeElement_type *val);
  733. static int ASN1CALL ASN1Dec_CapabilityTableEntry(ASN1decoding_t dec, CapabilityTableEntry *val);
  734. static int ASN1CALL ASN1Dec_MultiplexCapability(ASN1decoding_t dec, MultiplexCapability *val);
  735. static int ASN1CALL ASN1Dec_DataType(ASN1decoding_t dec, DataType *val);
  736. static int ASN1CALL ASN1Dec_RedundancyEncoding(ASN1decoding_t dec, RedundancyEncoding *val);
  737. static int ASN1CALL ASN1Dec_ModeElement(ASN1decoding_t dec, ModeElement *val);
  738. static int ASN1CALL ASN1Dec_CommunicationModeTableEntry(ASN1decoding_t dec, CommunicationModeTableEntry *val);
  739. static int ASN1CALL ASN1Dec_CommunicationModeResponse_communicationModeTable(ASN1decoding_t dec, PCommunicationModeResponse_communicationModeTable *val);
  740. static int ASN1CALL ASN1Dec_CommunicationModeCommand_communicationModeTable(ASN1decoding_t dec, PCommunicationModeCommand_communicationModeTable *val);
  741. static int ASN1CALL ASN1Dec_TerminalCapabilitySet_capabilityTable(ASN1decoding_t dec, PTerminalCapabilitySet_capabilityTable *val);
  742. static int ASN1CALL ASN1Dec_TerminalCapabilitySet(ASN1decoding_t dec, TerminalCapabilitySet *val);
  743. static int ASN1CALL ASN1Dec_H2250LogicalChannelParameters(ASN1decoding_t dec, H2250LogicalChannelParameters *val);
  744. static int ASN1CALL ASN1Dec_ModeDescription(ASN1decoding_t dec, ModeDescription *val);
  745. static int ASN1CALL ASN1Dec_OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters(ASN1decoding_t dec, OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters *val);
  746. static int ASN1CALL ASN1Dec_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters(ASN1decoding_t dec, OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters *val);
  747. static int ASN1CALL ASN1Dec_OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters(ASN1decoding_t dec, OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters *val);
  748. static int ASN1CALL ASN1Dec_RequestMode_requestedModes(ASN1decoding_t dec, PRequestMode_requestedModes *val);
  749. static int ASN1CALL ASN1Dec_OpenLogicalChannelAck_reverseLogicalChannelParameters(ASN1decoding_t dec, OpenLogicalChannelAck_reverseLogicalChannelParameters *val);
  750. static int ASN1CALL ASN1Dec_OpenLogicalChannel_reverseLogicalChannelParameters(ASN1decoding_t dec, OpenLogicalChannel_reverseLogicalChannelParameters *val);
  751. static int ASN1CALL ASN1Dec_OpenLogicalChannel_forwardLogicalChannelParameters(ASN1decoding_t dec, OpenLogicalChannel_forwardLogicalChannelParameters *val);
  752. static int ASN1CALL ASN1Dec_OpenLogicalChannel(ASN1decoding_t dec, OpenLogicalChannel *val);
  753. static int ASN1CALL ASN1Dec_OpenLogicalChannelAck(ASN1decoding_t dec, OpenLogicalChannelAck *val);
  754. static int ASN1CALL ASN1Dec_RequestMessage(ASN1decoding_t dec, RequestMessage *val);
  755. static int ASN1CALL ASN1Dec_ResponseMessage(ASN1decoding_t dec, ResponseMessage *val);
  756. static int ASN1CALL ASN1Dec_FastConnectOLC(ASN1decoding_t dec, FastConnectOLC *val);
  757. static int ASN1CALL ASN1Dec_FunctionNotUnderstood(ASN1decoding_t dec, FunctionNotUnderstood *val);
  758. static int ASN1CALL ASN1Dec_IndicationMessage(ASN1decoding_t dec, IndicationMessage *val);
  759. static int ASN1CALL ASN1Dec_MultimediaSystemControlMessage(ASN1decoding_t dec, MultimediaSystemControlMessage *val);
  760. static void ASN1CALL ASN1Free_CustomPictureFormat_mPI_customPCF(CustomPictureFormat_mPI_customPCF *val);
  761. static void ASN1CALL ASN1Free_CustomPictureFormat_pixelAspectInformation_extendedPAR(CustomPictureFormat_pixelAspectInformation_extendedPAR *val);
  762. static void ASN1CALL ASN1Free_CustomPictureFormat_pixelAspectInformation_pixelAspectCode(CustomPictureFormat_pixelAspectInformation_pixelAspectCode *val);
  763. static void ASN1CALL ASN1Free_UnicastAddress_iPSourceRouteAddress_route(PUnicastAddress_iPSourceRouteAddress_route *val);
  764. static void ASN1CALL ASN1Free_SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers(SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers *val);
  765. static void ASN1CALL ASN1Free_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers(PSendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers *val);
  766. static void ASN1CALL ASN1Free_UserInputIndication_signal(UserInputIndication_signal *val);
  767. static void ASN1CALL ASN1Free_SendTerminalCapabilitySet_specificRequest(SendTerminalCapabilitySet_specificRequest *val);
  768. static void ASN1CALL ASN1Free_ConferenceResponse_extensionAddressResponse(ConferenceResponse_extensionAddressResponse *val);
  769. static void ASN1CALL ASN1Free_RequestMultiplexEntryRelease_entryNumbers(RequestMultiplexEntryRelease_entryNumbers *val);
  770. static void ASN1CALL ASN1Free_RequestMultiplexEntryReject_entryNumbers(RequestMultiplexEntryReject_entryNumbers *val);
  771. static void ASN1CALL ASN1Free_RequestMultiplexEntryAck_entryNumbers(RequestMultiplexEntryAck_entryNumbers *val);
  772. static void ASN1CALL ASN1Free_RequestMultiplexEntry_entryNumbers(RequestMultiplexEntry_entryNumbers *val);
  773. static void ASN1CALL ASN1Free_MultiplexEntrySendRelease_multiplexTableEntryNumber(MultiplexEntrySendRelease_multiplexTableEntryNumber *val);
  774. static void ASN1CALL ASN1Free_MultiplexEntrySendAck_multiplexTableEntryNumber(MultiplexEntrySendAck_multiplexTableEntryNumber *val);
  775. static void ASN1CALL ASN1Free_MultiplexElement_type(MultiplexElement_type *val);
  776. static void ASN1CALL ASN1Free_MulticastAddress_iP6Address(MulticastAddress_iP6Address *val);
  777. static void ASN1CALL ASN1Free_MulticastAddress_iPAddress(MulticastAddress_iPAddress *val);
  778. static void ASN1CALL ASN1Free_UnicastAddress_iPSourceRouteAddress(UnicastAddress_iPSourceRouteAddress *val);
  779. static void ASN1CALL ASN1Free_UnicastAddress_iP6Address(UnicastAddress_iP6Address *val);
  780. static void ASN1CALL ASN1Free_UnicastAddress_iPXAddress(UnicastAddress_iPXAddress *val);
  781. static void ASN1CALL ASN1Free_UnicastAddress_iPAddress(UnicastAddress_iPAddress *val);
  782. static void ASN1CALL ASN1Free_Q2931Address_address(Q2931Address_address *val);
  783. static void ASN1CALL ASN1Free_CustomPictureFormat_pixelAspectInformation(CustomPictureFormat_pixelAspectInformation *val);
  784. static void ASN1CALL ASN1Free_CustomPictureFormat_mPI(CustomPictureFormat_mPI *val);
  785. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyFrameMapping_frameSequence(RTPH263VideoRedundancyFrameMapping_frameSequence *val);
  786. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyEncoding_containedThreads(RTPH263VideoRedundancyEncoding_containedThreads *val);
  787. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyEncoding_frameToThreadMapping(RTPH263VideoRedundancyEncoding_frameToThreadMapping *val);
  788. static void ASN1CALL ASN1Free_RedundancyEncodingCapability_secondaryEncoding(PRedundancyEncodingCapability_secondaryEncoding *val);
  789. static void ASN1CALL ASN1Free_NonStandardIdentifier(NonStandardIdentifier *val);
  790. static void ASN1CALL ASN1Free_CapabilityDescriptor(CapabilityDescriptor *val);
  791. static void ASN1CALL ASN1Free_AlternativeCapabilitySet(AlternativeCapabilitySet *val);
  792. static void ASN1CALL ASN1Free_H222Capability(H222Capability *val);
  793. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyEncoding(RTPH263VideoRedundancyEncoding *val);
  794. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyFrameMapping(RTPH263VideoRedundancyFrameMapping *val);
  795. static void ASN1CALL ASN1Free_MultipointCapability(MultipointCapability *val);
  796. static void ASN1CALL ASN1Free_MediaDistributionCapability(MediaDistributionCapability *val);
  797. static void ASN1CALL ASN1Free_EnhancementLayerInfo(EnhancementLayerInfo *val);
  798. static void ASN1CALL ASN1Free_CustomPictureFormat(CustomPictureFormat *val);
  799. static void ASN1CALL ASN1Free_ConferenceCapability(ConferenceCapability *val);
  800. static void ASN1CALL ASN1Free_Q2931Address(Q2931Address *val);
  801. static void ASN1CALL ASN1Free_H222LogicalChannelParameters(H222LogicalChannelParameters *val);
  802. static void ASN1CALL ASN1Free_EscrowData(EscrowData *val);
  803. static void ASN1CALL ASN1Free_MultiplexEntrySend(MultiplexEntrySend *val);
  804. static void ASN1CALL ASN1Free_MultiplexElement(MultiplexElement *val);
  805. static void ASN1CALL ASN1Free_MultiplexEntrySendAck(MultiplexEntrySendAck *val);
  806. static void ASN1CALL ASN1Free_MultiplexEntrySendRelease(MultiplexEntrySendRelease *val);
  807. static void ASN1CALL ASN1Free_RequestMultiplexEntry(RequestMultiplexEntry *val);
  808. static void ASN1CALL ASN1Free_RequestMultiplexEntryAck(RequestMultiplexEntryAck *val);
  809. static void ASN1CALL ASN1Free_RequestMultiplexEntryRelease(RequestMultiplexEntryRelease *val);
  810. static void ASN1CALL ASN1Free_RequestMode(RequestMode *val);
  811. static void ASN1CALL ASN1Free_CommunicationModeCommand(CommunicationModeCommand *val);
  812. static void ASN1CALL ASN1Free_CommunicationModeResponse(CommunicationModeResponse *val);
  813. static void ASN1CALL ASN1Free_Criteria(Criteria *val);
  814. static void ASN1CALL ASN1Free_RequestAllTerminalIDsResponse(RequestAllTerminalIDsResponse *val);
  815. static void ASN1CALL ASN1Free_TerminalInformation(TerminalInformation *val);
  816. static void ASN1CALL ASN1Free_SendTerminalCapabilitySet(SendTerminalCapabilitySet *val);
  817. static void ASN1CALL ASN1Free_SubstituteConferenceIDCommand(SubstituteConferenceIDCommand *val);
  818. static void ASN1CALL ASN1Free_FunctionNotSupported(FunctionNotSupported *val);
  819. static void ASN1CALL ASN1Free_VendorIdentification(VendorIdentification *val);
  820. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom(PRTPH263VideoRedundancyEncoding_frameToThreadMapping_custom *val);
  821. static void ASN1CALL ASN1Free_MultiplexElement_type_subElementList(PMultiplexElement_type_subElementList *val);
  822. static void ASN1CALL ASN1Free_RequestAllTerminalIDsResponse_terminalInformation(PRequestAllTerminalIDsResponse_terminalInformation *val);
  823. static void ASN1CALL ASN1Free_ConferenceResponse_terminalCertificateResponse(ConferenceResponse_terminalCertificateResponse *val);
  824. static void ASN1CALL ASN1Free_ConferenceResponse_chairTokenOwnerResponse(ConferenceResponse_chairTokenOwnerResponse *val);
  825. static void ASN1CALL ASN1Free_ConferenceResponse_terminalListResponse(ConferenceResponse_terminalListResponse *val);
  826. static void ASN1CALL ASN1Free_ConferenceResponse_passwordResponse(ConferenceResponse_passwordResponse *val);
  827. static void ASN1CALL ASN1Free_ConferenceResponse_conferenceIDResponse(ConferenceResponse_conferenceIDResponse *val);
  828. static void ASN1CALL ASN1Free_ConferenceResponse_terminalIDResponse(ConferenceResponse_terminalIDResponse *val);
  829. static void ASN1CALL ASN1Free_ConferenceResponse_mCTerminalIDResponse(ConferenceResponse_mCTerminalIDResponse *val);
  830. static void ASN1CALL ASN1Free_ConferenceRequest_requestTerminalCertificate(ConferenceRequest_requestTerminalCertificate *val);
  831. static void ASN1CALL ASN1Free_RequestMultiplexEntryReject_rejectionDescriptions(RequestMultiplexEntryReject_rejectionDescriptions *val);
  832. static void ASN1CALL ASN1Free_MultiplexEntrySendReject_rejectionDescriptions(MultiplexEntrySendReject_rejectionDescriptions *val);
  833. static void ASN1CALL ASN1Free_MultiplexEntryDescriptor_elementList(MultiplexEntryDescriptor_elementList *val);
  834. static void ASN1CALL ASN1Free_EncryptionSync_escrowentry(PEncryptionSync_escrowentry *val);
  835. static void ASN1CALL ASN1Free_H263VideoModeCombos_h263VideoCoupledModes(H263VideoModeCombos_h263VideoCoupledModes *val);
  836. static void ASN1CALL ASN1Free_H263Options_customPictureFormat(PH263Options_customPictureFormat *val);
  837. static void ASN1CALL ASN1Free_H263Options_customPictureClockFrequency(PH263Options_customPictureClockFrequency *val);
  838. static void ASN1CALL ASN1Free_MultipointCapability_mediaDistributionCapability(PMultipointCapability_mediaDistributionCapability *val);
  839. static void ASN1CALL ASN1Free_TransportCapability_mediaChannelCapabilities(TransportCapability_mediaChannelCapabilities *val);
  840. static void ASN1CALL ASN1Free_H222Capability_vcCapability(PH222Capability_vcCapability *val);
  841. static void ASN1CALL ASN1Free_CapabilityDescriptor_simultaneousCapabilities(PCapabilityDescriptor_simultaneousCapabilities *val);
  842. static void ASN1CALL ASN1Free_TerminalCapabilitySet_capabilityDescriptors(TerminalCapabilitySet_capabilityDescriptors *val);
  843. static void ASN1CALL ASN1Free_NonStandardParameter(NonStandardParameter *val);
  844. static void ASN1CALL ASN1Free_QOSCapability(QOSCapability *val);
  845. static void ASN1CALL ASN1Free_TransportCapability(TransportCapability *val);
  846. static void ASN1CALL ASN1Free_RedundancyEncodingMethod(RedundancyEncodingMethod *val);
  847. static void ASN1CALL ASN1Free_H263Options(H263Options *val);
  848. static void ASN1CALL ASN1Free_H263VideoModeCombos(H263VideoModeCombos *val);
  849. static void ASN1CALL ASN1Free_AudioCapability(AudioCapability *val);
  850. static void ASN1CALL ASN1Free_MediaEncryptionAlgorithm(MediaEncryptionAlgorithm *val);
  851. static void ASN1CALL ASN1Free_AuthenticationCapability(AuthenticationCapability *val);
  852. static void ASN1CALL ASN1Free_IntegrityCapability(IntegrityCapability *val);
  853. static void ASN1CALL ASN1Free_UnicastAddress(UnicastAddress *val);
  854. static void ASN1CALL ASN1Free_MulticastAddress(MulticastAddress *val);
  855. static void ASN1CALL ASN1Free_EncryptionSync(EncryptionSync *val);
  856. static void ASN1CALL ASN1Free_RequestChannelClose(RequestChannelClose *val);
  857. static void ASN1CALL ASN1Free_MultiplexEntryDescriptor(MultiplexEntryDescriptor *val);
  858. static void ASN1CALL ASN1Free_MultiplexEntrySendReject(MultiplexEntrySendReject *val);
  859. static void ASN1CALL ASN1Free_RequestMultiplexEntryReject(RequestMultiplexEntryReject *val);
  860. static void ASN1CALL ASN1Free_H263VideoMode(H263VideoMode *val);
  861. static void ASN1CALL ASN1Free_AudioMode(AudioMode *val);
  862. static void ASN1CALL ASN1Free_EncryptionMode(EncryptionMode *val);
  863. static void ASN1CALL ASN1Free_ConferenceRequest(ConferenceRequest *val);
  864. static void ASN1CALL ASN1Free_CertSelectionCriteria(PCertSelectionCriteria *val);
  865. static void ASN1CALL ASN1Free_ConferenceResponse(ConferenceResponse *val);
  866. static void ASN1CALL ASN1Free_EndSessionCommand(EndSessionCommand *val);
  867. static void ASN1CALL ASN1Free_ConferenceCommand(ConferenceCommand *val);
  868. static void ASN1CALL ASN1Free_UserInputIndication_userInputSupportIndication(UserInputIndication_userInputSupportIndication *val);
  869. static void ASN1CALL ASN1Free_MiscellaneousIndication_type(MiscellaneousIndication_type *val);
  870. static void ASN1CALL ASN1Free_MiscellaneousCommand_type(MiscellaneousCommand_type *val);
  871. static void ASN1CALL ASN1Free_EncryptionCommand_encryptionAlgorithmID(EncryptionCommand_encryptionAlgorithmID *val);
  872. static void ASN1CALL ASN1Free_CommunicationModeTableEntry_nonStandard(PCommunicationModeTableEntry_nonStandard *val);
  873. static void ASN1CALL ASN1Free_RedundancyEncodingMode_secondaryEncoding(RedundancyEncodingMode_secondaryEncoding *val);
  874. static void ASN1CALL ASN1Free_H223ModeParameters_adaptationLayerType(H223ModeParameters_adaptationLayerType *val);
  875. static void ASN1CALL ASN1Free_MultiplexEntrySend_multiplexEntryDescriptors(PMultiplexEntrySend_multiplexEntryDescriptors *val);
  876. static void ASN1CALL ASN1Free_H2250LogicalChannelAckParameters_nonStandard(PH2250LogicalChannelAckParameters_nonStandard *val);
  877. static void ASN1CALL ASN1Free_RTPPayloadType_payloadDescriptor(RTPPayloadType_payloadDescriptor *val);
  878. static void ASN1CALL ASN1Free_H2250LogicalChannelParameters_nonStandard(PH2250LogicalChannelParameters_nonStandard *val);
  879. static void ASN1CALL ASN1Free_H223LogicalChannelParameters_adaptationLayerType(H223LogicalChannelParameters_adaptationLayerType *val);
  880. static void ASN1CALL ASN1Free_ConferenceCapability_nonStandardData(PConferenceCapability_nonStandardData *val);
  881. static void ASN1CALL ASN1Free_UserInputCapability_nonStandard(UserInputCapability_nonStandard *val);
  882. static void ASN1CALL ASN1Free_H263Options_modeCombos(PH263Options_modeCombos *val);
  883. static void ASN1CALL ASN1Free_TransportCapability_qOSCapabilities(PTransportCapability_qOSCapabilities *val);
  884. static void ASN1CALL ASN1Free_NonStandardMessage(NonStandardMessage *val);
  885. static void ASN1CALL ASN1Free_RedundancyEncodingCapability(RedundancyEncodingCapability *val);
  886. static void ASN1CALL ASN1Free_H263VideoCapability(H263VideoCapability *val);
  887. static void ASN1CALL ASN1Free_EnhancementOptions(EnhancementOptions *val);
  888. static void ASN1CALL ASN1Free_DataProtocolCapability(DataProtocolCapability *val);
  889. static void ASN1CALL ASN1Free_EncryptionAuthenticationAndIntegrity(EncryptionAuthenticationAndIntegrity *val);
  890. static void ASN1CALL ASN1Free_EncryptionCapability(PEncryptionCapability *val);
  891. static void ASN1CALL ASN1Free_UserInputCapability(UserInputCapability *val);
  892. static void ASN1CALL ASN1Free_H223LogicalChannelParameters(H223LogicalChannelParameters *val);
  893. static void ASN1CALL ASN1Free_RTPPayloadType(RTPPayloadType *val);
  894. static void ASN1CALL ASN1Free_H245TransportAddress(H245TransportAddress *val);
  895. static void ASN1CALL ASN1Free_H2250LogicalChannelAckParameters(H2250LogicalChannelAckParameters *val);
  896. static void ASN1CALL ASN1Free_H223ModeParameters(H223ModeParameters *val);
  897. static void ASN1CALL ASN1Free_RedundancyEncodingMode(RedundancyEncodingMode *val);
  898. static void ASN1CALL ASN1Free_VideoMode(VideoMode *val);
  899. static void ASN1CALL ASN1Free_EncryptionCommand(EncryptionCommand *val);
  900. static void ASN1CALL ASN1Free_MiscellaneousCommand(MiscellaneousCommand *val);
  901. static void ASN1CALL ASN1Free_MiscellaneousIndication(MiscellaneousIndication *val);
  902. static void ASN1CALL ASN1Free_MCLocationIndication(MCLocationIndication *val);
  903. static void ASN1CALL ASN1Free_UserInputIndication(UserInputIndication *val);
  904. static void ASN1CALL ASN1Free_DataApplicationCapability_application_nlpid(DataApplicationCapability_application_nlpid *val);
  905. static void ASN1CALL ASN1Free_DataApplicationCapability_application_t84(DataApplicationCapability_application_t84 *val);
  906. static void ASN1CALL ASN1Free_DataMode_application_nlpid(DataMode_application_nlpid *val);
  907. static void ASN1CALL ASN1Free_DataMode_application(DataMode_application *val);
  908. static void ASN1CALL ASN1Free_OpenLogicalChannelAck_forwardMultiplexAckParameters(OpenLogicalChannelAck_forwardMultiplexAckParameters *val);
  909. static void ASN1CALL ASN1Free_H2250LogicalChannelParameters_mediaPacketization(H2250LogicalChannelParameters_mediaPacketization *val);
  910. static void ASN1CALL ASN1Free_NetworkAccessParameters_networkAddress(NetworkAccessParameters_networkAddress *val);
  911. static void ASN1CALL ASN1Free_DataApplicationCapability_application(DataApplicationCapability_application *val);
  912. static void ASN1CALL ASN1Free_EnhancementLayerInfo_spatialEnhancement(PEnhancementLayerInfo_spatialEnhancement *val);
  913. static void ASN1CALL ASN1Free_EnhancementLayerInfo_snrEnhancement(PEnhancementLayerInfo_snrEnhancement *val);
  914. static void ASN1CALL ASN1Free_MediaPacketizationCapability_rtpPayloadType(MediaPacketizationCapability_rtpPayloadType *val);
  915. static void ASN1CALL ASN1Free_H2250Capability_redundancyEncodingCapability(PH2250Capability_redundancyEncodingCapability *val);
  916. static void ASN1CALL ASN1Free_CommandMessage(CommandMessage *val);
  917. static void ASN1CALL ASN1Free_H235SecurityCapability(H235SecurityCapability *val);
  918. static void ASN1CALL ASN1Free_MediaPacketizationCapability(MediaPacketizationCapability *val);
  919. static void ASN1CALL ASN1Free_VideoCapability(VideoCapability *val);
  920. static void ASN1CALL ASN1Free_BEnhancementParameters(BEnhancementParameters *val);
  921. static void ASN1CALL ASN1Free_DataApplicationCapability(DataApplicationCapability *val);
  922. static void ASN1CALL ASN1Free_NetworkAccessParameters(NetworkAccessParameters *val);
  923. static void ASN1CALL ASN1Free_H2250ModeParameters(H2250ModeParameters *val);
  924. static void ASN1CALL ASN1Free_DataMode(DataMode *val);
  925. static void ASN1CALL ASN1Free_CommunicationModeTableEntry_dataType(CommunicationModeTableEntry_dataType *val);
  926. static void ASN1CALL ASN1Free_H235Mode_mediaMode(H235Mode_mediaMode *val);
  927. static void ASN1CALL ASN1Free_H235Media_mediaType(H235Media_mediaType *val);
  928. static void ASN1CALL ASN1Free_EnhancementLayerInfo_bPictureEnhancement(PEnhancementLayerInfo_bPictureEnhancement *val);
  929. static void ASN1CALL ASN1Free_MediaDistributionCapability_distributedData(PMediaDistributionCapability_distributedData *val);
  930. static void ASN1CALL ASN1Free_MediaDistributionCapability_centralizedData(PMediaDistributionCapability_centralizedData *val);
  931. static void ASN1CALL ASN1Free_Capability(Capability *val);
  932. static void ASN1CALL ASN1Free_H2250Capability(H2250Capability *val);
  933. static void ASN1CALL ASN1Free_H235Media(H235Media *val);
  934. static void ASN1CALL ASN1Free_H235Mode(H235Mode *val);
  935. static void ASN1CALL ASN1Free_ModeElement_type(ModeElement_type *val);
  936. static void ASN1CALL ASN1Free_CapabilityTableEntry(CapabilityTableEntry *val);
  937. static void ASN1CALL ASN1Free_MultiplexCapability(MultiplexCapability *val);
  938. static void ASN1CALL ASN1Free_DataType(DataType *val);
  939. static void ASN1CALL ASN1Free_RedundancyEncoding(RedundancyEncoding *val);
  940. static void ASN1CALL ASN1Free_ModeElement(ModeElement *val);
  941. static void ASN1CALL ASN1Free_CommunicationModeTableEntry(CommunicationModeTableEntry *val);
  942. static void ASN1CALL ASN1Free_CommunicationModeResponse_communicationModeTable(PCommunicationModeResponse_communicationModeTable *val);
  943. static void ASN1CALL ASN1Free_CommunicationModeCommand_communicationModeTable(PCommunicationModeCommand_communicationModeTable *val);
  944. static void ASN1CALL ASN1Free_TerminalCapabilitySet_capabilityTable(PTerminalCapabilitySet_capabilityTable *val);
  945. static void ASN1CALL ASN1Free_TerminalCapabilitySet(TerminalCapabilitySet *val);
  946. static void ASN1CALL ASN1Free_H2250LogicalChannelParameters(H2250LogicalChannelParameters *val);
  947. static void ASN1CALL ASN1Free_ModeDescription(ModeDescription *val);
  948. static void ASN1CALL ASN1Free_OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters(OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters *val);
  949. static void ASN1CALL ASN1Free_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters(OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters *val);
  950. static void ASN1CALL ASN1Free_OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters(OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters *val);
  951. static void ASN1CALL ASN1Free_RequestMode_requestedModes(PRequestMode_requestedModes *val);
  952. static void ASN1CALL ASN1Free_OpenLogicalChannelAck_reverseLogicalChannelParameters(OpenLogicalChannelAck_reverseLogicalChannelParameters *val);
  953. static void ASN1CALL ASN1Free_OpenLogicalChannel_reverseLogicalChannelParameters(OpenLogicalChannel_reverseLogicalChannelParameters *val);
  954. static void ASN1CALL ASN1Free_OpenLogicalChannel_forwardLogicalChannelParameters(OpenLogicalChannel_forwardLogicalChannelParameters *val);
  955. static void ASN1CALL ASN1Free_OpenLogicalChannel(OpenLogicalChannel *val);
  956. static void ASN1CALL ASN1Free_OpenLogicalChannelAck(OpenLogicalChannelAck *val);
  957. static void ASN1CALL ASN1Free_RequestMessage(RequestMessage *val);
  958. static void ASN1CALL ASN1Free_ResponseMessage(ResponseMessage *val);
  959. static void ASN1CALL ASN1Free_FastConnectOLC(FastConnectOLC *val);
  960. static void ASN1CALL ASN1Free_FunctionNotUnderstood(FunctionNotUnderstood *val);
  961. static void ASN1CALL ASN1Free_IndicationMessage(IndicationMessage *val);
  962. static void ASN1CALL ASN1Free_MultimediaSystemControlMessage(MultimediaSystemControlMessage *val);
  963. typedef ASN1PerEncFun_t ASN1EncFun_t;
  964. static const ASN1EncFun_t encfntab[2] = {
  965. (ASN1EncFun_t) ASN1Enc_FastConnectOLC,
  966. (ASN1EncFun_t) ASN1Enc_MultimediaSystemControlMessage,
  967. };
  968. typedef ASN1PerDecFun_t ASN1DecFun_t;
  969. static const ASN1DecFun_t decfntab[2] = {
  970. (ASN1DecFun_t) ASN1Dec_FastConnectOLC,
  971. (ASN1DecFun_t) ASN1Dec_MultimediaSystemControlMessage,
  972. };
  973. static const ASN1FreeFun_t freefntab[2] = {
  974. (ASN1FreeFun_t) ASN1Free_FastConnectOLC,
  975. (ASN1FreeFun_t) ASN1Free_MultimediaSystemControlMessage,
  976. };
  977. static const ULONG sizetab[2] = {
  978. SIZE_H245PP_Module_PDU_0,
  979. SIZE_H245PP_Module_PDU_1,
  980. };
  981. /* forward declarations of values: */
  982. /* definitions of value components: */
  983. /* definitions of values: */
  984. void ASN1CALL H245PP_Module_Startup(void)
  985. {
  986. H245PP_Module = ASN1_CreateModule(0x10000, ASN1_PER_RULE_ALIGNED, ASN1FLAGS_NONE, 2, (const ASN1GenericFun_t *) encfntab, (const ASN1GenericFun_t *) decfntab, freefntab, sizetab, 0x35343268);
  987. }
  988. void ASN1CALL H245PP_Module_Cleanup(void)
  989. {
  990. ASN1_CloseModule(H245PP_Module);
  991. H245PP_Module = NULL;
  992. }
  993. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal_aal1_errorCorrection(ASN1encoding_t enc, NewATMVCIndication_aal_aal1_errorCorrection *val)
  994. {
  995. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  996. return 0;
  997. return 1;
  998. }
  999. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal_aal1_errorCorrection(ASN1decoding_t dec, NewATMVCIndication_aal_aal1_errorCorrection *val)
  1000. {
  1001. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  1002. return 0;
  1003. return 1;
  1004. }
  1005. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal_aal1_clockRecovery(ASN1encoding_t enc, NewATMVCIndication_aal_aal1_clockRecovery *val)
  1006. {
  1007. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  1008. return 0;
  1009. return 1;
  1010. }
  1011. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal_aal1_clockRecovery(ASN1decoding_t dec, NewATMVCIndication_aal_aal1_clockRecovery *val)
  1012. {
  1013. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  1014. return 0;
  1015. return 1;
  1016. }
  1017. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type_progressiveRefinementStart_repeatCount(ASN1encoding_t enc, MiscellaneousCommand_type_progressiveRefinementStart_repeatCount *val)
  1018. {
  1019. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  1020. return 0;
  1021. return 1;
  1022. }
  1023. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type_progressiveRefinementStart_repeatCount(ASN1decoding_t dec, MiscellaneousCommand_type_progressiveRefinementStart_repeatCount *val)
  1024. {
  1025. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  1026. return 0;
  1027. return 1;
  1028. }
  1029. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters_mode_eRM_recovery(ASN1encoding_t enc, V76LogicalChannelParameters_mode_eRM_recovery *val)
  1030. {
  1031. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  1032. return 0;
  1033. return 1;
  1034. }
  1035. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters_mode_eRM_recovery(ASN1decoding_t dec, V76LogicalChannelParameters_mode_eRM_recovery *val)
  1036. {
  1037. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  1038. return 0;
  1039. return 1;
  1040. }
  1041. static int ASN1CALL ASN1Enc_CustomPictureFormat_pixelAspectInformation_extendedPAR_Set(ASN1encoding_t enc, CustomPictureFormat_pixelAspectInformation_extendedPAR_Set *val)
  1042. {
  1043. if (!ASN1PEREncExtensionBitClear(enc))
  1044. return 0;
  1045. if (!ASN1PEREncBitVal(enc, 8, (val)->width - 1))
  1046. return 0;
  1047. if (!ASN1PEREncBitVal(enc, 8, (val)->height - 1))
  1048. return 0;
  1049. return 1;
  1050. }
  1051. static int ASN1CALL ASN1Dec_CustomPictureFormat_pixelAspectInformation_extendedPAR_Set(ASN1decoding_t dec, CustomPictureFormat_pixelAspectInformation_extendedPAR_Set *val)
  1052. {
  1053. ASN1uint32_t y;
  1054. if (!ASN1PERDecExtensionBit(dec, &y))
  1055. return 0;
  1056. if (!ASN1PERDecU16Val(dec, 8, &(val)->width))
  1057. return 0;
  1058. (val)->width += 1;
  1059. if (!ASN1PERDecU16Val(dec, 8, &(val)->height))
  1060. return 0;
  1061. (val)->height += 1;
  1062. if (y) {
  1063. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1064. return 0;
  1065. }
  1066. return 1;
  1067. }
  1068. static int ASN1CALL ASN1Enc_CustomPictureFormat_mPI_customPCF_Set(ASN1encoding_t enc, CustomPictureFormat_mPI_customPCF_Set *val)
  1069. {
  1070. if (!ASN1PEREncExtensionBitClear(enc))
  1071. return 0;
  1072. if (!ASN1PEREncBitVal(enc, 1, (val)->clockConversionCode - 1000))
  1073. return 0;
  1074. if (!ASN1PEREncBitVal(enc, 7, (val)->clockDivisor - 1))
  1075. return 0;
  1076. if (!ASN1PEREncUnsignedShort(enc, (val)->customMPI - 1))
  1077. return 0;
  1078. return 1;
  1079. }
  1080. static int ASN1CALL ASN1Dec_CustomPictureFormat_mPI_customPCF_Set(ASN1decoding_t dec, CustomPictureFormat_mPI_customPCF_Set *val)
  1081. {
  1082. ASN1uint32_t y;
  1083. if (!ASN1PERDecExtensionBit(dec, &y))
  1084. return 0;
  1085. if (!ASN1PERDecU16Val(dec, 1, &(val)->clockConversionCode))
  1086. return 0;
  1087. (val)->clockConversionCode += 1000;
  1088. if (!ASN1PERDecU16Val(dec, 7, &(val)->clockDivisor))
  1089. return 0;
  1090. (val)->clockDivisor += 1;
  1091. if (!ASN1PERDecUnsignedShort(dec, &(val)->customMPI))
  1092. return 0;
  1093. (val)->customMPI += 1;
  1094. if (y) {
  1095. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1096. return 0;
  1097. }
  1098. return 1;
  1099. }
  1100. static int ASN1CALL ASN1Enc_VCCapability_availableBitRates_type_rangeOfBitRates(ASN1encoding_t enc, VCCapability_availableBitRates_type_rangeOfBitRates *val)
  1101. {
  1102. if (!ASN1PEREncUnsignedShort(enc, (val)->lowerBitRate - 1))
  1103. return 0;
  1104. if (!ASN1PEREncUnsignedShort(enc, (val)->higherBitRate - 1))
  1105. return 0;
  1106. return 1;
  1107. }
  1108. static int ASN1CALL ASN1Dec_VCCapability_availableBitRates_type_rangeOfBitRates(ASN1decoding_t dec, VCCapability_availableBitRates_type_rangeOfBitRates *val)
  1109. {
  1110. if (!ASN1PERDecUnsignedShort(dec, &(val)->lowerBitRate))
  1111. return 0;
  1112. (val)->lowerBitRate += 1;
  1113. if (!ASN1PERDecUnsignedShort(dec, &(val)->higherBitRate))
  1114. return 0;
  1115. (val)->higherBitRate += 1;
  1116. return 1;
  1117. }
  1118. static int ASN1CALL ASN1Enc_TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded(ASN1encoding_t enc, TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded *val)
  1119. {
  1120. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1121. return 0;
  1122. switch ((val)->choice) {
  1123. case 1:
  1124. if (!ASN1PEREncUnsignedShort(enc, (val)->u.highestEntryNumberProcessed - 1))
  1125. return 0;
  1126. break;
  1127. case 2:
  1128. break;
  1129. default:
  1130. /* impossible */
  1131. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1132. return 0;
  1133. }
  1134. return 1;
  1135. }
  1136. static int ASN1CALL ASN1Dec_TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded(ASN1decoding_t dec, TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded *val)
  1137. {
  1138. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1139. return 0;
  1140. switch ((val)->choice) {
  1141. case 1:
  1142. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.highestEntryNumberProcessed))
  1143. return 0;
  1144. (val)->u.highestEntryNumberProcessed += 1;
  1145. break;
  1146. case 2:
  1147. break;
  1148. default:
  1149. /* impossible */
  1150. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1151. return 0;
  1152. }
  1153. return 1;
  1154. }
  1155. static int ASN1CALL ASN1Enc_VCCapability_availableBitRates_type(ASN1encoding_t enc, VCCapability_availableBitRates_type *val)
  1156. {
  1157. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1158. return 0;
  1159. switch ((val)->choice) {
  1160. case 1:
  1161. if (!ASN1PEREncUnsignedShort(enc, (val)->u.singleBitRate - 1))
  1162. return 0;
  1163. break;
  1164. case 2:
  1165. if (!ASN1Enc_VCCapability_availableBitRates_type_rangeOfBitRates(enc, &(val)->u.rangeOfBitRates))
  1166. return 0;
  1167. break;
  1168. default:
  1169. /* impossible */
  1170. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1171. return 0;
  1172. }
  1173. return 1;
  1174. }
  1175. static int ASN1CALL ASN1Dec_VCCapability_availableBitRates_type(ASN1decoding_t dec, VCCapability_availableBitRates_type *val)
  1176. {
  1177. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1178. return 0;
  1179. switch ((val)->choice) {
  1180. case 1:
  1181. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.singleBitRate))
  1182. return 0;
  1183. (val)->u.singleBitRate += 1;
  1184. break;
  1185. case 2:
  1186. if (!ASN1Dec_VCCapability_availableBitRates_type_rangeOfBitRates(dec, &(val)->u.rangeOfBitRates))
  1187. return 0;
  1188. break;
  1189. default:
  1190. /* impossible */
  1191. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1192. return 0;
  1193. }
  1194. return 1;
  1195. }
  1196. static int ASN1CALL ASN1Enc_H223Capability_h223MultiplexTableCapability_enhanced(ASN1encoding_t enc, H223Capability_h223MultiplexTableCapability_enhanced *val)
  1197. {
  1198. if (!ASN1PEREncExtensionBitClear(enc))
  1199. return 0;
  1200. if (!ASN1PEREncBitVal(enc, 4, (val)->maximumNestingDepth - 1))
  1201. return 0;
  1202. if (!ASN1PEREncBitVal(enc, 8, (val)->maximumElementListSize - 2))
  1203. return 0;
  1204. if (!ASN1PEREncBitVal(enc, 8, (val)->maximumSubElementListSize - 2))
  1205. return 0;
  1206. return 1;
  1207. }
  1208. static int ASN1CALL ASN1Dec_H223Capability_h223MultiplexTableCapability_enhanced(ASN1decoding_t dec, H223Capability_h223MultiplexTableCapability_enhanced *val)
  1209. {
  1210. ASN1uint32_t y;
  1211. if (!ASN1PERDecExtensionBit(dec, &y))
  1212. return 0;
  1213. if (!ASN1PERDecU16Val(dec, 4, &(val)->maximumNestingDepth))
  1214. return 0;
  1215. (val)->maximumNestingDepth += 1;
  1216. if (!ASN1PERDecU16Val(dec, 8, &(val)->maximumElementListSize))
  1217. return 0;
  1218. (val)->maximumElementListSize += 2;
  1219. if (!ASN1PERDecU16Val(dec, 8, &(val)->maximumSubElementListSize))
  1220. return 0;
  1221. (val)->maximumSubElementListSize += 2;
  1222. if (y) {
  1223. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1224. return 0;
  1225. }
  1226. return 1;
  1227. }
  1228. static int ASN1CALL ASN1Enc_CustomPictureFormat_mPI_customPCF(ASN1encoding_t enc, CustomPictureFormat_mPI_customPCF *val)
  1229. {
  1230. ASN1uint32_t i;
  1231. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  1232. return 0;
  1233. for (i = 0; i < (val)->count; i++) {
  1234. if (!ASN1Enc_CustomPictureFormat_mPI_customPCF_Set(enc, &((val)->value)[i]))
  1235. return 0;
  1236. }
  1237. return 1;
  1238. }
  1239. static int ASN1CALL ASN1Dec_CustomPictureFormat_mPI_customPCF(ASN1decoding_t dec, CustomPictureFormat_mPI_customPCF *val)
  1240. {
  1241. ASN1uint32_t i;
  1242. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  1243. return 0;
  1244. (val)->count += 1;
  1245. for (i = 0; i < (val)->count; i++) {
  1246. if (!ASN1Dec_CustomPictureFormat_mPI_customPCF_Set(dec, &((val)->value)[i]))
  1247. return 0;
  1248. }
  1249. return 1;
  1250. }
  1251. static void ASN1CALL ASN1Free_CustomPictureFormat_mPI_customPCF(CustomPictureFormat_mPI_customPCF *val)
  1252. {
  1253. if (val) {
  1254. }
  1255. }
  1256. static int ASN1CALL ASN1Enc_CustomPictureFormat_pixelAspectInformation_extendedPAR(ASN1encoding_t enc, CustomPictureFormat_pixelAspectInformation_extendedPAR *val)
  1257. {
  1258. ASN1uint32_t i;
  1259. ASN1PEREncAlignment(enc);
  1260. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  1261. return 0;
  1262. for (i = 0; i < (val)->count; i++) {
  1263. if (!ASN1Enc_CustomPictureFormat_pixelAspectInformation_extendedPAR_Set(enc, &((val)->value)[i]))
  1264. return 0;
  1265. }
  1266. return 1;
  1267. }
  1268. static int ASN1CALL ASN1Dec_CustomPictureFormat_pixelAspectInformation_extendedPAR(ASN1decoding_t dec, CustomPictureFormat_pixelAspectInformation_extendedPAR *val)
  1269. {
  1270. ASN1uint32_t i;
  1271. ASN1PERDecAlignment(dec);
  1272. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  1273. return 0;
  1274. (val)->count += 1;
  1275. for (i = 0; i < (val)->count; i++) {
  1276. if (!ASN1Dec_CustomPictureFormat_pixelAspectInformation_extendedPAR_Set(dec, &((val)->value)[i]))
  1277. return 0;
  1278. }
  1279. return 1;
  1280. }
  1281. static void ASN1CALL ASN1Free_CustomPictureFormat_pixelAspectInformation_extendedPAR(CustomPictureFormat_pixelAspectInformation_extendedPAR *val)
  1282. {
  1283. if (val) {
  1284. }
  1285. }
  1286. static int ASN1CALL ASN1Enc_CustomPictureFormat_pixelAspectInformation_pixelAspectCode(ASN1encoding_t enc, CustomPictureFormat_pixelAspectInformation_pixelAspectCode *val)
  1287. {
  1288. ASN1uint32_t i;
  1289. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  1290. return 0;
  1291. for (i = 0; i < (val)->count; i++) {
  1292. if (!ASN1PEREncBitVal(enc, 4, ((val)->value)[i] - 1))
  1293. return 0;
  1294. }
  1295. return 1;
  1296. }
  1297. static int ASN1CALL ASN1Dec_CustomPictureFormat_pixelAspectInformation_pixelAspectCode(ASN1decoding_t dec, CustomPictureFormat_pixelAspectInformation_pixelAspectCode *val)
  1298. {
  1299. ASN1uint32_t i;
  1300. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  1301. return 0;
  1302. (val)->count += 1;
  1303. for (i = 0; i < (val)->count; i++) {
  1304. if (!ASN1PERDecU16Val(dec, 4, &((val)->value)[i]))
  1305. return 0;
  1306. ((val)->value)[i] += 1;
  1307. }
  1308. return 1;
  1309. }
  1310. static void ASN1CALL ASN1Free_CustomPictureFormat_pixelAspectInformation_pixelAspectCode(CustomPictureFormat_pixelAspectInformation_pixelAspectCode *val)
  1311. {
  1312. if (val) {
  1313. }
  1314. }
  1315. static int ASN1CALL ASN1Enc_H223LogicalChannelParameters_adaptationLayerType_al3(ASN1encoding_t enc, H223LogicalChannelParameters_adaptationLayerType_al3 *val)
  1316. {
  1317. ASN1uint32_t l;
  1318. if (!ASN1PEREncBitVal(enc, 2, (val)->controlFieldOctets))
  1319. return 0;
  1320. l = ASN1uint32_uoctets((val)->sendBufferSize);
  1321. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  1322. return 0;
  1323. ASN1PEREncAlignment(enc);
  1324. if (!ASN1PEREncBitVal(enc, l * 8, (val)->sendBufferSize))
  1325. return 0;
  1326. return 1;
  1327. }
  1328. static int ASN1CALL ASN1Dec_H223LogicalChannelParameters_adaptationLayerType_al3(ASN1decoding_t dec, H223LogicalChannelParameters_adaptationLayerType_al3 *val)
  1329. {
  1330. ASN1uint32_t l;
  1331. if (!ASN1PERDecU16Val(dec, 2, &(val)->controlFieldOctets))
  1332. return 0;
  1333. if (!ASN1PERDecU32Val(dec, 2, &l))
  1334. return 0;
  1335. l += 1;
  1336. ASN1PERDecAlignment(dec);
  1337. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->sendBufferSize))
  1338. return 0;
  1339. return 1;
  1340. }
  1341. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters_mode_eRM(ASN1encoding_t enc, V76LogicalChannelParameters_mode_eRM *val)
  1342. {
  1343. if (!ASN1PEREncExtensionBitClear(enc))
  1344. return 0;
  1345. if (!ASN1PEREncBitVal(enc, 7, (val)->windowSize - 1))
  1346. return 0;
  1347. if (!ASN1Enc_V76LogicalChannelParameters_mode_eRM_recovery(enc, &(val)->recovery))
  1348. return 0;
  1349. return 1;
  1350. }
  1351. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters_mode_eRM(ASN1decoding_t dec, V76LogicalChannelParameters_mode_eRM *val)
  1352. {
  1353. ASN1uint32_t y;
  1354. if (!ASN1PERDecExtensionBit(dec, &y))
  1355. return 0;
  1356. if (!ASN1PERDecU16Val(dec, 7, &(val)->windowSize))
  1357. return 0;
  1358. (val)->windowSize += 1;
  1359. if (!ASN1Dec_V76LogicalChannelParameters_mode_eRM_recovery(dec, &(val)->recovery))
  1360. return 0;
  1361. if (y) {
  1362. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1363. return 0;
  1364. }
  1365. return 1;
  1366. }
  1367. static int ASN1CALL ASN1Enc_UnicastAddress_iPSourceRouteAddress_route(ASN1encoding_t enc, PUnicastAddress_iPSourceRouteAddress_route *val)
  1368. {
  1369. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_UnicastAddress_iPSourceRouteAddress_route_ElmFn);
  1370. }
  1371. static int ASN1CALL ASN1Enc_UnicastAddress_iPSourceRouteAddress_route_ElmFn(ASN1encoding_t enc, PUnicastAddress_iPSourceRouteAddress_route val)
  1372. {
  1373. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &val->value, 4))
  1374. return 0;
  1375. return 1;
  1376. }
  1377. static int ASN1CALL ASN1Dec_UnicastAddress_iPSourceRouteAddress_route(ASN1decoding_t dec, PUnicastAddress_iPSourceRouteAddress_route *val)
  1378. {
  1379. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_UnicastAddress_iPSourceRouteAddress_route_ElmFn, sizeof(**val));
  1380. }
  1381. static int ASN1CALL ASN1Dec_UnicastAddress_iPSourceRouteAddress_route_ElmFn(ASN1decoding_t dec, PUnicastAddress_iPSourceRouteAddress_route val)
  1382. {
  1383. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &val->value, 4))
  1384. return 0;
  1385. return 1;
  1386. }
  1387. static void ASN1CALL ASN1Free_UnicastAddress_iPSourceRouteAddress_route(PUnicastAddress_iPSourceRouteAddress_route *val)
  1388. {
  1389. if (val) {
  1390. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_UnicastAddress_iPSourceRouteAddress_route_ElmFn);
  1391. }
  1392. }
  1393. static void ASN1CALL ASN1Free_UnicastAddress_iPSourceRouteAddress_route_ElmFn(PUnicastAddress_iPSourceRouteAddress_route val)
  1394. {
  1395. if (val) {
  1396. }
  1397. }
  1398. static int ASN1CALL ASN1Enc_UnicastAddress_iPSourceRouteAddress_routing(ASN1encoding_t enc, UnicastAddress_iPSourceRouteAddress_routing *val)
  1399. {
  1400. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1401. return 0;
  1402. return 1;
  1403. }
  1404. static int ASN1CALL ASN1Dec_UnicastAddress_iPSourceRouteAddress_routing(ASN1decoding_t dec, UnicastAddress_iPSourceRouteAddress_routing *val)
  1405. {
  1406. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1407. return 0;
  1408. return 1;
  1409. }
  1410. static int ASN1CALL ASN1Enc_H223ModeParameters_adaptationLayerType_al3(ASN1encoding_t enc, H223ModeParameters_adaptationLayerType_al3 *val)
  1411. {
  1412. ASN1uint32_t l;
  1413. if (!ASN1PEREncBitVal(enc, 2, (val)->controlFieldOctets))
  1414. return 0;
  1415. l = ASN1uint32_uoctets((val)->sendBufferSize);
  1416. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  1417. return 0;
  1418. ASN1PEREncAlignment(enc);
  1419. if (!ASN1PEREncBitVal(enc, l * 8, (val)->sendBufferSize))
  1420. return 0;
  1421. return 1;
  1422. }
  1423. static int ASN1CALL ASN1Dec_H223ModeParameters_adaptationLayerType_al3(ASN1decoding_t dec, H223ModeParameters_adaptationLayerType_al3 *val)
  1424. {
  1425. ASN1uint32_t l;
  1426. if (!ASN1PERDecU16Val(dec, 2, &(val)->controlFieldOctets))
  1427. return 0;
  1428. if (!ASN1PERDecU32Val(dec, 2, &l))
  1429. return 0;
  1430. l += 1;
  1431. ASN1PERDecAlignment(dec);
  1432. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->sendBufferSize))
  1433. return 0;
  1434. return 1;
  1435. }
  1436. static int ASN1CALL ASN1Enc_SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers(ASN1encoding_t enc, SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers *val)
  1437. {
  1438. ASN1uint32_t i;
  1439. ASN1PEREncAlignment(enc);
  1440. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  1441. return 0;
  1442. for (i = 0; i < (val)->count; i++) {
  1443. ASN1PEREncAlignment(enc);
  1444. if (!ASN1PEREncBitVal(enc, 8, ((val)->value)[i]))
  1445. return 0;
  1446. }
  1447. return 1;
  1448. }
  1449. static int ASN1CALL ASN1Dec_SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers(ASN1decoding_t dec, SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers *val)
  1450. {
  1451. ASN1uint32_t i;
  1452. ASN1PERDecAlignment(dec);
  1453. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  1454. return 0;
  1455. (val)->count += 1;
  1456. for (i = 0; i < (val)->count; i++) {
  1457. ASN1PERDecAlignment(dec);
  1458. if (!ASN1PERDecU16Val(dec, 8, &((val)->value)[i]))
  1459. return 0;
  1460. }
  1461. return 1;
  1462. }
  1463. static void ASN1CALL ASN1Free_SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers(SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers *val)
  1464. {
  1465. if (val) {
  1466. }
  1467. }
  1468. static int ASN1CALL ASN1Enc_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers(ASN1encoding_t enc, PSendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers *val)
  1469. {
  1470. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers_ElmFn, 1, 65535, 16);
  1471. }
  1472. static int ASN1CALL ASN1Enc_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers_ElmFn(ASN1encoding_t enc, PSendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers val)
  1473. {
  1474. if (!ASN1PEREncUnsignedShort(enc, val->value - 1))
  1475. return 0;
  1476. return 1;
  1477. }
  1478. static int ASN1CALL ASN1Dec_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers(ASN1decoding_t dec, PSendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers *val)
  1479. {
  1480. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers_ElmFn, sizeof(**val), 1, 65535, 16);
  1481. }
  1482. static int ASN1CALL ASN1Dec_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers_ElmFn(ASN1decoding_t dec, PSendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers val)
  1483. {
  1484. if (!ASN1PERDecUnsignedShort(dec, &val->value))
  1485. return 0;
  1486. val->value += 1;
  1487. return 1;
  1488. }
  1489. static void ASN1CALL ASN1Free_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers(PSendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers *val)
  1490. {
  1491. if (val) {
  1492. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers_ElmFn);
  1493. }
  1494. }
  1495. static void ASN1CALL ASN1Free_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers_ElmFn(PSendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers val)
  1496. {
  1497. if (val) {
  1498. }
  1499. }
  1500. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type_progressiveRefinementStart(ASN1encoding_t enc, MiscellaneousCommand_type_progressiveRefinementStart *val)
  1501. {
  1502. if (!ASN1PEREncExtensionBitClear(enc))
  1503. return 0;
  1504. if (!ASN1Enc_MiscellaneousCommand_type_progressiveRefinementStart_repeatCount(enc, &(val)->repeatCount))
  1505. return 0;
  1506. return 1;
  1507. }
  1508. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type_progressiveRefinementStart(ASN1decoding_t dec, MiscellaneousCommand_type_progressiveRefinementStart *val)
  1509. {
  1510. ASN1uint32_t y;
  1511. if (!ASN1PERDecExtensionBit(dec, &y))
  1512. return 0;
  1513. if (!ASN1Dec_MiscellaneousCommand_type_progressiveRefinementStart_repeatCount(dec, &(val)->repeatCount))
  1514. return 0;
  1515. if (y) {
  1516. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1517. return 0;
  1518. }
  1519. return 1;
  1520. }
  1521. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type_videoFastUpdateMB(ASN1encoding_t enc, MiscellaneousCommand_type_videoFastUpdateMB *val)
  1522. {
  1523. if (!ASN1PEREncExtensionBitClear(enc))
  1524. return 0;
  1525. if (!ASN1PEREncBits(enc, 2, (val)->o))
  1526. return 0;
  1527. if ((val)->o[0] & 0x80) {
  1528. ASN1PEREncAlignment(enc);
  1529. if (!ASN1PEREncBitVal(enc, 8, (val)->firstGOB))
  1530. return 0;
  1531. }
  1532. if ((val)->o[0] & 0x40) {
  1533. if (!ASN1PEREncUnsignedShort(enc, (val)->firstMB - 1))
  1534. return 0;
  1535. }
  1536. if (!ASN1PEREncUnsignedShort(enc, (val)->numberOfMBs - 1))
  1537. return 0;
  1538. return 1;
  1539. }
  1540. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type_videoFastUpdateMB(ASN1decoding_t dec, MiscellaneousCommand_type_videoFastUpdateMB *val)
  1541. {
  1542. ASN1uint32_t y;
  1543. if (!ASN1PERDecExtensionBit(dec, &y))
  1544. return 0;
  1545. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  1546. return 0;
  1547. if ((val)->o[0] & 0x80) {
  1548. ASN1PERDecAlignment(dec);
  1549. if (!ASN1PERDecU16Val(dec, 8, &(val)->firstGOB))
  1550. return 0;
  1551. }
  1552. if ((val)->o[0] & 0x40) {
  1553. if (!ASN1PERDecUnsignedShort(dec, &(val)->firstMB))
  1554. return 0;
  1555. (val)->firstMB += 1;
  1556. }
  1557. if (!ASN1PERDecUnsignedShort(dec, &(val)->numberOfMBs))
  1558. return 0;
  1559. (val)->numberOfMBs += 1;
  1560. if (y) {
  1561. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1562. return 0;
  1563. }
  1564. return 1;
  1565. }
  1566. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type_videoFastUpdateGOB(ASN1encoding_t enc, MiscellaneousCommand_type_videoFastUpdateGOB *val)
  1567. {
  1568. if (!ASN1PEREncBitVal(enc, 5, (val)->firstGOB))
  1569. return 0;
  1570. if (!ASN1PEREncBitVal(enc, 5, (val)->numberOfGOBs - 1))
  1571. return 0;
  1572. return 1;
  1573. }
  1574. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type_videoFastUpdateGOB(ASN1decoding_t dec, MiscellaneousCommand_type_videoFastUpdateGOB *val)
  1575. {
  1576. if (!ASN1PERDecU16Val(dec, 5, &(val)->firstGOB))
  1577. return 0;
  1578. if (!ASN1PERDecU16Val(dec, 5, &(val)->numberOfGOBs))
  1579. return 0;
  1580. (val)->numberOfGOBs += 1;
  1581. return 1;
  1582. }
  1583. static int ASN1CALL ASN1Enc_MiscellaneousIndication_type_videoNotDecodedMBs(ASN1encoding_t enc, MiscellaneousIndication_type_videoNotDecodedMBs *val)
  1584. {
  1585. if (!ASN1PEREncExtensionBitClear(enc))
  1586. return 0;
  1587. if (!ASN1PEREncUnsignedShort(enc, (val)->firstMB - 1))
  1588. return 0;
  1589. if (!ASN1PEREncUnsignedShort(enc, (val)->numberOfMBs - 1))
  1590. return 0;
  1591. ASN1PEREncAlignment(enc);
  1592. if (!ASN1PEREncBitVal(enc, 8, (val)->temporalReference))
  1593. return 0;
  1594. return 1;
  1595. }
  1596. static int ASN1CALL ASN1Dec_MiscellaneousIndication_type_videoNotDecodedMBs(ASN1decoding_t dec, MiscellaneousIndication_type_videoNotDecodedMBs *val)
  1597. {
  1598. ASN1uint32_t y;
  1599. if (!ASN1PERDecExtensionBit(dec, &y))
  1600. return 0;
  1601. if (!ASN1PERDecUnsignedShort(dec, &(val)->firstMB))
  1602. return 0;
  1603. (val)->firstMB += 1;
  1604. if (!ASN1PERDecUnsignedShort(dec, &(val)->numberOfMBs))
  1605. return 0;
  1606. (val)->numberOfMBs += 1;
  1607. ASN1PERDecAlignment(dec);
  1608. if (!ASN1PERDecU16Val(dec, 8, &(val)->temporalReference))
  1609. return 0;
  1610. if (y) {
  1611. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1612. return 0;
  1613. }
  1614. return 1;
  1615. }
  1616. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal_aal5(ASN1encoding_t enc, NewATMVCIndication_aal_aal5 *val)
  1617. {
  1618. if (!ASN1PEREncExtensionBitClear(enc))
  1619. return 0;
  1620. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardMaximumSDUSize))
  1621. return 0;
  1622. if (!ASN1PEREncUnsignedShort(enc, (val)->backwardMaximumSDUSize))
  1623. return 0;
  1624. return 1;
  1625. }
  1626. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal_aal5(ASN1decoding_t dec, NewATMVCIndication_aal_aal5 *val)
  1627. {
  1628. ASN1uint32_t y;
  1629. if (!ASN1PERDecExtensionBit(dec, &y))
  1630. return 0;
  1631. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardMaximumSDUSize))
  1632. return 0;
  1633. if (!ASN1PERDecUnsignedShort(dec, &(val)->backwardMaximumSDUSize))
  1634. return 0;
  1635. if (y) {
  1636. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1637. return 0;
  1638. }
  1639. return 1;
  1640. }
  1641. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal_aal1(ASN1encoding_t enc, NewATMVCIndication_aal_aal1 *val)
  1642. {
  1643. if (!ASN1PEREncExtensionBitClear(enc))
  1644. return 0;
  1645. if (!ASN1Enc_NewATMVCIndication_aal_aal1_clockRecovery(enc, &(val)->clockRecovery))
  1646. return 0;
  1647. if (!ASN1Enc_NewATMVCIndication_aal_aal1_errorCorrection(enc, &(val)->errorCorrection))
  1648. return 0;
  1649. if (!ASN1PEREncBoolean(enc, (val)->structuredDataTransfer))
  1650. return 0;
  1651. if (!ASN1PEREncBoolean(enc, (val)->partiallyFilledCells))
  1652. return 0;
  1653. return 1;
  1654. }
  1655. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal_aal1(ASN1decoding_t dec, NewATMVCIndication_aal_aal1 *val)
  1656. {
  1657. ASN1uint32_t y;
  1658. if (!ASN1PERDecExtensionBit(dec, &y))
  1659. return 0;
  1660. if (!ASN1Dec_NewATMVCIndication_aal_aal1_clockRecovery(dec, &(val)->clockRecovery))
  1661. return 0;
  1662. if (!ASN1Dec_NewATMVCIndication_aal_aal1_errorCorrection(dec, &(val)->errorCorrection))
  1663. return 0;
  1664. if (!ASN1PERDecBoolean(dec, &(val)->structuredDataTransfer))
  1665. return 0;
  1666. if (!ASN1PERDecBoolean(dec, &(val)->partiallyFilledCells))
  1667. return 0;
  1668. if (y) {
  1669. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1670. return 0;
  1671. }
  1672. return 1;
  1673. }
  1674. static int ASN1CALL ASN1Enc_NewATMVCIndication_reverseParameters_multiplex(ASN1encoding_t enc, NewATMVCIndication_reverseParameters_multiplex *val)
  1675. {
  1676. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  1677. return 0;
  1678. return 1;
  1679. }
  1680. static int ASN1CALL ASN1Dec_NewATMVCIndication_reverseParameters_multiplex(ASN1decoding_t dec, NewATMVCIndication_reverseParameters_multiplex *val)
  1681. {
  1682. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  1683. return 0;
  1684. return 1;
  1685. }
  1686. static int ASN1CALL ASN1Enc_UserInputIndication_signal_rtp(ASN1encoding_t enc, UserInputIndication_signal_rtp *val)
  1687. {
  1688. ASN1uint32_t l;
  1689. if (!ASN1PEREncExtensionBitClear(enc))
  1690. return 0;
  1691. if (!ASN1PEREncBits(enc, 2, (val)->o))
  1692. return 0;
  1693. if ((val)->o[0] & 0x80) {
  1694. l = ASN1uint32_uoctets((val)->timestamp);
  1695. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  1696. return 0;
  1697. ASN1PEREncAlignment(enc);
  1698. if (!ASN1PEREncBitVal(enc, l * 8, (val)->timestamp))
  1699. return 0;
  1700. }
  1701. if ((val)->o[0] & 0x40) {
  1702. l = ASN1uint32_uoctets((val)->expirationTime);
  1703. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  1704. return 0;
  1705. ASN1PEREncAlignment(enc);
  1706. if (!ASN1PEREncBitVal(enc, l * 8, (val)->expirationTime))
  1707. return 0;
  1708. }
  1709. if (!ASN1PEREncUnsignedShort(enc, (val)->logicalChannelNumber - 1))
  1710. return 0;
  1711. return 1;
  1712. }
  1713. static int ASN1CALL ASN1Dec_UserInputIndication_signal_rtp(ASN1decoding_t dec, UserInputIndication_signal_rtp *val)
  1714. {
  1715. ASN1uint32_t y;
  1716. ASN1uint32_t l;
  1717. if (!ASN1PERDecExtensionBit(dec, &y))
  1718. return 0;
  1719. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  1720. return 0;
  1721. if ((val)->o[0] & 0x80) {
  1722. if (!ASN1PERDecU32Val(dec, 2, &l))
  1723. return 0;
  1724. l += 1;
  1725. ASN1PERDecAlignment(dec);
  1726. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->timestamp))
  1727. return 0;
  1728. }
  1729. if ((val)->o[0] & 0x40) {
  1730. if (!ASN1PERDecU32Val(dec, 2, &l))
  1731. return 0;
  1732. l += 1;
  1733. ASN1PERDecAlignment(dec);
  1734. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->expirationTime))
  1735. return 0;
  1736. }
  1737. if (!ASN1PERDecUnsignedShort(dec, &(val)->logicalChannelNumber))
  1738. return 0;
  1739. (val)->logicalChannelNumber += 1;
  1740. if (y) {
  1741. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1742. return 0;
  1743. }
  1744. return 1;
  1745. }
  1746. static int ASN1CALL ASN1Enc_UserInputIndication_signalUpdate_rtp(ASN1encoding_t enc, UserInputIndication_signalUpdate_rtp *val)
  1747. {
  1748. if (!ASN1PEREncExtensionBitClear(enc))
  1749. return 0;
  1750. if (!ASN1PEREncUnsignedShort(enc, (val)->logicalChannelNumber - 1))
  1751. return 0;
  1752. return 1;
  1753. }
  1754. static int ASN1CALL ASN1Dec_UserInputIndication_signalUpdate_rtp(ASN1decoding_t dec, UserInputIndication_signalUpdate_rtp *val)
  1755. {
  1756. ASN1uint32_t y;
  1757. if (!ASN1PERDecExtensionBit(dec, &y))
  1758. return 0;
  1759. if (!ASN1PERDecUnsignedShort(dec, &(val)->logicalChannelNumber))
  1760. return 0;
  1761. (val)->logicalChannelNumber += 1;
  1762. if (y) {
  1763. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1764. return 0;
  1765. }
  1766. return 1;
  1767. }
  1768. static int ASN1CALL ASN1Enc_UserInputIndication_signalUpdate(ASN1encoding_t enc, UserInputIndication_signalUpdate *val)
  1769. {
  1770. if (!ASN1PEREncExtensionBitClear(enc))
  1771. return 0;
  1772. if (!ASN1PEREncBits(enc, 1, (val)->o))
  1773. return 0;
  1774. if (!ASN1PEREncUnsignedShort(enc, (val)->duration - 1))
  1775. return 0;
  1776. if ((val)->o[0] & 0x80) {
  1777. if (!ASN1Enc_UserInputIndication_signalUpdate_rtp(enc, &(val)->rtp))
  1778. return 0;
  1779. }
  1780. return 1;
  1781. }
  1782. static int ASN1CALL ASN1Dec_UserInputIndication_signalUpdate(ASN1decoding_t dec, UserInputIndication_signalUpdate *val)
  1783. {
  1784. ASN1uint32_t y;
  1785. if (!ASN1PERDecExtensionBit(dec, &y))
  1786. return 0;
  1787. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  1788. return 0;
  1789. if (!ASN1PERDecUnsignedShort(dec, &(val)->duration))
  1790. return 0;
  1791. (val)->duration += 1;
  1792. if ((val)->o[0] & 0x80) {
  1793. if (!ASN1Dec_UserInputIndication_signalUpdate_rtp(dec, &(val)->rtp))
  1794. return 0;
  1795. }
  1796. if (y) {
  1797. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1798. return 0;
  1799. }
  1800. return 1;
  1801. }
  1802. static int ASN1CALL ASN1Enc_UserInputIndication_signal(ASN1encoding_t enc, UserInputIndication_signal *val)
  1803. {
  1804. ASN1uint32_t t;
  1805. if (!ASN1PEREncExtensionBitClear(enc))
  1806. return 0;
  1807. if (!ASN1PEREncBits(enc, 2, (val)->o))
  1808. return 0;
  1809. t = lstrlenA((val)->signalType);
  1810. if (!ASN1PEREncCharString(enc, t, (val)->signalType, 8))
  1811. return 0;
  1812. if ((val)->o[0] & 0x80) {
  1813. if (!ASN1PEREncUnsignedShort(enc, (val)->duration - 1))
  1814. return 0;
  1815. }
  1816. if ((val)->o[0] & 0x40) {
  1817. if (!ASN1Enc_UserInputIndication_signal_rtp(enc, &(val)->rtp))
  1818. return 0;
  1819. }
  1820. return 1;
  1821. }
  1822. static int ASN1CALL ASN1Dec_UserInputIndication_signal(ASN1decoding_t dec, UserInputIndication_signal *val)
  1823. {
  1824. ASN1uint32_t y;
  1825. if (!ASN1PERDecExtensionBit(dec, &y))
  1826. return 0;
  1827. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  1828. return 0;
  1829. if (!ASN1PERDecZeroCharStringNoAlloc(dec, 1, (val)->signalType, 8))
  1830. return 0;
  1831. if ((val)->o[0] & 0x80) {
  1832. if (!ASN1PERDecUnsignedShort(dec, &(val)->duration))
  1833. return 0;
  1834. (val)->duration += 1;
  1835. }
  1836. if ((val)->o[0] & 0x40) {
  1837. if (!ASN1Dec_UserInputIndication_signal_rtp(dec, &(val)->rtp))
  1838. return 0;
  1839. }
  1840. if (y) {
  1841. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1842. return 0;
  1843. }
  1844. return 1;
  1845. }
  1846. static void ASN1CALL ASN1Free_UserInputIndication_signal(UserInputIndication_signal *val)
  1847. {
  1848. if (val) {
  1849. }
  1850. }
  1851. static int ASN1CALL ASN1Enc_NewATMVCIndication_reverseParameters(ASN1encoding_t enc, NewATMVCIndication_reverseParameters *val)
  1852. {
  1853. if (!ASN1PEREncExtensionBitClear(enc))
  1854. return 0;
  1855. if (!ASN1PEREncUnsignedShort(enc, (val)->bitRate - 1))
  1856. return 0;
  1857. if (!ASN1PEREncBoolean(enc, (val)->bitRateLockedToPCRClock))
  1858. return 0;
  1859. if (!ASN1PEREncBoolean(enc, (val)->bitRateLockedToNetworkClock))
  1860. return 0;
  1861. if (!ASN1Enc_NewATMVCIndication_reverseParameters_multiplex(enc, &(val)->multiplex))
  1862. return 0;
  1863. return 1;
  1864. }
  1865. static int ASN1CALL ASN1Dec_NewATMVCIndication_reverseParameters(ASN1decoding_t dec, NewATMVCIndication_reverseParameters *val)
  1866. {
  1867. ASN1uint32_t y;
  1868. if (!ASN1PERDecExtensionBit(dec, &y))
  1869. return 0;
  1870. if (!ASN1PERDecUnsignedShort(dec, &(val)->bitRate))
  1871. return 0;
  1872. (val)->bitRate += 1;
  1873. if (!ASN1PERDecBoolean(dec, &(val)->bitRateLockedToPCRClock))
  1874. return 0;
  1875. if (!ASN1PERDecBoolean(dec, &(val)->bitRateLockedToNetworkClock))
  1876. return 0;
  1877. if (!ASN1Dec_NewATMVCIndication_reverseParameters_multiplex(dec, &(val)->multiplex))
  1878. return 0;
  1879. if (y) {
  1880. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1881. return 0;
  1882. }
  1883. return 1;
  1884. }
  1885. static int ASN1CALL ASN1Enc_NewATMVCIndication_multiplex(ASN1encoding_t enc, NewATMVCIndication_multiplex *val)
  1886. {
  1887. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  1888. return 0;
  1889. return 1;
  1890. }
  1891. static int ASN1CALL ASN1Dec_NewATMVCIndication_multiplex(ASN1decoding_t dec, NewATMVCIndication_multiplex *val)
  1892. {
  1893. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  1894. return 0;
  1895. return 1;
  1896. }
  1897. static int ASN1CALL ASN1Enc_NewATMVCIndication_aal(ASN1encoding_t enc, NewATMVCIndication_aal *val)
  1898. {
  1899. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  1900. return 0;
  1901. switch ((val)->choice) {
  1902. case 1:
  1903. if (!ASN1Enc_NewATMVCIndication_aal_aal1(enc, &(val)->u.aal1))
  1904. return 0;
  1905. break;
  1906. case 2:
  1907. if (!ASN1Enc_NewATMVCIndication_aal_aal5(enc, &(val)->u.aal5))
  1908. return 0;
  1909. break;
  1910. default:
  1911. /* impossible */
  1912. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1913. return 0;
  1914. }
  1915. return 1;
  1916. }
  1917. static int ASN1CALL ASN1Dec_NewATMVCIndication_aal(ASN1decoding_t dec, NewATMVCIndication_aal *val)
  1918. {
  1919. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  1920. return 0;
  1921. switch ((val)->choice) {
  1922. case 1:
  1923. if (!ASN1Dec_NewATMVCIndication_aal_aal1(dec, &(val)->u.aal1))
  1924. return 0;
  1925. break;
  1926. case 2:
  1927. if (!ASN1Dec_NewATMVCIndication_aal_aal5(dec, &(val)->u.aal5))
  1928. return 0;
  1929. break;
  1930. case 0:
  1931. /* extension case */
  1932. if (!ASN1PERDecSkipFragmented(dec, 8))
  1933. return 0;
  1934. break;
  1935. default:
  1936. /* impossible */
  1937. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1938. return 0;
  1939. }
  1940. return 1;
  1941. }
  1942. static int ASN1CALL ASN1Enc_JitterIndication_scope(ASN1encoding_t enc, JitterIndication_scope *val)
  1943. {
  1944. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  1945. return 0;
  1946. switch ((val)->choice) {
  1947. case 1:
  1948. if (!ASN1PEREncUnsignedShort(enc, (val)->u.logicalChannelNumber - 1))
  1949. return 0;
  1950. break;
  1951. case 2:
  1952. if (!ASN1PEREncUnsignedShort(enc, (val)->u.resourceID))
  1953. return 0;
  1954. break;
  1955. case 3:
  1956. break;
  1957. default:
  1958. /* impossible */
  1959. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1960. return 0;
  1961. }
  1962. return 1;
  1963. }
  1964. static int ASN1CALL ASN1Dec_JitterIndication_scope(ASN1decoding_t dec, JitterIndication_scope *val)
  1965. {
  1966. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  1967. return 0;
  1968. switch ((val)->choice) {
  1969. case 1:
  1970. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.logicalChannelNumber))
  1971. return 0;
  1972. (val)->u.logicalChannelNumber += 1;
  1973. break;
  1974. case 2:
  1975. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.resourceID))
  1976. return 0;
  1977. break;
  1978. case 3:
  1979. break;
  1980. default:
  1981. /* impossible */
  1982. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1983. return 0;
  1984. }
  1985. return 1;
  1986. }
  1987. static int ASN1CALL ASN1Enc_FunctionNotSupported_cause(ASN1encoding_t enc, FunctionNotSupported_cause *val)
  1988. {
  1989. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  1990. return 0;
  1991. return 1;
  1992. }
  1993. static int ASN1CALL ASN1Dec_FunctionNotSupported_cause(ASN1decoding_t dec, FunctionNotSupported_cause *val)
  1994. {
  1995. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  1996. return 0;
  1997. return 1;
  1998. }
  1999. static int ASN1CALL ASN1Enc_H223MultiplexReconfiguration_h223AnnexADoubleFlag(ASN1encoding_t enc, H223MultiplexReconfiguration_h223AnnexADoubleFlag *val)
  2000. {
  2001. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  2002. return 0;
  2003. return 1;
  2004. }
  2005. static int ASN1CALL ASN1Dec_H223MultiplexReconfiguration_h223AnnexADoubleFlag(ASN1decoding_t dec, H223MultiplexReconfiguration_h223AnnexADoubleFlag *val)
  2006. {
  2007. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  2008. return 0;
  2009. return 1;
  2010. }
  2011. static int ASN1CALL ASN1Enc_H223MultiplexReconfiguration_h223ModeChange(ASN1encoding_t enc, H223MultiplexReconfiguration_h223ModeChange *val)
  2012. {
  2013. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2014. return 0;
  2015. return 1;
  2016. }
  2017. static int ASN1CALL ASN1Dec_H223MultiplexReconfiguration_h223ModeChange(ASN1decoding_t dec, H223MultiplexReconfiguration_h223ModeChange *val)
  2018. {
  2019. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2020. return 0;
  2021. return 1;
  2022. }
  2023. static int ASN1CALL ASN1Enc_EndSessionCommand_isdnOptions(ASN1encoding_t enc, EndSessionCommand_isdnOptions *val)
  2024. {
  2025. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2026. return 0;
  2027. return 1;
  2028. }
  2029. static int ASN1CALL ASN1Dec_EndSessionCommand_isdnOptions(ASN1decoding_t dec, EndSessionCommand_isdnOptions *val)
  2030. {
  2031. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2032. return 0;
  2033. return 1;
  2034. }
  2035. static int ASN1CALL ASN1Enc_EndSessionCommand_gstnOptions(ASN1encoding_t enc, EndSessionCommand_gstnOptions *val)
  2036. {
  2037. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  2038. return 0;
  2039. return 1;
  2040. }
  2041. static int ASN1CALL ASN1Dec_EndSessionCommand_gstnOptions(ASN1decoding_t dec, EndSessionCommand_gstnOptions *val)
  2042. {
  2043. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  2044. return 0;
  2045. return 1;
  2046. }
  2047. static int ASN1CALL ASN1Enc_FlowControlCommand_restriction(ASN1encoding_t enc, FlowControlCommand_restriction *val)
  2048. {
  2049. ASN1uint32_t l;
  2050. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2051. return 0;
  2052. switch ((val)->choice) {
  2053. case 1:
  2054. l = ASN1uint32_uoctets((val)->u.maximumBitRate);
  2055. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  2056. return 0;
  2057. ASN1PEREncAlignment(enc);
  2058. if (!ASN1PEREncBitVal(enc, l * 8, (val)->u.maximumBitRate))
  2059. return 0;
  2060. break;
  2061. case 2:
  2062. break;
  2063. default:
  2064. /* impossible */
  2065. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2066. return 0;
  2067. }
  2068. return 1;
  2069. }
  2070. static int ASN1CALL ASN1Dec_FlowControlCommand_restriction(ASN1decoding_t dec, FlowControlCommand_restriction *val)
  2071. {
  2072. ASN1uint32_t l;
  2073. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2074. return 0;
  2075. switch ((val)->choice) {
  2076. case 1:
  2077. if (!ASN1PERDecU32Val(dec, 2, &l))
  2078. return 0;
  2079. l += 1;
  2080. ASN1PERDecAlignment(dec);
  2081. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->u.maximumBitRate))
  2082. return 0;
  2083. break;
  2084. case 2:
  2085. break;
  2086. default:
  2087. /* impossible */
  2088. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2089. return 0;
  2090. }
  2091. return 1;
  2092. }
  2093. static int ASN1CALL ASN1Enc_FlowControlCommand_scope(ASN1encoding_t enc, FlowControlCommand_scope *val)
  2094. {
  2095. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  2096. return 0;
  2097. switch ((val)->choice) {
  2098. case 1:
  2099. if (!ASN1PEREncUnsignedShort(enc, (val)->u.logicalChannelNumber - 1))
  2100. return 0;
  2101. break;
  2102. case 2:
  2103. if (!ASN1PEREncUnsignedShort(enc, (val)->u.resourceID))
  2104. return 0;
  2105. break;
  2106. case 3:
  2107. break;
  2108. default:
  2109. /* impossible */
  2110. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2111. return 0;
  2112. }
  2113. return 1;
  2114. }
  2115. static int ASN1CALL ASN1Dec_FlowControlCommand_scope(ASN1decoding_t dec, FlowControlCommand_scope *val)
  2116. {
  2117. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  2118. return 0;
  2119. switch ((val)->choice) {
  2120. case 1:
  2121. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.logicalChannelNumber))
  2122. return 0;
  2123. (val)->u.logicalChannelNumber += 1;
  2124. break;
  2125. case 2:
  2126. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.resourceID))
  2127. return 0;
  2128. break;
  2129. case 3:
  2130. break;
  2131. default:
  2132. /* impossible */
  2133. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2134. return 0;
  2135. }
  2136. return 1;
  2137. }
  2138. static int ASN1CALL ASN1Enc_SendTerminalCapabilitySet_specificRequest(ASN1encoding_t enc, SendTerminalCapabilitySet_specificRequest *val)
  2139. {
  2140. if (!ASN1PEREncExtensionBitClear(enc))
  2141. return 0;
  2142. if (!ASN1PEREncBits(enc, 2, (val)->o))
  2143. return 0;
  2144. if (!ASN1PEREncBoolean(enc, (val)->multiplexCapability))
  2145. return 0;
  2146. if ((val)->o[0] & 0x80) {
  2147. if (!ASN1Enc_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers(enc, &(val)->capabilityTableEntryNumbers))
  2148. return 0;
  2149. }
  2150. if ((val)->o[0] & 0x40) {
  2151. if (!ASN1Enc_SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers(enc, &(val)->capabilityDescriptorNumbers))
  2152. return 0;
  2153. }
  2154. return 1;
  2155. }
  2156. static int ASN1CALL ASN1Dec_SendTerminalCapabilitySet_specificRequest(ASN1decoding_t dec, SendTerminalCapabilitySet_specificRequest *val)
  2157. {
  2158. ASN1uint32_t y;
  2159. if (!ASN1PERDecExtensionBit(dec, &y))
  2160. return 0;
  2161. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  2162. return 0;
  2163. if (!ASN1PERDecBoolean(dec, &(val)->multiplexCapability))
  2164. return 0;
  2165. if ((val)->o[0] & 0x80) {
  2166. if (!ASN1Dec_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers(dec, &(val)->capabilityTableEntryNumbers))
  2167. return 0;
  2168. }
  2169. if ((val)->o[0] & 0x40) {
  2170. if (!ASN1Dec_SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers(dec, &(val)->capabilityDescriptorNumbers))
  2171. return 0;
  2172. }
  2173. if (y) {
  2174. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2175. return 0;
  2176. }
  2177. return 1;
  2178. }
  2179. static void ASN1CALL ASN1Free_SendTerminalCapabilitySet_specificRequest(SendTerminalCapabilitySet_specificRequest *val)
  2180. {
  2181. if (val) {
  2182. if ((val)->o[0] & 0x80) {
  2183. ASN1Free_SendTerminalCapabilitySet_specificRequest_capabilityTableEntryNumbers(&(val)->capabilityTableEntryNumbers);
  2184. }
  2185. if ((val)->o[0] & 0x40) {
  2186. ASN1Free_SendTerminalCapabilitySet_specificRequest_capabilityDescriptorNumbers(&(val)->capabilityDescriptorNumbers);
  2187. }
  2188. }
  2189. }
  2190. static int ASN1CALL ASN1Enc_RemoteMCResponse_reject(ASN1encoding_t enc, RemoteMCResponse_reject *val)
  2191. {
  2192. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  2193. return 0;
  2194. return 1;
  2195. }
  2196. static int ASN1CALL ASN1Dec_RemoteMCResponse_reject(ASN1decoding_t dec, RemoteMCResponse_reject *val)
  2197. {
  2198. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  2199. return 0;
  2200. return 1;
  2201. }
  2202. static int ASN1CALL ASN1Enc_ConferenceResponse_sendThisSourceResponse(ASN1encoding_t enc, ConferenceResponse_sendThisSourceResponse *val)
  2203. {
  2204. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  2205. return 0;
  2206. return 1;
  2207. }
  2208. static int ASN1CALL ASN1Dec_ConferenceResponse_sendThisSourceResponse(ASN1decoding_t dec, ConferenceResponse_sendThisSourceResponse *val)
  2209. {
  2210. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  2211. return 0;
  2212. return 1;
  2213. }
  2214. static int ASN1CALL ASN1Enc_ConferenceResponse_makeTerminalBroadcasterResponse(ASN1encoding_t enc, ConferenceResponse_makeTerminalBroadcasterResponse *val)
  2215. {
  2216. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  2217. return 0;
  2218. return 1;
  2219. }
  2220. static int ASN1CALL ASN1Dec_ConferenceResponse_makeTerminalBroadcasterResponse(ASN1decoding_t dec, ConferenceResponse_makeTerminalBroadcasterResponse *val)
  2221. {
  2222. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  2223. return 0;
  2224. return 1;
  2225. }
  2226. static int ASN1CALL ASN1Enc_ConferenceResponse_broadcastMyLogicalChannelResponse(ASN1encoding_t enc, ConferenceResponse_broadcastMyLogicalChannelResponse *val)
  2227. {
  2228. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  2229. return 0;
  2230. return 1;
  2231. }
  2232. static int ASN1CALL ASN1Dec_ConferenceResponse_broadcastMyLogicalChannelResponse(ASN1decoding_t dec, ConferenceResponse_broadcastMyLogicalChannelResponse *val)
  2233. {
  2234. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  2235. return 0;
  2236. return 1;
  2237. }
  2238. static int ASN1CALL ASN1Enc_ConferenceResponse_extensionAddressResponse(ASN1encoding_t enc, ConferenceResponse_extensionAddressResponse *val)
  2239. {
  2240. if (!ASN1PEREncExtensionBitClear(enc))
  2241. return 0;
  2242. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->extensionAddress, 1, 128, 7))
  2243. return 0;
  2244. return 1;
  2245. }
  2246. static int ASN1CALL ASN1Dec_ConferenceResponse_extensionAddressResponse(ASN1decoding_t dec, ConferenceResponse_extensionAddressResponse *val)
  2247. {
  2248. ASN1uint32_t y;
  2249. if (!ASN1PERDecExtensionBit(dec, &y))
  2250. return 0;
  2251. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->extensionAddress, 1, 128, 7))
  2252. return 0;
  2253. if (y) {
  2254. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2255. return 0;
  2256. }
  2257. return 1;
  2258. }
  2259. static void ASN1CALL ASN1Free_ConferenceResponse_extensionAddressResponse(ConferenceResponse_extensionAddressResponse *val)
  2260. {
  2261. if (val) {
  2262. }
  2263. }
  2264. static int ASN1CALL ASN1Enc_ConferenceResponse_makeMeChairResponse(ASN1encoding_t enc, ConferenceResponse_makeMeChairResponse *val)
  2265. {
  2266. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  2267. return 0;
  2268. return 1;
  2269. }
  2270. static int ASN1CALL ASN1Dec_ConferenceResponse_makeMeChairResponse(ASN1decoding_t dec, ConferenceResponse_makeMeChairResponse *val)
  2271. {
  2272. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  2273. return 0;
  2274. return 1;
  2275. }
  2276. static int ASN1CALL ASN1Enc_MaintenanceLoopReject_cause(ASN1encoding_t enc, MaintenanceLoopReject_cause *val)
  2277. {
  2278. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 0))
  2279. return 0;
  2280. return 1;
  2281. }
  2282. static int ASN1CALL ASN1Dec_MaintenanceLoopReject_cause(ASN1decoding_t dec, MaintenanceLoopReject_cause *val)
  2283. {
  2284. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 0))
  2285. return 0;
  2286. return 1;
  2287. }
  2288. static int ASN1CALL ASN1Enc_MaintenanceLoopReject_type(ASN1encoding_t enc, MaintenanceLoopReject_type *val)
  2289. {
  2290. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2291. return 0;
  2292. switch ((val)->choice) {
  2293. case 1:
  2294. break;
  2295. case 2:
  2296. if (!ASN1PEREncUnsignedShort(enc, (val)->u.mediaLoop - 1))
  2297. return 0;
  2298. break;
  2299. case 3:
  2300. if (!ASN1PEREncUnsignedShort(enc, (val)->u.logicalChannelLoop - 1))
  2301. return 0;
  2302. break;
  2303. default:
  2304. /* impossible */
  2305. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2306. return 0;
  2307. }
  2308. return 1;
  2309. }
  2310. static int ASN1CALL ASN1Dec_MaintenanceLoopReject_type(ASN1decoding_t dec, MaintenanceLoopReject_type *val)
  2311. {
  2312. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2313. return 0;
  2314. switch ((val)->choice) {
  2315. case 1:
  2316. break;
  2317. case 2:
  2318. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.mediaLoop))
  2319. return 0;
  2320. (val)->u.mediaLoop += 1;
  2321. break;
  2322. case 3:
  2323. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.logicalChannelLoop))
  2324. return 0;
  2325. (val)->u.logicalChannelLoop += 1;
  2326. break;
  2327. case 0:
  2328. /* extension case */
  2329. if (!ASN1PERDecSkipFragmented(dec, 8))
  2330. return 0;
  2331. break;
  2332. default:
  2333. /* impossible */
  2334. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2335. return 0;
  2336. }
  2337. return 1;
  2338. }
  2339. static int ASN1CALL ASN1Enc_MaintenanceLoopAck_type(ASN1encoding_t enc, MaintenanceLoopAck_type *val)
  2340. {
  2341. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2342. return 0;
  2343. switch ((val)->choice) {
  2344. case 1:
  2345. break;
  2346. case 2:
  2347. if (!ASN1PEREncUnsignedShort(enc, (val)->u.mediaLoop - 1))
  2348. return 0;
  2349. break;
  2350. case 3:
  2351. if (!ASN1PEREncUnsignedShort(enc, (val)->u.logicalChannelLoop - 1))
  2352. return 0;
  2353. break;
  2354. default:
  2355. /* impossible */
  2356. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2357. return 0;
  2358. }
  2359. return 1;
  2360. }
  2361. static int ASN1CALL ASN1Dec_MaintenanceLoopAck_type(ASN1decoding_t dec, MaintenanceLoopAck_type *val)
  2362. {
  2363. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2364. return 0;
  2365. switch ((val)->choice) {
  2366. case 1:
  2367. break;
  2368. case 2:
  2369. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.mediaLoop))
  2370. return 0;
  2371. (val)->u.mediaLoop += 1;
  2372. break;
  2373. case 3:
  2374. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.logicalChannelLoop))
  2375. return 0;
  2376. (val)->u.logicalChannelLoop += 1;
  2377. break;
  2378. case 0:
  2379. /* extension case */
  2380. if (!ASN1PERDecSkipFragmented(dec, 8))
  2381. return 0;
  2382. break;
  2383. default:
  2384. /* impossible */
  2385. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2386. return 0;
  2387. }
  2388. return 1;
  2389. }
  2390. static int ASN1CALL ASN1Enc_MaintenanceLoopRequest_type(ASN1encoding_t enc, MaintenanceLoopRequest_type *val)
  2391. {
  2392. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2393. return 0;
  2394. switch ((val)->choice) {
  2395. case 1:
  2396. break;
  2397. case 2:
  2398. if (!ASN1PEREncUnsignedShort(enc, (val)->u.mediaLoop - 1))
  2399. return 0;
  2400. break;
  2401. case 3:
  2402. if (!ASN1PEREncUnsignedShort(enc, (val)->u.logicalChannelLoop - 1))
  2403. return 0;
  2404. break;
  2405. default:
  2406. /* impossible */
  2407. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2408. return 0;
  2409. }
  2410. return 1;
  2411. }
  2412. static int ASN1CALL ASN1Dec_MaintenanceLoopRequest_type(ASN1decoding_t dec, MaintenanceLoopRequest_type *val)
  2413. {
  2414. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2415. return 0;
  2416. switch ((val)->choice) {
  2417. case 1:
  2418. break;
  2419. case 2:
  2420. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.mediaLoop))
  2421. return 0;
  2422. (val)->u.mediaLoop += 1;
  2423. break;
  2424. case 3:
  2425. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.logicalChannelLoop))
  2426. return 0;
  2427. (val)->u.logicalChannelLoop += 1;
  2428. break;
  2429. case 0:
  2430. /* extension case */
  2431. if (!ASN1PERDecSkipFragmented(dec, 8))
  2432. return 0;
  2433. break;
  2434. default:
  2435. /* impossible */
  2436. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2437. return 0;
  2438. }
  2439. return 1;
  2440. }
  2441. static int ASN1CALL ASN1Enc_G7231AnnexCMode_g723AnnexCAudioMode(ASN1encoding_t enc, G7231AnnexCMode_g723AnnexCAudioMode *val)
  2442. {
  2443. if (!ASN1PEREncExtensionBitClear(enc))
  2444. return 0;
  2445. if (!ASN1PEREncBitVal(enc, 6, (val)->highRateMode0 - 27))
  2446. return 0;
  2447. if (!ASN1PEREncBitVal(enc, 6, (val)->highRateMode1 - 27))
  2448. return 0;
  2449. if (!ASN1PEREncBitVal(enc, 6, (val)->lowRateMode0 - 23))
  2450. return 0;
  2451. if (!ASN1PEREncBitVal(enc, 6, (val)->lowRateMode1 - 23))
  2452. return 0;
  2453. if (!ASN1PEREncBitVal(enc, 4, (val)->sidMode0 - 6))
  2454. return 0;
  2455. if (!ASN1PEREncBitVal(enc, 4, (val)->sidMode1 - 6))
  2456. return 0;
  2457. return 1;
  2458. }
  2459. static int ASN1CALL ASN1Dec_G7231AnnexCMode_g723AnnexCAudioMode(ASN1decoding_t dec, G7231AnnexCMode_g723AnnexCAudioMode *val)
  2460. {
  2461. ASN1uint32_t y;
  2462. if (!ASN1PERDecExtensionBit(dec, &y))
  2463. return 0;
  2464. if (!ASN1PERDecU16Val(dec, 6, &(val)->highRateMode0))
  2465. return 0;
  2466. (val)->highRateMode0 += 27;
  2467. if (!ASN1PERDecU16Val(dec, 6, &(val)->highRateMode1))
  2468. return 0;
  2469. (val)->highRateMode1 += 27;
  2470. if (!ASN1PERDecU16Val(dec, 6, &(val)->lowRateMode0))
  2471. return 0;
  2472. (val)->lowRateMode0 += 23;
  2473. if (!ASN1PERDecU16Val(dec, 6, &(val)->lowRateMode1))
  2474. return 0;
  2475. (val)->lowRateMode1 += 23;
  2476. if (!ASN1PERDecU16Val(dec, 4, &(val)->sidMode0))
  2477. return 0;
  2478. (val)->sidMode0 += 6;
  2479. if (!ASN1PERDecU16Val(dec, 4, &(val)->sidMode1))
  2480. return 0;
  2481. (val)->sidMode1 += 6;
  2482. if (y) {
  2483. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2484. return 0;
  2485. }
  2486. return 1;
  2487. }
  2488. static int ASN1CALL ASN1Enc_IS13818AudioMode_multichannelType(ASN1encoding_t enc, IS13818AudioMode_multichannelType *val)
  2489. {
  2490. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 4))
  2491. return 0;
  2492. return 1;
  2493. }
  2494. static int ASN1CALL ASN1Dec_IS13818AudioMode_multichannelType(ASN1decoding_t dec, IS13818AudioMode_multichannelType *val)
  2495. {
  2496. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 4))
  2497. return 0;
  2498. return 1;
  2499. }
  2500. static int ASN1CALL ASN1Enc_IS13818AudioMode_audioSampling(ASN1encoding_t enc, IS13818AudioMode_audioSampling *val)
  2501. {
  2502. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 3))
  2503. return 0;
  2504. return 1;
  2505. }
  2506. static int ASN1CALL ASN1Dec_IS13818AudioMode_audioSampling(ASN1decoding_t dec, IS13818AudioMode_audioSampling *val)
  2507. {
  2508. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 3))
  2509. return 0;
  2510. return 1;
  2511. }
  2512. static int ASN1CALL ASN1Enc_IS13818AudioMode_audioLayer(ASN1encoding_t enc, IS13818AudioMode_audioLayer *val)
  2513. {
  2514. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  2515. return 0;
  2516. return 1;
  2517. }
  2518. static int ASN1CALL ASN1Dec_IS13818AudioMode_audioLayer(ASN1decoding_t dec, IS13818AudioMode_audioLayer *val)
  2519. {
  2520. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  2521. return 0;
  2522. return 1;
  2523. }
  2524. static int ASN1CALL ASN1Enc_IS11172AudioMode_multichannelType(ASN1encoding_t enc, IS11172AudioMode_multichannelType *val)
  2525. {
  2526. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  2527. return 0;
  2528. return 1;
  2529. }
  2530. static int ASN1CALL ASN1Dec_IS11172AudioMode_multichannelType(ASN1decoding_t dec, IS11172AudioMode_multichannelType *val)
  2531. {
  2532. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  2533. return 0;
  2534. return 1;
  2535. }
  2536. static int ASN1CALL ASN1Enc_IS11172AudioMode_audioSampling(ASN1encoding_t enc, IS11172AudioMode_audioSampling *val)
  2537. {
  2538. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  2539. return 0;
  2540. return 1;
  2541. }
  2542. static int ASN1CALL ASN1Dec_IS11172AudioMode_audioSampling(ASN1decoding_t dec, IS11172AudioMode_audioSampling *val)
  2543. {
  2544. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  2545. return 0;
  2546. return 1;
  2547. }
  2548. static int ASN1CALL ASN1Enc_IS11172AudioMode_audioLayer(ASN1encoding_t enc, IS11172AudioMode_audioLayer *val)
  2549. {
  2550. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  2551. return 0;
  2552. return 1;
  2553. }
  2554. static int ASN1CALL ASN1Dec_IS11172AudioMode_audioLayer(ASN1decoding_t dec, IS11172AudioMode_audioLayer *val)
  2555. {
  2556. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  2557. return 0;
  2558. return 1;
  2559. }
  2560. static int ASN1CALL ASN1Enc_AudioMode_g7231(ASN1encoding_t enc, AudioMode_g7231 *val)
  2561. {
  2562. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  2563. return 0;
  2564. return 1;
  2565. }
  2566. static int ASN1CALL ASN1Dec_AudioMode_g7231(ASN1decoding_t dec, AudioMode_g7231 *val)
  2567. {
  2568. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  2569. return 0;
  2570. return 1;
  2571. }
  2572. static int ASN1CALL ASN1Enc_H263VideoMode_resolution(ASN1encoding_t enc, H263VideoMode_resolution *val)
  2573. {
  2574. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  2575. return 0;
  2576. return 1;
  2577. }
  2578. static int ASN1CALL ASN1Dec_H263VideoMode_resolution(ASN1decoding_t dec, H263VideoMode_resolution *val)
  2579. {
  2580. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  2581. return 0;
  2582. return 1;
  2583. }
  2584. static int ASN1CALL ASN1Enc_H262VideoMode_profileAndLevel(ASN1encoding_t enc, H262VideoMode_profileAndLevel *val)
  2585. {
  2586. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 4))
  2587. return 0;
  2588. return 1;
  2589. }
  2590. static int ASN1CALL ASN1Dec_H262VideoMode_profileAndLevel(ASN1decoding_t dec, H262VideoMode_profileAndLevel *val)
  2591. {
  2592. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 4))
  2593. return 0;
  2594. return 1;
  2595. }
  2596. static int ASN1CALL ASN1Enc_H261VideoMode_resolution(ASN1encoding_t enc, H261VideoMode_resolution *val)
  2597. {
  2598. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2599. return 0;
  2600. return 1;
  2601. }
  2602. static int ASN1CALL ASN1Dec_H261VideoMode_resolution(ASN1decoding_t dec, H261VideoMode_resolution *val)
  2603. {
  2604. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2605. return 0;
  2606. return 1;
  2607. }
  2608. static int ASN1CALL ASN1Enc_RequestModeReject_cause(ASN1encoding_t enc, RequestModeReject_cause *val)
  2609. {
  2610. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2611. return 0;
  2612. return 1;
  2613. }
  2614. static int ASN1CALL ASN1Dec_RequestModeReject_cause(ASN1decoding_t dec, RequestModeReject_cause *val)
  2615. {
  2616. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2617. return 0;
  2618. return 1;
  2619. }
  2620. static int ASN1CALL ASN1Enc_RequestModeAck_response(ASN1encoding_t enc, RequestModeAck_response *val)
  2621. {
  2622. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  2623. return 0;
  2624. return 1;
  2625. }
  2626. static int ASN1CALL ASN1Dec_RequestModeAck_response(ASN1decoding_t dec, RequestModeAck_response *val)
  2627. {
  2628. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  2629. return 0;
  2630. return 1;
  2631. }
  2632. static int ASN1CALL ASN1Enc_RequestMultiplexEntryRelease_entryNumbers(ASN1encoding_t enc, RequestMultiplexEntryRelease_entryNumbers *val)
  2633. {
  2634. ASN1uint32_t i;
  2635. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  2636. return 0;
  2637. for (i = 0; i < (val)->count; i++) {
  2638. if (!ASN1PEREncBitVal(enc, 4, ((val)->value)[i] - 1))
  2639. return 0;
  2640. }
  2641. return 1;
  2642. }
  2643. static int ASN1CALL ASN1Dec_RequestMultiplexEntryRelease_entryNumbers(ASN1decoding_t dec, RequestMultiplexEntryRelease_entryNumbers *val)
  2644. {
  2645. ASN1uint32_t i;
  2646. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  2647. return 0;
  2648. (val)->count += 1;
  2649. for (i = 0; i < (val)->count; i++) {
  2650. if (!ASN1PERDecU16Val(dec, 4, &((val)->value)[i]))
  2651. return 0;
  2652. ((val)->value)[i] += 1;
  2653. }
  2654. return 1;
  2655. }
  2656. static void ASN1CALL ASN1Free_RequestMultiplexEntryRelease_entryNumbers(RequestMultiplexEntryRelease_entryNumbers *val)
  2657. {
  2658. if (val) {
  2659. }
  2660. }
  2661. static int ASN1CALL ASN1Enc_RequestMultiplexEntryRejectionDescriptions_cause(ASN1encoding_t enc, RequestMultiplexEntryRejectionDescriptions_cause *val)
  2662. {
  2663. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 0))
  2664. return 0;
  2665. return 1;
  2666. }
  2667. static int ASN1CALL ASN1Dec_RequestMultiplexEntryRejectionDescriptions_cause(ASN1decoding_t dec, RequestMultiplexEntryRejectionDescriptions_cause *val)
  2668. {
  2669. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 0))
  2670. return 0;
  2671. return 1;
  2672. }
  2673. static int ASN1CALL ASN1Enc_RequestMultiplexEntryReject_entryNumbers(ASN1encoding_t enc, RequestMultiplexEntryReject_entryNumbers *val)
  2674. {
  2675. ASN1uint32_t i;
  2676. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  2677. return 0;
  2678. for (i = 0; i < (val)->count; i++) {
  2679. if (!ASN1PEREncBitVal(enc, 4, ((val)->value)[i] - 1))
  2680. return 0;
  2681. }
  2682. return 1;
  2683. }
  2684. static int ASN1CALL ASN1Dec_RequestMultiplexEntryReject_entryNumbers(ASN1decoding_t dec, RequestMultiplexEntryReject_entryNumbers *val)
  2685. {
  2686. ASN1uint32_t i;
  2687. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  2688. return 0;
  2689. (val)->count += 1;
  2690. for (i = 0; i < (val)->count; i++) {
  2691. if (!ASN1PERDecU16Val(dec, 4, &((val)->value)[i]))
  2692. return 0;
  2693. ((val)->value)[i] += 1;
  2694. }
  2695. return 1;
  2696. }
  2697. static void ASN1CALL ASN1Free_RequestMultiplexEntryReject_entryNumbers(RequestMultiplexEntryReject_entryNumbers *val)
  2698. {
  2699. if (val) {
  2700. }
  2701. }
  2702. static int ASN1CALL ASN1Enc_RequestMultiplexEntryAck_entryNumbers(ASN1encoding_t enc, RequestMultiplexEntryAck_entryNumbers *val)
  2703. {
  2704. ASN1uint32_t i;
  2705. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  2706. return 0;
  2707. for (i = 0; i < (val)->count; i++) {
  2708. if (!ASN1PEREncBitVal(enc, 4, ((val)->value)[i] - 1))
  2709. return 0;
  2710. }
  2711. return 1;
  2712. }
  2713. static int ASN1CALL ASN1Dec_RequestMultiplexEntryAck_entryNumbers(ASN1decoding_t dec, RequestMultiplexEntryAck_entryNumbers *val)
  2714. {
  2715. ASN1uint32_t i;
  2716. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  2717. return 0;
  2718. (val)->count += 1;
  2719. for (i = 0; i < (val)->count; i++) {
  2720. if (!ASN1PERDecU16Val(dec, 4, &((val)->value)[i]))
  2721. return 0;
  2722. ((val)->value)[i] += 1;
  2723. }
  2724. return 1;
  2725. }
  2726. static void ASN1CALL ASN1Free_RequestMultiplexEntryAck_entryNumbers(RequestMultiplexEntryAck_entryNumbers *val)
  2727. {
  2728. if (val) {
  2729. }
  2730. }
  2731. static int ASN1CALL ASN1Enc_RequestMultiplexEntry_entryNumbers(ASN1encoding_t enc, RequestMultiplexEntry_entryNumbers *val)
  2732. {
  2733. ASN1uint32_t i;
  2734. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  2735. return 0;
  2736. for (i = 0; i < (val)->count; i++) {
  2737. if (!ASN1PEREncBitVal(enc, 4, ((val)->value)[i] - 1))
  2738. return 0;
  2739. }
  2740. return 1;
  2741. }
  2742. static int ASN1CALL ASN1Dec_RequestMultiplexEntry_entryNumbers(ASN1decoding_t dec, RequestMultiplexEntry_entryNumbers *val)
  2743. {
  2744. ASN1uint32_t i;
  2745. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  2746. return 0;
  2747. (val)->count += 1;
  2748. for (i = 0; i < (val)->count; i++) {
  2749. if (!ASN1PERDecU16Val(dec, 4, &((val)->value)[i]))
  2750. return 0;
  2751. ((val)->value)[i] += 1;
  2752. }
  2753. return 1;
  2754. }
  2755. static void ASN1CALL ASN1Free_RequestMultiplexEntry_entryNumbers(RequestMultiplexEntry_entryNumbers *val)
  2756. {
  2757. if (val) {
  2758. }
  2759. }
  2760. static int ASN1CALL ASN1Enc_MultiplexEntrySendRelease_multiplexTableEntryNumber(ASN1encoding_t enc, MultiplexEntrySendRelease_multiplexTableEntryNumber *val)
  2761. {
  2762. ASN1uint32_t i;
  2763. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  2764. return 0;
  2765. for (i = 0; i < (val)->count; i++) {
  2766. if (!ASN1PEREncBitVal(enc, 4, ((val)->value)[i] - 1))
  2767. return 0;
  2768. }
  2769. return 1;
  2770. }
  2771. static int ASN1CALL ASN1Dec_MultiplexEntrySendRelease_multiplexTableEntryNumber(ASN1decoding_t dec, MultiplexEntrySendRelease_multiplexTableEntryNumber *val)
  2772. {
  2773. ASN1uint32_t i;
  2774. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  2775. return 0;
  2776. (val)->count += 1;
  2777. for (i = 0; i < (val)->count; i++) {
  2778. if (!ASN1PERDecU16Val(dec, 4, &((val)->value)[i]))
  2779. return 0;
  2780. ((val)->value)[i] += 1;
  2781. }
  2782. return 1;
  2783. }
  2784. static void ASN1CALL ASN1Free_MultiplexEntrySendRelease_multiplexTableEntryNumber(MultiplexEntrySendRelease_multiplexTableEntryNumber *val)
  2785. {
  2786. if (val) {
  2787. }
  2788. }
  2789. static int ASN1CALL ASN1Enc_MultiplexEntryRejectionDescriptions_cause(ASN1encoding_t enc, MultiplexEntryRejectionDescriptions_cause *val)
  2790. {
  2791. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  2792. return 0;
  2793. return 1;
  2794. }
  2795. static int ASN1CALL ASN1Dec_MultiplexEntryRejectionDescriptions_cause(ASN1decoding_t dec, MultiplexEntryRejectionDescriptions_cause *val)
  2796. {
  2797. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  2798. return 0;
  2799. return 1;
  2800. }
  2801. static int ASN1CALL ASN1Enc_MultiplexEntrySendAck_multiplexTableEntryNumber(ASN1encoding_t enc, MultiplexEntrySendAck_multiplexTableEntryNumber *val)
  2802. {
  2803. ASN1uint32_t i;
  2804. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  2805. return 0;
  2806. for (i = 0; i < (val)->count; i++) {
  2807. if (!ASN1PEREncBitVal(enc, 4, ((val)->value)[i] - 1))
  2808. return 0;
  2809. }
  2810. return 1;
  2811. }
  2812. static int ASN1CALL ASN1Dec_MultiplexEntrySendAck_multiplexTableEntryNumber(ASN1decoding_t dec, MultiplexEntrySendAck_multiplexTableEntryNumber *val)
  2813. {
  2814. ASN1uint32_t i;
  2815. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  2816. return 0;
  2817. (val)->count += 1;
  2818. for (i = 0; i < (val)->count; i++) {
  2819. if (!ASN1PERDecU16Val(dec, 4, &((val)->value)[i]))
  2820. return 0;
  2821. ((val)->value)[i] += 1;
  2822. }
  2823. return 1;
  2824. }
  2825. static void ASN1CALL ASN1Free_MultiplexEntrySendAck_multiplexTableEntryNumber(MultiplexEntrySendAck_multiplexTableEntryNumber *val)
  2826. {
  2827. if (val) {
  2828. }
  2829. }
  2830. static int ASN1CALL ASN1Enc_MultiplexElement_repeatCount(ASN1encoding_t enc, MultiplexElement_repeatCount *val)
  2831. {
  2832. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2833. return 0;
  2834. switch ((val)->choice) {
  2835. case 1:
  2836. if (!ASN1PEREncUnsignedShort(enc, (val)->u.finite - 1))
  2837. return 0;
  2838. break;
  2839. case 2:
  2840. break;
  2841. default:
  2842. /* impossible */
  2843. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2844. return 0;
  2845. }
  2846. return 1;
  2847. }
  2848. static int ASN1CALL ASN1Dec_MultiplexElement_repeatCount(ASN1decoding_t dec, MultiplexElement_repeatCount *val)
  2849. {
  2850. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2851. return 0;
  2852. switch ((val)->choice) {
  2853. case 1:
  2854. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.finite))
  2855. return 0;
  2856. (val)->u.finite += 1;
  2857. break;
  2858. case 2:
  2859. break;
  2860. default:
  2861. /* impossible */
  2862. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2863. return 0;
  2864. }
  2865. return 1;
  2866. }
  2867. static int ASN1CALL ASN1Enc_MultiplexElement_type(ASN1encoding_t enc, MultiplexElement_type *val)
  2868. {
  2869. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2870. return 0;
  2871. switch ((val)->choice) {
  2872. case 1:
  2873. if (!ASN1PEREncUnsignedShort(enc, (val)->u.logicalChannelNumber))
  2874. return 0;
  2875. break;
  2876. case 2:
  2877. if (!ASN1Enc_MultiplexElement_type_subElementList(enc, &(val)->u.subElementList))
  2878. return 0;
  2879. break;
  2880. default:
  2881. /* impossible */
  2882. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2883. return 0;
  2884. }
  2885. return 1;
  2886. }
  2887. static int ASN1CALL ASN1Dec_MultiplexElement_type(ASN1decoding_t dec, MultiplexElement_type *val)
  2888. {
  2889. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2890. return 0;
  2891. switch ((val)->choice) {
  2892. case 1:
  2893. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.logicalChannelNumber))
  2894. return 0;
  2895. break;
  2896. case 2:
  2897. if (!ASN1Dec_MultiplexElement_type_subElementList(dec, &(val)->u.subElementList))
  2898. return 0;
  2899. break;
  2900. default:
  2901. /* impossible */
  2902. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2903. return 0;
  2904. }
  2905. return 1;
  2906. }
  2907. static void ASN1CALL ASN1Free_MultiplexElement_type(MultiplexElement_type *val)
  2908. {
  2909. if (val) {
  2910. switch ((val)->choice) {
  2911. case 2:
  2912. ASN1Free_MultiplexElement_type_subElementList(&(val)->u.subElementList);
  2913. break;
  2914. }
  2915. }
  2916. }
  2917. static int ASN1CALL ASN1Enc_RequestChannelCloseReject_cause(ASN1encoding_t enc, RequestChannelCloseReject_cause *val)
  2918. {
  2919. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 0))
  2920. return 0;
  2921. return 1;
  2922. }
  2923. static int ASN1CALL ASN1Dec_RequestChannelCloseReject_cause(ASN1decoding_t dec, RequestChannelCloseReject_cause *val)
  2924. {
  2925. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 0))
  2926. return 0;
  2927. return 1;
  2928. }
  2929. static int ASN1CALL ASN1Enc_RequestChannelClose_reason(ASN1encoding_t enc, RequestChannelClose_reason *val)
  2930. {
  2931. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2932. return 0;
  2933. return 1;
  2934. }
  2935. static int ASN1CALL ASN1Dec_RequestChannelClose_reason(ASN1decoding_t dec, RequestChannelClose_reason *val)
  2936. {
  2937. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2938. return 0;
  2939. return 1;
  2940. }
  2941. static int ASN1CALL ASN1Enc_CloseLogicalChannel_reason(ASN1encoding_t enc, CloseLogicalChannel_reason *val)
  2942. {
  2943. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2944. return 0;
  2945. return 1;
  2946. }
  2947. static int ASN1CALL ASN1Dec_CloseLogicalChannel_reason(ASN1decoding_t dec, CloseLogicalChannel_reason *val)
  2948. {
  2949. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2950. return 0;
  2951. return 1;
  2952. }
  2953. static int ASN1CALL ASN1Enc_CloseLogicalChannel_source(ASN1encoding_t enc, CloseLogicalChannel_source *val)
  2954. {
  2955. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2956. return 0;
  2957. return 1;
  2958. }
  2959. static int ASN1CALL ASN1Dec_CloseLogicalChannel_source(ASN1decoding_t dec, CloseLogicalChannel_source *val)
  2960. {
  2961. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2962. return 0;
  2963. return 1;
  2964. }
  2965. static int ASN1CALL ASN1Enc_OpenLogicalChannelReject_cause(ASN1encoding_t enc, OpenLogicalChannelReject_cause *val)
  2966. {
  2967. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 6))
  2968. return 0;
  2969. return 1;
  2970. }
  2971. static int ASN1CALL ASN1Dec_OpenLogicalChannelReject_cause(ASN1decoding_t dec, OpenLogicalChannelReject_cause *val)
  2972. {
  2973. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 6))
  2974. return 0;
  2975. return 1;
  2976. }
  2977. static int ASN1CALL ASN1Enc_MulticastAddress_iP6Address(ASN1encoding_t enc, MulticastAddress_iP6Address *val)
  2978. {
  2979. if (!ASN1PEREncExtensionBitClear(enc))
  2980. return 0;
  2981. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->network, 16))
  2982. return 0;
  2983. if (!ASN1PEREncUnsignedShort(enc, (val)->tsapIdentifier))
  2984. return 0;
  2985. return 1;
  2986. }
  2987. static int ASN1CALL ASN1Dec_MulticastAddress_iP6Address(ASN1decoding_t dec, MulticastAddress_iP6Address *val)
  2988. {
  2989. ASN1uint32_t y;
  2990. if (!ASN1PERDecExtensionBit(dec, &y))
  2991. return 0;
  2992. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->network, 16))
  2993. return 0;
  2994. if (!ASN1PERDecUnsignedShort(dec, &(val)->tsapIdentifier))
  2995. return 0;
  2996. if (y) {
  2997. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2998. return 0;
  2999. }
  3000. return 1;
  3001. }
  3002. static void ASN1CALL ASN1Free_MulticastAddress_iP6Address(MulticastAddress_iP6Address *val)
  3003. {
  3004. if (val) {
  3005. }
  3006. }
  3007. static int ASN1CALL ASN1Enc_MulticastAddress_iPAddress(ASN1encoding_t enc, MulticastAddress_iPAddress *val)
  3008. {
  3009. if (!ASN1PEREncExtensionBitClear(enc))
  3010. return 0;
  3011. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->network, 4))
  3012. return 0;
  3013. if (!ASN1PEREncUnsignedShort(enc, (val)->tsapIdentifier))
  3014. return 0;
  3015. return 1;
  3016. }
  3017. static int ASN1CALL ASN1Dec_MulticastAddress_iPAddress(ASN1decoding_t dec, MulticastAddress_iPAddress *val)
  3018. {
  3019. ASN1uint32_t y;
  3020. if (!ASN1PERDecExtensionBit(dec, &y))
  3021. return 0;
  3022. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->network, 4))
  3023. return 0;
  3024. if (!ASN1PERDecUnsignedShort(dec, &(val)->tsapIdentifier))
  3025. return 0;
  3026. if (y) {
  3027. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3028. return 0;
  3029. }
  3030. return 1;
  3031. }
  3032. static void ASN1CALL ASN1Free_MulticastAddress_iPAddress(MulticastAddress_iPAddress *val)
  3033. {
  3034. if (val) {
  3035. }
  3036. }
  3037. static int ASN1CALL ASN1Enc_UnicastAddress_iPSourceRouteAddress(ASN1encoding_t enc, UnicastAddress_iPSourceRouteAddress *val)
  3038. {
  3039. if (!ASN1PEREncExtensionBitClear(enc))
  3040. return 0;
  3041. if (!ASN1Enc_UnicastAddress_iPSourceRouteAddress_routing(enc, &(val)->routing))
  3042. return 0;
  3043. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->network, 4))
  3044. return 0;
  3045. if (!ASN1PEREncUnsignedShort(enc, (val)->tsapIdentifier))
  3046. return 0;
  3047. if (!ASN1Enc_UnicastAddress_iPSourceRouteAddress_route(enc, &(val)->route))
  3048. return 0;
  3049. return 1;
  3050. }
  3051. static int ASN1CALL ASN1Dec_UnicastAddress_iPSourceRouteAddress(ASN1decoding_t dec, UnicastAddress_iPSourceRouteAddress *val)
  3052. {
  3053. ASN1uint32_t y;
  3054. if (!ASN1PERDecExtensionBit(dec, &y))
  3055. return 0;
  3056. if (!ASN1Dec_UnicastAddress_iPSourceRouteAddress_routing(dec, &(val)->routing))
  3057. return 0;
  3058. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->network, 4))
  3059. return 0;
  3060. if (!ASN1PERDecUnsignedShort(dec, &(val)->tsapIdentifier))
  3061. return 0;
  3062. if (!ASN1Dec_UnicastAddress_iPSourceRouteAddress_route(dec, &(val)->route))
  3063. return 0;
  3064. if (y) {
  3065. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3066. return 0;
  3067. }
  3068. return 1;
  3069. }
  3070. static void ASN1CALL ASN1Free_UnicastAddress_iPSourceRouteAddress(UnicastAddress_iPSourceRouteAddress *val)
  3071. {
  3072. if (val) {
  3073. ASN1Free_UnicastAddress_iPSourceRouteAddress_route(&(val)->route);
  3074. }
  3075. }
  3076. static int ASN1CALL ASN1Enc_UnicastAddress_iP6Address(ASN1encoding_t enc, UnicastAddress_iP6Address *val)
  3077. {
  3078. if (!ASN1PEREncExtensionBitClear(enc))
  3079. return 0;
  3080. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->network, 16))
  3081. return 0;
  3082. if (!ASN1PEREncUnsignedShort(enc, (val)->tsapIdentifier))
  3083. return 0;
  3084. return 1;
  3085. }
  3086. static int ASN1CALL ASN1Dec_UnicastAddress_iP6Address(ASN1decoding_t dec, UnicastAddress_iP6Address *val)
  3087. {
  3088. ASN1uint32_t y;
  3089. if (!ASN1PERDecExtensionBit(dec, &y))
  3090. return 0;
  3091. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->network, 16))
  3092. return 0;
  3093. if (!ASN1PERDecUnsignedShort(dec, &(val)->tsapIdentifier))
  3094. return 0;
  3095. if (y) {
  3096. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3097. return 0;
  3098. }
  3099. return 1;
  3100. }
  3101. static void ASN1CALL ASN1Free_UnicastAddress_iP6Address(UnicastAddress_iP6Address *val)
  3102. {
  3103. if (val) {
  3104. }
  3105. }
  3106. static int ASN1CALL ASN1Enc_UnicastAddress_iPXAddress(ASN1encoding_t enc, UnicastAddress_iPXAddress *val)
  3107. {
  3108. if (!ASN1PEREncExtensionBitClear(enc))
  3109. return 0;
  3110. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->node, 6))
  3111. return 0;
  3112. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->netnum, 4))
  3113. return 0;
  3114. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->tsapIdentifier, 2))
  3115. return 0;
  3116. return 1;
  3117. }
  3118. static int ASN1CALL ASN1Dec_UnicastAddress_iPXAddress(ASN1decoding_t dec, UnicastAddress_iPXAddress *val)
  3119. {
  3120. ASN1uint32_t y;
  3121. if (!ASN1PERDecExtensionBit(dec, &y))
  3122. return 0;
  3123. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->node, 6))
  3124. return 0;
  3125. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->netnum, 4))
  3126. return 0;
  3127. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->tsapIdentifier, 2))
  3128. return 0;
  3129. if (y) {
  3130. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3131. return 0;
  3132. }
  3133. return 1;
  3134. }
  3135. static void ASN1CALL ASN1Free_UnicastAddress_iPXAddress(UnicastAddress_iPXAddress *val)
  3136. {
  3137. if (val) {
  3138. }
  3139. }
  3140. static int ASN1CALL ASN1Enc_UnicastAddress_iPAddress(ASN1encoding_t enc, UnicastAddress_iPAddress *val)
  3141. {
  3142. if (!ASN1PEREncExtensionBitClear(enc))
  3143. return 0;
  3144. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->network, 4))
  3145. return 0;
  3146. if (!ASN1PEREncUnsignedShort(enc, (val)->tsapIdentifier))
  3147. return 0;
  3148. return 1;
  3149. }
  3150. static int ASN1CALL ASN1Dec_UnicastAddress_iPAddress(ASN1decoding_t dec, UnicastAddress_iPAddress *val)
  3151. {
  3152. ASN1uint32_t y;
  3153. if (!ASN1PERDecExtensionBit(dec, &y))
  3154. return 0;
  3155. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->network, 4))
  3156. return 0;
  3157. if (!ASN1PERDecUnsignedShort(dec, &(val)->tsapIdentifier))
  3158. return 0;
  3159. if (y) {
  3160. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3161. return 0;
  3162. }
  3163. return 1;
  3164. }
  3165. static void ASN1CALL ASN1Free_UnicastAddress_iPAddress(UnicastAddress_iPAddress *val)
  3166. {
  3167. if (val) {
  3168. }
  3169. }
  3170. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters_mode(ASN1encoding_t enc, V76LogicalChannelParameters_mode *val)
  3171. {
  3172. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  3173. return 0;
  3174. switch ((val)->choice) {
  3175. case 1:
  3176. if (!ASN1Enc_V76LogicalChannelParameters_mode_eRM(enc, &(val)->u.eRM))
  3177. return 0;
  3178. break;
  3179. case 2:
  3180. break;
  3181. default:
  3182. /* impossible */
  3183. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  3184. return 0;
  3185. }
  3186. return 1;
  3187. }
  3188. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters_mode(ASN1decoding_t dec, V76LogicalChannelParameters_mode *val)
  3189. {
  3190. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  3191. return 0;
  3192. switch ((val)->choice) {
  3193. case 1:
  3194. if (!ASN1Dec_V76LogicalChannelParameters_mode_eRM(dec, &(val)->u.eRM))
  3195. return 0;
  3196. break;
  3197. case 2:
  3198. break;
  3199. case 0:
  3200. /* extension case */
  3201. if (!ASN1PERDecSkipFragmented(dec, 8))
  3202. return 0;
  3203. break;
  3204. default:
  3205. /* impossible */
  3206. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  3207. return 0;
  3208. }
  3209. return 1;
  3210. }
  3211. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters_suspendResume(ASN1encoding_t enc, V76LogicalChannelParameters_suspendResume *val)
  3212. {
  3213. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  3214. return 0;
  3215. return 1;
  3216. }
  3217. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters_suspendResume(ASN1decoding_t dec, V76LogicalChannelParameters_suspendResume *val)
  3218. {
  3219. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  3220. return 0;
  3221. return 1;
  3222. }
  3223. static int ASN1CALL ASN1Enc_H223AnnexCArqParameters_numberOfRetransmissions(ASN1encoding_t enc, H223AnnexCArqParameters_numberOfRetransmissions *val)
  3224. {
  3225. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  3226. return 0;
  3227. switch ((val)->choice) {
  3228. case 1:
  3229. if (!ASN1PEREncBitVal(enc, 5, (val)->u.finite))
  3230. return 0;
  3231. break;
  3232. case 2:
  3233. break;
  3234. default:
  3235. /* impossible */
  3236. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  3237. return 0;
  3238. }
  3239. return 1;
  3240. }
  3241. static int ASN1CALL ASN1Dec_H223AnnexCArqParameters_numberOfRetransmissions(ASN1decoding_t dec, H223AnnexCArqParameters_numberOfRetransmissions *val)
  3242. {
  3243. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  3244. return 0;
  3245. switch ((val)->choice) {
  3246. case 1:
  3247. if (!ASN1PERDecU16Val(dec, 5, &(val)->u.finite))
  3248. return 0;
  3249. break;
  3250. case 2:
  3251. break;
  3252. case 0:
  3253. /* extension case */
  3254. if (!ASN1PERDecSkipFragmented(dec, 8))
  3255. return 0;
  3256. break;
  3257. default:
  3258. /* impossible */
  3259. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  3260. return 0;
  3261. }
  3262. return 1;
  3263. }
  3264. static int ASN1CALL ASN1Enc_H223AL3MParameters_crcLength(ASN1encoding_t enc, H223AL3MParameters_crcLength *val)
  3265. {
  3266. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  3267. return 0;
  3268. return 1;
  3269. }
  3270. static int ASN1CALL ASN1Dec_H223AL3MParameters_crcLength(ASN1decoding_t dec, H223AL3MParameters_crcLength *val)
  3271. {
  3272. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  3273. return 0;
  3274. return 1;
  3275. }
  3276. static int ASN1CALL ASN1Enc_H223AL3MParameters_headerFormat(ASN1encoding_t enc, H223AL3MParameters_headerFormat *val)
  3277. {
  3278. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  3279. return 0;
  3280. return 1;
  3281. }
  3282. static int ASN1CALL ASN1Dec_H223AL3MParameters_headerFormat(ASN1decoding_t dec, H223AL3MParameters_headerFormat *val)
  3283. {
  3284. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  3285. return 0;
  3286. return 1;
  3287. }
  3288. static int ASN1CALL ASN1Enc_H223AL2MParameters_headerFEC(ASN1encoding_t enc, H223AL2MParameters_headerFEC *val)
  3289. {
  3290. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  3291. return 0;
  3292. return 1;
  3293. }
  3294. static int ASN1CALL ASN1Dec_H223AL2MParameters_headerFEC(ASN1decoding_t dec, H223AL2MParameters_headerFEC *val)
  3295. {
  3296. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  3297. return 0;
  3298. return 1;
  3299. }
  3300. static int ASN1CALL ASN1Enc_H223AL1MParameters_crcLength(ASN1encoding_t enc, H223AL1MParameters_crcLength *val)
  3301. {
  3302. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  3303. return 0;
  3304. return 1;
  3305. }
  3306. static int ASN1CALL ASN1Dec_H223AL1MParameters_crcLength(ASN1decoding_t dec, H223AL1MParameters_crcLength *val)
  3307. {
  3308. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  3309. return 0;
  3310. return 1;
  3311. }
  3312. static int ASN1CALL ASN1Enc_H223AL1MParameters_headerFEC(ASN1encoding_t enc, H223AL1MParameters_headerFEC *val)
  3313. {
  3314. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  3315. return 0;
  3316. return 1;
  3317. }
  3318. static int ASN1CALL ASN1Dec_H223AL1MParameters_headerFEC(ASN1decoding_t dec, H223AL1MParameters_headerFEC *val)
  3319. {
  3320. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  3321. return 0;
  3322. return 1;
  3323. }
  3324. static int ASN1CALL ASN1Enc_H223AL1MParameters_transferMode(ASN1encoding_t enc, H223AL1MParameters_transferMode *val)
  3325. {
  3326. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  3327. return 0;
  3328. return 1;
  3329. }
  3330. static int ASN1CALL ASN1Dec_H223AL1MParameters_transferMode(ASN1decoding_t dec, H223AL1MParameters_transferMode *val)
  3331. {
  3332. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  3333. return 0;
  3334. return 1;
  3335. }
  3336. static ASN1stringtableentry_t Q2931Address_address_internationalNumber_StringTableEntries[] = {
  3337. { 32, 32, 0 }, { 48, 57, 1 },
  3338. };
  3339. static ASN1stringtable_t Q2931Address_address_internationalNumber_StringTable = {
  3340. 2, Q2931Address_address_internationalNumber_StringTableEntries
  3341. };
  3342. static int ASN1CALL ASN1Enc_Q2931Address_address(ASN1encoding_t enc, Q2931Address_address *val)
  3343. {
  3344. ASN1uint32_t t;
  3345. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  3346. return 0;
  3347. switch ((val)->choice) {
  3348. case 1:
  3349. t = lstrlenA((val)->u.internationalNumber);
  3350. if (!ASN1PEREncBitVal(enc, 4, t - 1))
  3351. return 0;
  3352. ASN1PEREncAlignment(enc);
  3353. if (!ASN1PEREncTableCharString(enc, t, (val)->u.internationalNumber, 4, &Q2931Address_address_internationalNumber_StringTable))
  3354. return 0;
  3355. break;
  3356. case 2:
  3357. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->u.nsapAddress, 1, 20, 5))
  3358. return 0;
  3359. break;
  3360. default:
  3361. /* impossible */
  3362. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  3363. return 0;
  3364. }
  3365. return 1;
  3366. }
  3367. static int ASN1CALL ASN1Dec_Q2931Address_address(ASN1decoding_t dec, Q2931Address_address *val)
  3368. {
  3369. ASN1uint32_t l;
  3370. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  3371. return 0;
  3372. switch ((val)->choice) {
  3373. case 1:
  3374. if (!ASN1PERDecU32Val(dec, 4, &l))
  3375. return 0;
  3376. l += 1;
  3377. ASN1PERDecAlignment(dec);
  3378. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->u.internationalNumber, 4, &Q2931Address_address_internationalNumber_StringTable))
  3379. return 0;
  3380. break;
  3381. case 2:
  3382. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->u.nsapAddress, 1, 20, 5))
  3383. return 0;
  3384. break;
  3385. case 0:
  3386. /* extension case */
  3387. if (!ASN1PERDecSkipFragmented(dec, 8))
  3388. return 0;
  3389. break;
  3390. default:
  3391. /* impossible */
  3392. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  3393. return 0;
  3394. }
  3395. return 1;
  3396. }
  3397. static void ASN1CALL ASN1Free_Q2931Address_address(Q2931Address_address *val)
  3398. {
  3399. if (val) {
  3400. switch ((val)->choice) {
  3401. case 1:
  3402. break;
  3403. case 2:
  3404. break;
  3405. }
  3406. }
  3407. }
  3408. static int ASN1CALL ASN1Enc_NetworkAccessParameters_t120SetupProcedure(ASN1encoding_t enc, NetworkAccessParameters_t120SetupProcedure *val)
  3409. {
  3410. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  3411. return 0;
  3412. return 1;
  3413. }
  3414. static int ASN1CALL ASN1Dec_NetworkAccessParameters_t120SetupProcedure(ASN1decoding_t dec, NetworkAccessParameters_t120SetupProcedure *val)
  3415. {
  3416. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  3417. return 0;
  3418. return 1;
  3419. }
  3420. static int ASN1CALL ASN1Enc_NetworkAccessParameters_distribution(ASN1encoding_t enc, NetworkAccessParameters_distribution *val)
  3421. {
  3422. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  3423. return 0;
  3424. return 1;
  3425. }
  3426. static int ASN1CALL ASN1Dec_NetworkAccessParameters_distribution(ASN1decoding_t dec, NetworkAccessParameters_distribution *val)
  3427. {
  3428. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  3429. return 0;
  3430. return 1;
  3431. }
  3432. static int ASN1CALL ASN1Enc_T84Profile_t84Restricted(ASN1encoding_t enc, T84Profile_t84Restricted *val)
  3433. {
  3434. if (!ASN1PEREncExtensionBitClear(enc))
  3435. return 0;
  3436. if (!ASN1PEREncBoolean(enc, (val)->qcif))
  3437. return 0;
  3438. if (!ASN1PEREncBoolean(enc, (val)->cif))
  3439. return 0;
  3440. if (!ASN1PEREncBoolean(enc, (val)->ccir601Seq))
  3441. return 0;
  3442. if (!ASN1PEREncBoolean(enc, (val)->ccir601Prog))
  3443. return 0;
  3444. if (!ASN1PEREncBoolean(enc, (val)->hdtvSeq))
  3445. return 0;
  3446. if (!ASN1PEREncBoolean(enc, (val)->hdtvProg))
  3447. return 0;
  3448. if (!ASN1PEREncBoolean(enc, (val)->g3FacsMH200x100))
  3449. return 0;
  3450. if (!ASN1PEREncBoolean(enc, (val)->g3FacsMH200x200))
  3451. return 0;
  3452. if (!ASN1PEREncBoolean(enc, (val)->g4FacsMMR200x100))
  3453. return 0;
  3454. if (!ASN1PEREncBoolean(enc, (val)->g4FacsMMR200x200))
  3455. return 0;
  3456. if (!ASN1PEREncBoolean(enc, (val)->jbig200x200Seq))
  3457. return 0;
  3458. if (!ASN1PEREncBoolean(enc, (val)->jbig200x200Prog))
  3459. return 0;
  3460. if (!ASN1PEREncBoolean(enc, (val)->jbig300x300Seq))
  3461. return 0;
  3462. if (!ASN1PEREncBoolean(enc, (val)->jbig300x300Prog))
  3463. return 0;
  3464. if (!ASN1PEREncBoolean(enc, (val)->digPhotoLow))
  3465. return 0;
  3466. if (!ASN1PEREncBoolean(enc, (val)->digPhotoMedSeq))
  3467. return 0;
  3468. if (!ASN1PEREncBoolean(enc, (val)->digPhotoMedProg))
  3469. return 0;
  3470. if (!ASN1PEREncBoolean(enc, (val)->digPhotoHighSeq))
  3471. return 0;
  3472. if (!ASN1PEREncBoolean(enc, (val)->digPhotoHighProg))
  3473. return 0;
  3474. return 1;
  3475. }
  3476. static int ASN1CALL ASN1Dec_T84Profile_t84Restricted(ASN1decoding_t dec, T84Profile_t84Restricted *val)
  3477. {
  3478. ASN1uint32_t y;
  3479. if (!ASN1PERDecExtensionBit(dec, &y))
  3480. return 0;
  3481. if (!ASN1PERDecBoolean(dec, &(val)->qcif))
  3482. return 0;
  3483. if (!ASN1PERDecBoolean(dec, &(val)->cif))
  3484. return 0;
  3485. if (!ASN1PERDecBoolean(dec, &(val)->ccir601Seq))
  3486. return 0;
  3487. if (!ASN1PERDecBoolean(dec, &(val)->ccir601Prog))
  3488. return 0;
  3489. if (!ASN1PERDecBoolean(dec, &(val)->hdtvSeq))
  3490. return 0;
  3491. if (!ASN1PERDecBoolean(dec, &(val)->hdtvProg))
  3492. return 0;
  3493. if (!ASN1PERDecBoolean(dec, &(val)->g3FacsMH200x100))
  3494. return 0;
  3495. if (!ASN1PERDecBoolean(dec, &(val)->g3FacsMH200x200))
  3496. return 0;
  3497. if (!ASN1PERDecBoolean(dec, &(val)->g4FacsMMR200x100))
  3498. return 0;
  3499. if (!ASN1PERDecBoolean(dec, &(val)->g4FacsMMR200x200))
  3500. return 0;
  3501. if (!ASN1PERDecBoolean(dec, &(val)->jbig200x200Seq))
  3502. return 0;
  3503. if (!ASN1PERDecBoolean(dec, &(val)->jbig200x200Prog))
  3504. return 0;
  3505. if (!ASN1PERDecBoolean(dec, &(val)->jbig300x300Seq))
  3506. return 0;
  3507. if (!ASN1PERDecBoolean(dec, &(val)->jbig300x300Prog))
  3508. return 0;
  3509. if (!ASN1PERDecBoolean(dec, &(val)->digPhotoLow))
  3510. return 0;
  3511. if (!ASN1PERDecBoolean(dec, &(val)->digPhotoMedSeq))
  3512. return 0;
  3513. if (!ASN1PERDecBoolean(dec, &(val)->digPhotoMedProg))
  3514. return 0;
  3515. if (!ASN1PERDecBoolean(dec, &(val)->digPhotoHighSeq))
  3516. return 0;
  3517. if (!ASN1PERDecBoolean(dec, &(val)->digPhotoHighProg))
  3518. return 0;
  3519. if (y) {
  3520. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3521. return 0;
  3522. }
  3523. return 1;
  3524. }
  3525. static int ASN1CALL ASN1Enc_G7231AnnexCCapability_g723AnnexCAudioMode(ASN1encoding_t enc, G7231AnnexCCapability_g723AnnexCAudioMode *val)
  3526. {
  3527. if (!ASN1PEREncExtensionBitClear(enc))
  3528. return 0;
  3529. if (!ASN1PEREncBitVal(enc, 6, (val)->highRateMode0 - 27))
  3530. return 0;
  3531. if (!ASN1PEREncBitVal(enc, 6, (val)->highRateMode1 - 27))
  3532. return 0;
  3533. if (!ASN1PEREncBitVal(enc, 6, (val)->lowRateMode0 - 23))
  3534. return 0;
  3535. if (!ASN1PEREncBitVal(enc, 6, (val)->lowRateMode1 - 23))
  3536. return 0;
  3537. if (!ASN1PEREncBitVal(enc, 4, (val)->sidMode0 - 6))
  3538. return 0;
  3539. if (!ASN1PEREncBitVal(enc, 4, (val)->sidMode1 - 6))
  3540. return 0;
  3541. return 1;
  3542. }
  3543. static int ASN1CALL ASN1Dec_G7231AnnexCCapability_g723AnnexCAudioMode(ASN1decoding_t dec, G7231AnnexCCapability_g723AnnexCAudioMode *val)
  3544. {
  3545. ASN1uint32_t y;
  3546. if (!ASN1PERDecExtensionBit(dec, &y))
  3547. return 0;
  3548. if (!ASN1PERDecU16Val(dec, 6, &(val)->highRateMode0))
  3549. return 0;
  3550. (val)->highRateMode0 += 27;
  3551. if (!ASN1PERDecU16Val(dec, 6, &(val)->highRateMode1))
  3552. return 0;
  3553. (val)->highRateMode1 += 27;
  3554. if (!ASN1PERDecU16Val(dec, 6, &(val)->lowRateMode0))
  3555. return 0;
  3556. (val)->lowRateMode0 += 23;
  3557. if (!ASN1PERDecU16Val(dec, 6, &(val)->lowRateMode1))
  3558. return 0;
  3559. (val)->lowRateMode1 += 23;
  3560. if (!ASN1PERDecU16Val(dec, 4, &(val)->sidMode0))
  3561. return 0;
  3562. (val)->sidMode0 += 6;
  3563. if (!ASN1PERDecU16Val(dec, 4, &(val)->sidMode1))
  3564. return 0;
  3565. (val)->sidMode1 += 6;
  3566. if (y) {
  3567. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3568. return 0;
  3569. }
  3570. return 1;
  3571. }
  3572. static int ASN1CALL ASN1Enc_AudioCapability_g7231(ASN1encoding_t enc, AudioCapability_g7231 *val)
  3573. {
  3574. ASN1PEREncAlignment(enc);
  3575. if (!ASN1PEREncBitVal(enc, 8, (val)->maxAl_sduAudioFrames - 1))
  3576. return 0;
  3577. if (!ASN1PEREncBoolean(enc, (val)->silenceSuppression))
  3578. return 0;
  3579. return 1;
  3580. }
  3581. static int ASN1CALL ASN1Dec_AudioCapability_g7231(ASN1decoding_t dec, AudioCapability_g7231 *val)
  3582. {
  3583. ASN1PERDecAlignment(dec);
  3584. if (!ASN1PERDecU16Val(dec, 8, &(val)->maxAl_sduAudioFrames))
  3585. return 0;
  3586. (val)->maxAl_sduAudioFrames += 1;
  3587. if (!ASN1PERDecBoolean(dec, &(val)->silenceSuppression))
  3588. return 0;
  3589. return 1;
  3590. }
  3591. static int ASN1CALL ASN1Enc_CustomPictureFormat_pixelAspectInformation(ASN1encoding_t enc, CustomPictureFormat_pixelAspectInformation *val)
  3592. {
  3593. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  3594. return 0;
  3595. switch ((val)->choice) {
  3596. case 1:
  3597. if (!ASN1PEREncBoolean(enc, (val)->u.anyPixelAspectRatio))
  3598. return 0;
  3599. break;
  3600. case 2:
  3601. if (!ASN1Enc_CustomPictureFormat_pixelAspectInformation_pixelAspectCode(enc, &(val)->u.pixelAspectCode))
  3602. return 0;
  3603. break;
  3604. case 3:
  3605. if (!ASN1Enc_CustomPictureFormat_pixelAspectInformation_extendedPAR(enc, &(val)->u.extendedPAR))
  3606. return 0;
  3607. break;
  3608. default:
  3609. /* impossible */
  3610. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  3611. return 0;
  3612. }
  3613. return 1;
  3614. }
  3615. static int ASN1CALL ASN1Dec_CustomPictureFormat_pixelAspectInformation(ASN1decoding_t dec, CustomPictureFormat_pixelAspectInformation *val)
  3616. {
  3617. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  3618. return 0;
  3619. switch ((val)->choice) {
  3620. case 1:
  3621. if (!ASN1PERDecBoolean(dec, &(val)->u.anyPixelAspectRatio))
  3622. return 0;
  3623. break;
  3624. case 2:
  3625. if (!ASN1Dec_CustomPictureFormat_pixelAspectInformation_pixelAspectCode(dec, &(val)->u.pixelAspectCode))
  3626. return 0;
  3627. break;
  3628. case 3:
  3629. if (!ASN1Dec_CustomPictureFormat_pixelAspectInformation_extendedPAR(dec, &(val)->u.extendedPAR))
  3630. return 0;
  3631. break;
  3632. case 0:
  3633. /* extension case */
  3634. if (!ASN1PERDecSkipFragmented(dec, 8))
  3635. return 0;
  3636. break;
  3637. default:
  3638. /* impossible */
  3639. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  3640. return 0;
  3641. }
  3642. return 1;
  3643. }
  3644. static void ASN1CALL ASN1Free_CustomPictureFormat_pixelAspectInformation(CustomPictureFormat_pixelAspectInformation *val)
  3645. {
  3646. if (val) {
  3647. switch ((val)->choice) {
  3648. case 2:
  3649. ASN1Free_CustomPictureFormat_pixelAspectInformation_pixelAspectCode(&(val)->u.pixelAspectCode);
  3650. break;
  3651. case 3:
  3652. ASN1Free_CustomPictureFormat_pixelAspectInformation_extendedPAR(&(val)->u.extendedPAR);
  3653. break;
  3654. }
  3655. }
  3656. }
  3657. static int ASN1CALL ASN1Enc_CustomPictureFormat_mPI(ASN1encoding_t enc, CustomPictureFormat_mPI *val)
  3658. {
  3659. if (!ASN1PEREncExtensionBitClear(enc))
  3660. return 0;
  3661. if (!ASN1PEREncBits(enc, 2, (val)->o))
  3662. return 0;
  3663. if ((val)->o[0] & 0x80) {
  3664. if (!ASN1PEREncBitVal(enc, 5, (val)->standardMPI - 1))
  3665. return 0;
  3666. }
  3667. if ((val)->o[0] & 0x40) {
  3668. if (!ASN1Enc_CustomPictureFormat_mPI_customPCF(enc, &(val)->customPCF))
  3669. return 0;
  3670. }
  3671. return 1;
  3672. }
  3673. static int ASN1CALL ASN1Dec_CustomPictureFormat_mPI(ASN1decoding_t dec, CustomPictureFormat_mPI *val)
  3674. {
  3675. ASN1uint32_t y;
  3676. if (!ASN1PERDecExtensionBit(dec, &y))
  3677. return 0;
  3678. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  3679. return 0;
  3680. if ((val)->o[0] & 0x80) {
  3681. if (!ASN1PERDecU16Val(dec, 5, &(val)->standardMPI))
  3682. return 0;
  3683. (val)->standardMPI += 1;
  3684. }
  3685. if ((val)->o[0] & 0x40) {
  3686. if (!ASN1Dec_CustomPictureFormat_mPI_customPCF(dec, &(val)->customPCF))
  3687. return 0;
  3688. }
  3689. if (y) {
  3690. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3691. return 0;
  3692. }
  3693. return 1;
  3694. }
  3695. static void ASN1CALL ASN1Free_CustomPictureFormat_mPI(CustomPictureFormat_mPI *val)
  3696. {
  3697. if (val) {
  3698. if ((val)->o[0] & 0x40) {
  3699. ASN1Free_CustomPictureFormat_mPI_customPCF(&(val)->customPCF);
  3700. }
  3701. }
  3702. }
  3703. static int ASN1CALL ASN1Enc_RefPictureSelection_videoBackChannelSend(ASN1encoding_t enc, RefPictureSelection_videoBackChannelSend *val)
  3704. {
  3705. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  3706. return 0;
  3707. return 1;
  3708. }
  3709. static int ASN1CALL ASN1Dec_RefPictureSelection_videoBackChannelSend(ASN1decoding_t dec, RefPictureSelection_videoBackChannelSend *val)
  3710. {
  3711. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  3712. return 0;
  3713. return 1;
  3714. }
  3715. static int ASN1CALL ASN1Enc_RefPictureSelection_additionalPictureMemory(ASN1encoding_t enc, RefPictureSelection_additionalPictureMemory *val)
  3716. {
  3717. if (!ASN1PEREncExtensionBitClear(enc))
  3718. return 0;
  3719. if (!ASN1PEREncBits(enc, 6, (val)->o))
  3720. return 0;
  3721. if ((val)->o[0] & 0x80) {
  3722. ASN1PEREncAlignment(enc);
  3723. if (!ASN1PEREncBitVal(enc, 8, (val)->sqcifAdditionalPictureMemory - 1))
  3724. return 0;
  3725. }
  3726. if ((val)->o[0] & 0x40) {
  3727. ASN1PEREncAlignment(enc);
  3728. if (!ASN1PEREncBitVal(enc, 8, (val)->qcifAdditionalPictureMemory - 1))
  3729. return 0;
  3730. }
  3731. if ((val)->o[0] & 0x20) {
  3732. ASN1PEREncAlignment(enc);
  3733. if (!ASN1PEREncBitVal(enc, 8, (val)->cifAdditionalPictureMemory - 1))
  3734. return 0;
  3735. }
  3736. if ((val)->o[0] & 0x10) {
  3737. ASN1PEREncAlignment(enc);
  3738. if (!ASN1PEREncBitVal(enc, 8, (val)->cif4AdditionalPictureMemory - 1))
  3739. return 0;
  3740. }
  3741. if ((val)->o[0] & 0x8) {
  3742. ASN1PEREncAlignment(enc);
  3743. if (!ASN1PEREncBitVal(enc, 8, (val)->cif16AdditionalPictureMemory - 1))
  3744. return 0;
  3745. }
  3746. if ((val)->o[0] & 0x4) {
  3747. ASN1PEREncAlignment(enc);
  3748. if (!ASN1PEREncBitVal(enc, 8, (val)->bigCpfAdditionalPictureMemory - 1))
  3749. return 0;
  3750. }
  3751. return 1;
  3752. }
  3753. static int ASN1CALL ASN1Dec_RefPictureSelection_additionalPictureMemory(ASN1decoding_t dec, RefPictureSelection_additionalPictureMemory *val)
  3754. {
  3755. ASN1uint32_t y;
  3756. if (!ASN1PERDecExtensionBit(dec, &y))
  3757. return 0;
  3758. if (!ASN1PERDecExtension(dec, 6, (val)->o))
  3759. return 0;
  3760. if ((val)->o[0] & 0x80) {
  3761. ASN1PERDecAlignment(dec);
  3762. if (!ASN1PERDecU16Val(dec, 8, &(val)->sqcifAdditionalPictureMemory))
  3763. return 0;
  3764. (val)->sqcifAdditionalPictureMemory += 1;
  3765. }
  3766. if ((val)->o[0] & 0x40) {
  3767. ASN1PERDecAlignment(dec);
  3768. if (!ASN1PERDecU16Val(dec, 8, &(val)->qcifAdditionalPictureMemory))
  3769. return 0;
  3770. (val)->qcifAdditionalPictureMemory += 1;
  3771. }
  3772. if ((val)->o[0] & 0x20) {
  3773. ASN1PERDecAlignment(dec);
  3774. if (!ASN1PERDecU16Val(dec, 8, &(val)->cifAdditionalPictureMemory))
  3775. return 0;
  3776. (val)->cifAdditionalPictureMemory += 1;
  3777. }
  3778. if ((val)->o[0] & 0x10) {
  3779. ASN1PERDecAlignment(dec);
  3780. if (!ASN1PERDecU16Val(dec, 8, &(val)->cif4AdditionalPictureMemory))
  3781. return 0;
  3782. (val)->cif4AdditionalPictureMemory += 1;
  3783. }
  3784. if ((val)->o[0] & 0x8) {
  3785. ASN1PERDecAlignment(dec);
  3786. if (!ASN1PERDecU16Val(dec, 8, &(val)->cif16AdditionalPictureMemory))
  3787. return 0;
  3788. (val)->cif16AdditionalPictureMemory += 1;
  3789. }
  3790. if ((val)->o[0] & 0x4) {
  3791. ASN1PERDecAlignment(dec);
  3792. if (!ASN1PERDecU16Val(dec, 8, &(val)->bigCpfAdditionalPictureMemory))
  3793. return 0;
  3794. (val)->bigCpfAdditionalPictureMemory += 1;
  3795. }
  3796. if (y) {
  3797. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3798. return 0;
  3799. }
  3800. return 1;
  3801. }
  3802. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyFrameMapping_frameSequence(ASN1encoding_t enc, RTPH263VideoRedundancyFrameMapping_frameSequence *val)
  3803. {
  3804. ASN1uint32_t i;
  3805. ASN1PEREncAlignment(enc);
  3806. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  3807. return 0;
  3808. for (i = 0; i < (val)->count; i++) {
  3809. ASN1PEREncAlignment(enc);
  3810. if (!ASN1PEREncBitVal(enc, 8, ((val)->value)[i]))
  3811. return 0;
  3812. }
  3813. return 1;
  3814. }
  3815. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyFrameMapping_frameSequence(ASN1decoding_t dec, RTPH263VideoRedundancyFrameMapping_frameSequence *val)
  3816. {
  3817. ASN1uint32_t i;
  3818. ASN1PERDecAlignment(dec);
  3819. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  3820. return 0;
  3821. (val)->count += 1;
  3822. for (i = 0; i < (val)->count; i++) {
  3823. ASN1PERDecAlignment(dec);
  3824. if (!ASN1PERDecU16Val(dec, 8, &((val)->value)[i]))
  3825. return 0;
  3826. }
  3827. return 1;
  3828. }
  3829. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyFrameMapping_frameSequence(RTPH263VideoRedundancyFrameMapping_frameSequence *val)
  3830. {
  3831. if (val) {
  3832. }
  3833. }
  3834. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyEncoding_containedThreads(ASN1encoding_t enc, RTPH263VideoRedundancyEncoding_containedThreads *val)
  3835. {
  3836. ASN1uint32_t i;
  3837. ASN1PEREncAlignment(enc);
  3838. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  3839. return 0;
  3840. for (i = 0; i < (val)->count; i++) {
  3841. if (!ASN1PEREncBitVal(enc, 4, ((val)->value)[i]))
  3842. return 0;
  3843. }
  3844. return 1;
  3845. }
  3846. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyEncoding_containedThreads(ASN1decoding_t dec, RTPH263VideoRedundancyEncoding_containedThreads *val)
  3847. {
  3848. ASN1uint32_t i;
  3849. ASN1PERDecAlignment(dec);
  3850. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  3851. return 0;
  3852. (val)->count += 1;
  3853. for (i = 0; i < (val)->count; i++) {
  3854. if (!ASN1PERDecU16Val(dec, 4, &((val)->value)[i]))
  3855. return 0;
  3856. }
  3857. return 1;
  3858. }
  3859. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyEncoding_containedThreads(RTPH263VideoRedundancyEncoding_containedThreads *val)
  3860. {
  3861. if (val) {
  3862. }
  3863. }
  3864. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyEncoding_frameToThreadMapping(ASN1encoding_t enc, RTPH263VideoRedundancyEncoding_frameToThreadMapping *val)
  3865. {
  3866. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  3867. return 0;
  3868. switch ((val)->choice) {
  3869. case 1:
  3870. break;
  3871. case 2:
  3872. if (!ASN1Enc_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom(enc, &(val)->u.custom))
  3873. return 0;
  3874. break;
  3875. default:
  3876. /* impossible */
  3877. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  3878. return 0;
  3879. }
  3880. return 1;
  3881. }
  3882. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyEncoding_frameToThreadMapping(ASN1decoding_t dec, RTPH263VideoRedundancyEncoding_frameToThreadMapping *val)
  3883. {
  3884. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  3885. return 0;
  3886. switch ((val)->choice) {
  3887. case 1:
  3888. break;
  3889. case 2:
  3890. if (!ASN1Dec_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom(dec, &(val)->u.custom))
  3891. return 0;
  3892. break;
  3893. case 0:
  3894. /* extension case */
  3895. if (!ASN1PERDecSkipFragmented(dec, 8))
  3896. return 0;
  3897. break;
  3898. default:
  3899. /* impossible */
  3900. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  3901. return 0;
  3902. }
  3903. return 1;
  3904. }
  3905. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyEncoding_frameToThreadMapping(RTPH263VideoRedundancyEncoding_frameToThreadMapping *val)
  3906. {
  3907. if (val) {
  3908. switch ((val)->choice) {
  3909. case 2:
  3910. ASN1Free_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom(&(val)->u.custom);
  3911. break;
  3912. }
  3913. }
  3914. }
  3915. static int ASN1CALL ASN1Enc_RedundancyEncodingCapability_secondaryEncoding(ASN1encoding_t enc, PRedundancyEncodingCapability_secondaryEncoding *val)
  3916. {
  3917. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_RedundancyEncodingCapability_secondaryEncoding_ElmFn, 1, 256, 8);
  3918. }
  3919. static int ASN1CALL ASN1Enc_RedundancyEncodingCapability_secondaryEncoding_ElmFn(ASN1encoding_t enc, PRedundancyEncodingCapability_secondaryEncoding val)
  3920. {
  3921. if (!ASN1PEREncUnsignedShort(enc, val->value - 1))
  3922. return 0;
  3923. return 1;
  3924. }
  3925. static int ASN1CALL ASN1Dec_RedundancyEncodingCapability_secondaryEncoding(ASN1decoding_t dec, PRedundancyEncodingCapability_secondaryEncoding *val)
  3926. {
  3927. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_RedundancyEncodingCapability_secondaryEncoding_ElmFn, sizeof(**val), 1, 256, 8);
  3928. }
  3929. static int ASN1CALL ASN1Dec_RedundancyEncodingCapability_secondaryEncoding_ElmFn(ASN1decoding_t dec, PRedundancyEncodingCapability_secondaryEncoding val)
  3930. {
  3931. if (!ASN1PERDecUnsignedShort(dec, &val->value))
  3932. return 0;
  3933. val->value += 1;
  3934. return 1;
  3935. }
  3936. static void ASN1CALL ASN1Free_RedundancyEncodingCapability_secondaryEncoding(PRedundancyEncodingCapability_secondaryEncoding *val)
  3937. {
  3938. if (val) {
  3939. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_RedundancyEncodingCapability_secondaryEncoding_ElmFn);
  3940. }
  3941. }
  3942. static void ASN1CALL ASN1Free_RedundancyEncodingCapability_secondaryEncoding_ElmFn(PRedundancyEncodingCapability_secondaryEncoding val)
  3943. {
  3944. if (val) {
  3945. }
  3946. }
  3947. static int ASN1CALL ASN1Enc_H2250Capability_mcCapability(ASN1encoding_t enc, H2250Capability_mcCapability *val)
  3948. {
  3949. if (!ASN1PEREncExtensionBitClear(enc))
  3950. return 0;
  3951. if (!ASN1PEREncBoolean(enc, (val)->centralizedConferenceMC))
  3952. return 0;
  3953. if (!ASN1PEREncBoolean(enc, (val)->decentralizedConferenceMC))
  3954. return 0;
  3955. return 1;
  3956. }
  3957. static int ASN1CALL ASN1Dec_H2250Capability_mcCapability(ASN1decoding_t dec, H2250Capability_mcCapability *val)
  3958. {
  3959. ASN1uint32_t y;
  3960. if (!ASN1PERDecExtensionBit(dec, &y))
  3961. return 0;
  3962. if (!ASN1PERDecBoolean(dec, &(val)->centralizedConferenceMC))
  3963. return 0;
  3964. if (!ASN1PERDecBoolean(dec, &(val)->decentralizedConferenceMC))
  3965. return 0;
  3966. if (y) {
  3967. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3968. return 0;
  3969. }
  3970. return 1;
  3971. }
  3972. static int ASN1CALL ASN1Enc_H223Capability_mobileOperationTransmitCapability(ASN1encoding_t enc, H223Capability_mobileOperationTransmitCapability *val)
  3973. {
  3974. if (!ASN1PEREncExtensionBitClear(enc))
  3975. return 0;
  3976. if (!ASN1PEREncBoolean(enc, (val)->modeChangeCapability))
  3977. return 0;
  3978. if (!ASN1PEREncBoolean(enc, (val)->h223AnnexA))
  3979. return 0;
  3980. if (!ASN1PEREncBoolean(enc, (val)->h223AnnexADoubleFlag))
  3981. return 0;
  3982. if (!ASN1PEREncBoolean(enc, (val)->h223AnnexB))
  3983. return 0;
  3984. if (!ASN1PEREncBoolean(enc, (val)->h223AnnexBwithHeader))
  3985. return 0;
  3986. return 1;
  3987. }
  3988. static int ASN1CALL ASN1Dec_H223Capability_mobileOperationTransmitCapability(ASN1decoding_t dec, H223Capability_mobileOperationTransmitCapability *val)
  3989. {
  3990. ASN1uint32_t y;
  3991. if (!ASN1PERDecExtensionBit(dec, &y))
  3992. return 0;
  3993. if (!ASN1PERDecBoolean(dec, &(val)->modeChangeCapability))
  3994. return 0;
  3995. if (!ASN1PERDecBoolean(dec, &(val)->h223AnnexA))
  3996. return 0;
  3997. if (!ASN1PERDecBoolean(dec, &(val)->h223AnnexADoubleFlag))
  3998. return 0;
  3999. if (!ASN1PERDecBoolean(dec, &(val)->h223AnnexB))
  4000. return 0;
  4001. if (!ASN1PERDecBoolean(dec, &(val)->h223AnnexBwithHeader))
  4002. return 0;
  4003. if (y) {
  4004. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4005. return 0;
  4006. }
  4007. return 1;
  4008. }
  4009. static int ASN1CALL ASN1Enc_H223Capability_h223MultiplexTableCapability(ASN1encoding_t enc, H223Capability_h223MultiplexTableCapability *val)
  4010. {
  4011. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  4012. return 0;
  4013. switch ((val)->choice) {
  4014. case 1:
  4015. break;
  4016. case 2:
  4017. if (!ASN1Enc_H223Capability_h223MultiplexTableCapability_enhanced(enc, &(val)->u.enhanced))
  4018. return 0;
  4019. break;
  4020. default:
  4021. /* impossible */
  4022. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  4023. return 0;
  4024. }
  4025. return 1;
  4026. }
  4027. static int ASN1CALL ASN1Dec_H223Capability_h223MultiplexTableCapability(ASN1decoding_t dec, H223Capability_h223MultiplexTableCapability *val)
  4028. {
  4029. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  4030. return 0;
  4031. switch ((val)->choice) {
  4032. case 1:
  4033. break;
  4034. case 2:
  4035. if (!ASN1Dec_H223Capability_h223MultiplexTableCapability_enhanced(dec, &(val)->u.enhanced))
  4036. return 0;
  4037. break;
  4038. default:
  4039. /* impossible */
  4040. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  4041. return 0;
  4042. }
  4043. return 1;
  4044. }
  4045. static int ASN1CALL ASN1Enc_VCCapability_availableBitRates(ASN1encoding_t enc, VCCapability_availableBitRates *val)
  4046. {
  4047. if (!ASN1PEREncExtensionBitClear(enc))
  4048. return 0;
  4049. if (!ASN1Enc_VCCapability_availableBitRates_type(enc, &(val)->type))
  4050. return 0;
  4051. return 1;
  4052. }
  4053. static int ASN1CALL ASN1Dec_VCCapability_availableBitRates(ASN1decoding_t dec, VCCapability_availableBitRates *val)
  4054. {
  4055. ASN1uint32_t y;
  4056. if (!ASN1PERDecExtensionBit(dec, &y))
  4057. return 0;
  4058. if (!ASN1Dec_VCCapability_availableBitRates_type(dec, &(val)->type))
  4059. return 0;
  4060. if (y) {
  4061. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4062. return 0;
  4063. }
  4064. return 1;
  4065. }
  4066. static int ASN1CALL ASN1Enc_VCCapability_aal5(ASN1encoding_t enc, VCCapability_aal5 *val)
  4067. {
  4068. if (!ASN1PEREncExtensionBitClear(enc))
  4069. return 0;
  4070. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardMaximumSDUSize))
  4071. return 0;
  4072. if (!ASN1PEREncUnsignedShort(enc, (val)->backwardMaximumSDUSize))
  4073. return 0;
  4074. return 1;
  4075. }
  4076. static int ASN1CALL ASN1Dec_VCCapability_aal5(ASN1decoding_t dec, VCCapability_aal5 *val)
  4077. {
  4078. ASN1uint32_t y;
  4079. if (!ASN1PERDecExtensionBit(dec, &y))
  4080. return 0;
  4081. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardMaximumSDUSize))
  4082. return 0;
  4083. if (!ASN1PERDecUnsignedShort(dec, &(val)->backwardMaximumSDUSize))
  4084. return 0;
  4085. if (y) {
  4086. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4087. return 0;
  4088. }
  4089. return 1;
  4090. }
  4091. static int ASN1CALL ASN1Enc_VCCapability_aal1(ASN1encoding_t enc, VCCapability_aal1 *val)
  4092. {
  4093. if (!ASN1PEREncExtensionBitClear(enc))
  4094. return 0;
  4095. if (!ASN1PEREncBoolean(enc, (val)->nullClockRecovery))
  4096. return 0;
  4097. if (!ASN1PEREncBoolean(enc, (val)->srtsClockRecovery))
  4098. return 0;
  4099. if (!ASN1PEREncBoolean(enc, (val)->adaptiveClockRecovery))
  4100. return 0;
  4101. if (!ASN1PEREncBoolean(enc, (val)->nullErrorCorrection))
  4102. return 0;
  4103. if (!ASN1PEREncBoolean(enc, (val)->longInterleaver))
  4104. return 0;
  4105. if (!ASN1PEREncBoolean(enc, (val)->shortInterleaver))
  4106. return 0;
  4107. if (!ASN1PEREncBoolean(enc, (val)->errorCorrectionOnly))
  4108. return 0;
  4109. if (!ASN1PEREncBoolean(enc, (val)->structuredDataTransfer))
  4110. return 0;
  4111. if (!ASN1PEREncBoolean(enc, (val)->partiallyFilledCells))
  4112. return 0;
  4113. return 1;
  4114. }
  4115. static int ASN1CALL ASN1Dec_VCCapability_aal1(ASN1decoding_t dec, VCCapability_aal1 *val)
  4116. {
  4117. ASN1uint32_t y;
  4118. if (!ASN1PERDecExtensionBit(dec, &y))
  4119. return 0;
  4120. if (!ASN1PERDecBoolean(dec, &(val)->nullClockRecovery))
  4121. return 0;
  4122. if (!ASN1PERDecBoolean(dec, &(val)->srtsClockRecovery))
  4123. return 0;
  4124. if (!ASN1PERDecBoolean(dec, &(val)->adaptiveClockRecovery))
  4125. return 0;
  4126. if (!ASN1PERDecBoolean(dec, &(val)->nullErrorCorrection))
  4127. return 0;
  4128. if (!ASN1PERDecBoolean(dec, &(val)->longInterleaver))
  4129. return 0;
  4130. if (!ASN1PERDecBoolean(dec, &(val)->shortInterleaver))
  4131. return 0;
  4132. if (!ASN1PERDecBoolean(dec, &(val)->errorCorrectionOnly))
  4133. return 0;
  4134. if (!ASN1PERDecBoolean(dec, &(val)->structuredDataTransfer))
  4135. return 0;
  4136. if (!ASN1PERDecBoolean(dec, &(val)->partiallyFilledCells))
  4137. return 0;
  4138. if (y) {
  4139. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4140. return 0;
  4141. }
  4142. return 1;
  4143. }
  4144. static int ASN1CALL ASN1Enc_Capability_h233EncryptionReceiveCapability(ASN1encoding_t enc, Capability_h233EncryptionReceiveCapability *val)
  4145. {
  4146. if (!ASN1PEREncExtensionBitClear(enc))
  4147. return 0;
  4148. ASN1PEREncAlignment(enc);
  4149. if (!ASN1PEREncBitVal(enc, 8, (val)->h233IVResponseTime))
  4150. return 0;
  4151. return 1;
  4152. }
  4153. static int ASN1CALL ASN1Dec_Capability_h233EncryptionReceiveCapability(ASN1decoding_t dec, Capability_h233EncryptionReceiveCapability *val)
  4154. {
  4155. ASN1uint32_t y;
  4156. if (!ASN1PERDecExtensionBit(dec, &y))
  4157. return 0;
  4158. ASN1PERDecAlignment(dec);
  4159. if (!ASN1PERDecU16Val(dec, 8, &(val)->h233IVResponseTime))
  4160. return 0;
  4161. if (y) {
  4162. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4163. return 0;
  4164. }
  4165. return 1;
  4166. }
  4167. static int ASN1CALL ASN1Enc_TerminalCapabilitySetReject_cause(ASN1encoding_t enc, TerminalCapabilitySetReject_cause *val)
  4168. {
  4169. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  4170. return 0;
  4171. switch ((val)->choice) {
  4172. case 1:
  4173. break;
  4174. case 2:
  4175. break;
  4176. case 3:
  4177. break;
  4178. case 4:
  4179. if (!ASN1Enc_TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded(enc, &(val)->u.tableEntryCapacityExceeded))
  4180. return 0;
  4181. break;
  4182. default:
  4183. /* impossible */
  4184. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  4185. return 0;
  4186. }
  4187. return 1;
  4188. }
  4189. static int ASN1CALL ASN1Dec_TerminalCapabilitySetReject_cause(ASN1decoding_t dec, TerminalCapabilitySetReject_cause *val)
  4190. {
  4191. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  4192. return 0;
  4193. switch ((val)->choice) {
  4194. case 1:
  4195. break;
  4196. case 2:
  4197. break;
  4198. case 3:
  4199. break;
  4200. case 4:
  4201. if (!ASN1Dec_TerminalCapabilitySetReject_cause_tableEntryCapacityExceeded(dec, &(val)->u.tableEntryCapacityExceeded))
  4202. return 0;
  4203. break;
  4204. case 0:
  4205. /* extension case */
  4206. if (!ASN1PERDecSkipFragmented(dec, 8))
  4207. return 0;
  4208. break;
  4209. default:
  4210. /* impossible */
  4211. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  4212. return 0;
  4213. }
  4214. return 1;
  4215. }
  4216. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationReject_cause(ASN1encoding_t enc, MasterSlaveDeterminationReject_cause *val)
  4217. {
  4218. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 0))
  4219. return 0;
  4220. return 1;
  4221. }
  4222. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationReject_cause(ASN1decoding_t dec, MasterSlaveDeterminationReject_cause *val)
  4223. {
  4224. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 0))
  4225. return 0;
  4226. return 1;
  4227. }
  4228. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationAck_decision(ASN1encoding_t enc, MasterSlaveDeterminationAck_decision *val)
  4229. {
  4230. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  4231. return 0;
  4232. return 1;
  4233. }
  4234. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationAck_decision(ASN1decoding_t dec, MasterSlaveDeterminationAck_decision *val)
  4235. {
  4236. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  4237. return 0;
  4238. return 1;
  4239. }
  4240. static int ASN1CALL ASN1Enc_NonStandardIdentifier_h221NonStandard(ASN1encoding_t enc, NonStandardIdentifier_h221NonStandard *val)
  4241. {
  4242. ASN1PEREncAlignment(enc);
  4243. if (!ASN1PEREncBitVal(enc, 8, (val)->t35CountryCode))
  4244. return 0;
  4245. ASN1PEREncAlignment(enc);
  4246. if (!ASN1PEREncBitVal(enc, 8, (val)->t35Extension))
  4247. return 0;
  4248. if (!ASN1PEREncUnsignedShort(enc, (val)->manufacturerCode))
  4249. return 0;
  4250. return 1;
  4251. }
  4252. static int ASN1CALL ASN1Dec_NonStandardIdentifier_h221NonStandard(ASN1decoding_t dec, NonStandardIdentifier_h221NonStandard *val)
  4253. {
  4254. ASN1PERDecAlignment(dec);
  4255. if (!ASN1PERDecU16Val(dec, 8, &(val)->t35CountryCode))
  4256. return 0;
  4257. ASN1PERDecAlignment(dec);
  4258. if (!ASN1PERDecU16Val(dec, 8, &(val)->t35Extension))
  4259. return 0;
  4260. if (!ASN1PERDecUnsignedShort(dec, &(val)->manufacturerCode))
  4261. return 0;
  4262. return 1;
  4263. }
  4264. static int ASN1CALL ASN1Enc_NonStandardIdentifier(ASN1encoding_t enc, NonStandardIdentifier *val)
  4265. {
  4266. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  4267. return 0;
  4268. switch ((val)->choice) {
  4269. case 1:
  4270. if (!ASN1PEREncObjectIdentifier(enc, &(val)->u.object))
  4271. return 0;
  4272. break;
  4273. case 2:
  4274. if (!ASN1Enc_NonStandardIdentifier_h221NonStandard(enc, &(val)->u.h221NonStandard))
  4275. return 0;
  4276. break;
  4277. default:
  4278. /* impossible */
  4279. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  4280. return 0;
  4281. }
  4282. return 1;
  4283. }
  4284. static int ASN1CALL ASN1Dec_NonStandardIdentifier(ASN1decoding_t dec, NonStandardIdentifier *val)
  4285. {
  4286. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  4287. return 0;
  4288. switch ((val)->choice) {
  4289. case 1:
  4290. if (!ASN1PERDecObjectIdentifier(dec, &(val)->u.object))
  4291. return 0;
  4292. break;
  4293. case 2:
  4294. if (!ASN1Dec_NonStandardIdentifier_h221NonStandard(dec, &(val)->u.h221NonStandard))
  4295. return 0;
  4296. break;
  4297. default:
  4298. /* impossible */
  4299. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  4300. return 0;
  4301. }
  4302. return 1;
  4303. }
  4304. static void ASN1CALL ASN1Free_NonStandardIdentifier(NonStandardIdentifier *val)
  4305. {
  4306. if (val) {
  4307. switch ((val)->choice) {
  4308. case 1:
  4309. ASN1objectidentifier_free(&(val)->u.object);
  4310. break;
  4311. }
  4312. }
  4313. }
  4314. static int ASN1CALL ASN1Enc_MasterSlaveDetermination(ASN1encoding_t enc, MasterSlaveDetermination *val)
  4315. {
  4316. ASN1uint32_t l;
  4317. if (!ASN1PEREncExtensionBitClear(enc))
  4318. return 0;
  4319. ASN1PEREncAlignment(enc);
  4320. if (!ASN1PEREncBitVal(enc, 8, (val)->terminalType))
  4321. return 0;
  4322. l = ASN1uint32_uoctets((val)->statusDeterminationNumber);
  4323. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  4324. return 0;
  4325. ASN1PEREncAlignment(enc);
  4326. if (!ASN1PEREncBitVal(enc, l * 8, (val)->statusDeterminationNumber))
  4327. return 0;
  4328. return 1;
  4329. }
  4330. static int ASN1CALL ASN1Dec_MasterSlaveDetermination(ASN1decoding_t dec, MasterSlaveDetermination *val)
  4331. {
  4332. ASN1uint32_t y;
  4333. ASN1uint32_t l;
  4334. if (!ASN1PERDecExtensionBit(dec, &y))
  4335. return 0;
  4336. ASN1PERDecAlignment(dec);
  4337. if (!ASN1PERDecU16Val(dec, 8, &(val)->terminalType))
  4338. return 0;
  4339. if (!ASN1PERDecU32Val(dec, 2, &l))
  4340. return 0;
  4341. l += 1;
  4342. ASN1PERDecAlignment(dec);
  4343. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->statusDeterminationNumber))
  4344. return 0;
  4345. if (y) {
  4346. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4347. return 0;
  4348. }
  4349. return 1;
  4350. }
  4351. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationAck(ASN1encoding_t enc, MasterSlaveDeterminationAck *val)
  4352. {
  4353. if (!ASN1PEREncExtensionBitClear(enc))
  4354. return 0;
  4355. if (!ASN1Enc_MasterSlaveDeterminationAck_decision(enc, &(val)->decision))
  4356. return 0;
  4357. return 1;
  4358. }
  4359. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationAck(ASN1decoding_t dec, MasterSlaveDeterminationAck *val)
  4360. {
  4361. ASN1uint32_t y;
  4362. if (!ASN1PERDecExtensionBit(dec, &y))
  4363. return 0;
  4364. if (!ASN1Dec_MasterSlaveDeterminationAck_decision(dec, &(val)->decision))
  4365. return 0;
  4366. if (y) {
  4367. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4368. return 0;
  4369. }
  4370. return 1;
  4371. }
  4372. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationReject(ASN1encoding_t enc, MasterSlaveDeterminationReject *val)
  4373. {
  4374. if (!ASN1PEREncExtensionBitClear(enc))
  4375. return 0;
  4376. if (!ASN1Enc_MasterSlaveDeterminationReject_cause(enc, &(val)->cause))
  4377. return 0;
  4378. return 1;
  4379. }
  4380. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationReject(ASN1decoding_t dec, MasterSlaveDeterminationReject *val)
  4381. {
  4382. ASN1uint32_t y;
  4383. if (!ASN1PERDecExtensionBit(dec, &y))
  4384. return 0;
  4385. if (!ASN1Dec_MasterSlaveDeterminationReject_cause(dec, &(val)->cause))
  4386. return 0;
  4387. if (y) {
  4388. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4389. return 0;
  4390. }
  4391. return 1;
  4392. }
  4393. static int ASN1CALL ASN1Enc_MasterSlaveDeterminationRelease(ASN1encoding_t enc, MasterSlaveDeterminationRelease *val)
  4394. {
  4395. if (!ASN1PEREncExtensionBitClear(enc))
  4396. return 0;
  4397. return 1;
  4398. }
  4399. static int ASN1CALL ASN1Dec_MasterSlaveDeterminationRelease(ASN1decoding_t dec, MasterSlaveDeterminationRelease *val)
  4400. {
  4401. ASN1uint32_t y;
  4402. if (!ASN1PERDecExtensionBit(dec, &y))
  4403. return 0;
  4404. if (y) {
  4405. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4406. return 0;
  4407. }
  4408. return 1;
  4409. }
  4410. static int ASN1CALL ASN1Enc_CapabilityDescriptor(ASN1encoding_t enc, CapabilityDescriptor *val)
  4411. {
  4412. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4413. return 0;
  4414. ASN1PEREncAlignment(enc);
  4415. if (!ASN1PEREncBitVal(enc, 8, (val)->capabilityDescriptorNumber))
  4416. return 0;
  4417. if ((val)->o[0] & 0x80) {
  4418. if (!ASN1Enc_CapabilityDescriptor_simultaneousCapabilities(enc, &(val)->simultaneousCapabilities))
  4419. return 0;
  4420. }
  4421. return 1;
  4422. }
  4423. static int ASN1CALL ASN1Dec_CapabilityDescriptor(ASN1decoding_t dec, CapabilityDescriptor *val)
  4424. {
  4425. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4426. return 0;
  4427. ASN1PERDecAlignment(dec);
  4428. if (!ASN1PERDecU16Val(dec, 8, &(val)->capabilityDescriptorNumber))
  4429. return 0;
  4430. if ((val)->o[0] & 0x80) {
  4431. if (!ASN1Dec_CapabilityDescriptor_simultaneousCapabilities(dec, &(val)->simultaneousCapabilities))
  4432. return 0;
  4433. }
  4434. return 1;
  4435. }
  4436. static void ASN1CALL ASN1Free_CapabilityDescriptor(CapabilityDescriptor *val)
  4437. {
  4438. if (val) {
  4439. if ((val)->o[0] & 0x80) {
  4440. ASN1Free_CapabilityDescriptor_simultaneousCapabilities(&(val)->simultaneousCapabilities);
  4441. }
  4442. }
  4443. }
  4444. static int ASN1CALL ASN1Enc_AlternativeCapabilitySet(ASN1encoding_t enc, AlternativeCapabilitySet *val)
  4445. {
  4446. ASN1uint32_t i;
  4447. ASN1PEREncAlignment(enc);
  4448. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  4449. return 0;
  4450. for (i = 0; i < (val)->count; i++) {
  4451. if (!ASN1PEREncUnsignedShort(enc, ((val)->value)[i] - 1))
  4452. return 0;
  4453. }
  4454. return 1;
  4455. }
  4456. static int ASN1CALL ASN1Dec_AlternativeCapabilitySet(ASN1decoding_t dec, AlternativeCapabilitySet *val)
  4457. {
  4458. ASN1uint32_t i;
  4459. ASN1PERDecAlignment(dec);
  4460. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  4461. return 0;
  4462. (val)->count += 1;
  4463. for (i = 0; i < (val)->count; i++) {
  4464. if (!ASN1PERDecUnsignedShort(dec, &((val)->value)[i]))
  4465. return 0;
  4466. ((val)->value)[i] += 1;
  4467. }
  4468. return 1;
  4469. }
  4470. static void ASN1CALL ASN1Free_AlternativeCapabilitySet(AlternativeCapabilitySet *val)
  4471. {
  4472. if (val) {
  4473. }
  4474. }
  4475. static int ASN1CALL ASN1Enc_TerminalCapabilitySetAck(ASN1encoding_t enc, TerminalCapabilitySetAck *val)
  4476. {
  4477. if (!ASN1PEREncExtensionBitClear(enc))
  4478. return 0;
  4479. ASN1PEREncAlignment(enc);
  4480. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  4481. return 0;
  4482. return 1;
  4483. }
  4484. static int ASN1CALL ASN1Dec_TerminalCapabilitySetAck(ASN1decoding_t dec, TerminalCapabilitySetAck *val)
  4485. {
  4486. ASN1uint32_t y;
  4487. if (!ASN1PERDecExtensionBit(dec, &y))
  4488. return 0;
  4489. ASN1PERDecAlignment(dec);
  4490. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  4491. return 0;
  4492. if (y) {
  4493. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4494. return 0;
  4495. }
  4496. return 1;
  4497. }
  4498. static int ASN1CALL ASN1Enc_TerminalCapabilitySetReject(ASN1encoding_t enc, TerminalCapabilitySetReject *val)
  4499. {
  4500. if (!ASN1PEREncExtensionBitClear(enc))
  4501. return 0;
  4502. ASN1PEREncAlignment(enc);
  4503. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  4504. return 0;
  4505. if (!ASN1Enc_TerminalCapabilitySetReject_cause(enc, &(val)->cause))
  4506. return 0;
  4507. return 1;
  4508. }
  4509. static int ASN1CALL ASN1Dec_TerminalCapabilitySetReject(ASN1decoding_t dec, TerminalCapabilitySetReject *val)
  4510. {
  4511. ASN1uint32_t y;
  4512. if (!ASN1PERDecExtensionBit(dec, &y))
  4513. return 0;
  4514. ASN1PERDecAlignment(dec);
  4515. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  4516. return 0;
  4517. if (!ASN1Dec_TerminalCapabilitySetReject_cause(dec, &(val)->cause))
  4518. return 0;
  4519. if (y) {
  4520. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4521. return 0;
  4522. }
  4523. return 1;
  4524. }
  4525. static int ASN1CALL ASN1Enc_TerminalCapabilitySetRelease(ASN1encoding_t enc, TerminalCapabilitySetRelease *val)
  4526. {
  4527. if (!ASN1PEREncExtensionBitClear(enc))
  4528. return 0;
  4529. return 1;
  4530. }
  4531. static int ASN1CALL ASN1Dec_TerminalCapabilitySetRelease(ASN1decoding_t dec, TerminalCapabilitySetRelease *val)
  4532. {
  4533. ASN1uint32_t y;
  4534. if (!ASN1PERDecExtensionBit(dec, &y))
  4535. return 0;
  4536. if (y) {
  4537. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4538. return 0;
  4539. }
  4540. return 1;
  4541. }
  4542. static int ASN1CALL ASN1Enc_H222Capability(ASN1encoding_t enc, H222Capability *val)
  4543. {
  4544. if (!ASN1PEREncExtensionBitClear(enc))
  4545. return 0;
  4546. ASN1PEREncAlignment(enc);
  4547. if (!ASN1PEREncBitVal(enc, 8, (val)->numberOfVCs - 1))
  4548. return 0;
  4549. if (!ASN1Enc_H222Capability_vcCapability(enc, &(val)->vcCapability))
  4550. return 0;
  4551. return 1;
  4552. }
  4553. static int ASN1CALL ASN1Dec_H222Capability(ASN1decoding_t dec, H222Capability *val)
  4554. {
  4555. ASN1uint32_t y;
  4556. if (!ASN1PERDecExtensionBit(dec, &y))
  4557. return 0;
  4558. ASN1PERDecAlignment(dec);
  4559. if (!ASN1PERDecU16Val(dec, 8, &(val)->numberOfVCs))
  4560. return 0;
  4561. (val)->numberOfVCs += 1;
  4562. if (!ASN1Dec_H222Capability_vcCapability(dec, &(val)->vcCapability))
  4563. return 0;
  4564. if (y) {
  4565. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4566. return 0;
  4567. }
  4568. return 1;
  4569. }
  4570. static void ASN1CALL ASN1Free_H222Capability(H222Capability *val)
  4571. {
  4572. if (val) {
  4573. ASN1Free_H222Capability_vcCapability(&(val)->vcCapability);
  4574. }
  4575. }
  4576. static int ASN1CALL ASN1Enc_VCCapability(ASN1encoding_t enc, VCCapability *val)
  4577. {
  4578. if (!ASN1PEREncExtensionBitClear(enc))
  4579. return 0;
  4580. if (!ASN1PEREncBits(enc, 2, (val)->o))
  4581. return 0;
  4582. if ((val)->o[0] & 0x80) {
  4583. if (!ASN1Enc_VCCapability_aal1(enc, &(val)->aal1))
  4584. return 0;
  4585. }
  4586. if ((val)->o[0] & 0x40) {
  4587. if (!ASN1Enc_VCCapability_aal5(enc, &(val)->aal5))
  4588. return 0;
  4589. }
  4590. if (!ASN1PEREncBoolean(enc, (val)->transportStream))
  4591. return 0;
  4592. if (!ASN1PEREncBoolean(enc, (val)->programStream))
  4593. return 0;
  4594. if (!ASN1Enc_VCCapability_availableBitRates(enc, &(val)->availableBitRates))
  4595. return 0;
  4596. return 1;
  4597. }
  4598. static int ASN1CALL ASN1Dec_VCCapability(ASN1decoding_t dec, VCCapability *val)
  4599. {
  4600. ASN1uint32_t y;
  4601. if (!ASN1PERDecExtensionBit(dec, &y))
  4602. return 0;
  4603. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  4604. return 0;
  4605. if ((val)->o[0] & 0x80) {
  4606. if (!ASN1Dec_VCCapability_aal1(dec, &(val)->aal1))
  4607. return 0;
  4608. }
  4609. if ((val)->o[0] & 0x40) {
  4610. if (!ASN1Dec_VCCapability_aal5(dec, &(val)->aal5))
  4611. return 0;
  4612. }
  4613. if (!ASN1PERDecBoolean(dec, &(val)->transportStream))
  4614. return 0;
  4615. if (!ASN1PERDecBoolean(dec, &(val)->programStream))
  4616. return 0;
  4617. if (!ASN1Dec_VCCapability_availableBitRates(dec, &(val)->availableBitRates))
  4618. return 0;
  4619. if (y) {
  4620. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4621. return 0;
  4622. }
  4623. return 1;
  4624. }
  4625. static int ASN1CALL ASN1Enc_H223AnnexCCapability(ASN1encoding_t enc, H223AnnexCCapability *val)
  4626. {
  4627. if (!ASN1PEREncExtensionBitClear(enc))
  4628. return 0;
  4629. if (!ASN1PEREncBoolean(enc, (val)->videoWithAL1M))
  4630. return 0;
  4631. if (!ASN1PEREncBoolean(enc, (val)->videoWithAL2M))
  4632. return 0;
  4633. if (!ASN1PEREncBoolean(enc, (val)->videoWithAL3M))
  4634. return 0;
  4635. if (!ASN1PEREncBoolean(enc, (val)->audioWithAL1M))
  4636. return 0;
  4637. if (!ASN1PEREncBoolean(enc, (val)->audioWithAL2M))
  4638. return 0;
  4639. if (!ASN1PEREncBoolean(enc, (val)->audioWithAL3M))
  4640. return 0;
  4641. if (!ASN1PEREncBoolean(enc, (val)->dataWithAL1M))
  4642. return 0;
  4643. if (!ASN1PEREncBoolean(enc, (val)->dataWithAL2M))
  4644. return 0;
  4645. if (!ASN1PEREncBoolean(enc, (val)->dataWithAL3M))
  4646. return 0;
  4647. if (!ASN1PEREncBoolean(enc, (val)->alpduInterleaving))
  4648. return 0;
  4649. if (!ASN1PEREncUnsignedShort(enc, (val)->maximumAL1MPDUSize))
  4650. return 0;
  4651. if (!ASN1PEREncUnsignedShort(enc, (val)->maximumAL2MSDUSize))
  4652. return 0;
  4653. if (!ASN1PEREncUnsignedShort(enc, (val)->maximumAL3MSDUSize))
  4654. return 0;
  4655. return 1;
  4656. }
  4657. static int ASN1CALL ASN1Dec_H223AnnexCCapability(ASN1decoding_t dec, H223AnnexCCapability *val)
  4658. {
  4659. ASN1uint32_t y;
  4660. if (!ASN1PERDecExtensionBit(dec, &y))
  4661. return 0;
  4662. if (!ASN1PERDecBoolean(dec, &(val)->videoWithAL1M))
  4663. return 0;
  4664. if (!ASN1PERDecBoolean(dec, &(val)->videoWithAL2M))
  4665. return 0;
  4666. if (!ASN1PERDecBoolean(dec, &(val)->videoWithAL3M))
  4667. return 0;
  4668. if (!ASN1PERDecBoolean(dec, &(val)->audioWithAL1M))
  4669. return 0;
  4670. if (!ASN1PERDecBoolean(dec, &(val)->audioWithAL2M))
  4671. return 0;
  4672. if (!ASN1PERDecBoolean(dec, &(val)->audioWithAL3M))
  4673. return 0;
  4674. if (!ASN1PERDecBoolean(dec, &(val)->dataWithAL1M))
  4675. return 0;
  4676. if (!ASN1PERDecBoolean(dec, &(val)->dataWithAL2M))
  4677. return 0;
  4678. if (!ASN1PERDecBoolean(dec, &(val)->dataWithAL3M))
  4679. return 0;
  4680. if (!ASN1PERDecBoolean(dec, &(val)->alpduInterleaving))
  4681. return 0;
  4682. if (!ASN1PERDecUnsignedShort(dec, &(val)->maximumAL1MPDUSize))
  4683. return 0;
  4684. if (!ASN1PERDecUnsignedShort(dec, &(val)->maximumAL2MSDUSize))
  4685. return 0;
  4686. if (!ASN1PERDecUnsignedShort(dec, &(val)->maximumAL3MSDUSize))
  4687. return 0;
  4688. if (y) {
  4689. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4690. return 0;
  4691. }
  4692. return 1;
  4693. }
  4694. static int ASN1CALL ASN1Enc_V75Capability(ASN1encoding_t enc, V75Capability *val)
  4695. {
  4696. if (!ASN1PEREncExtensionBitClear(enc))
  4697. return 0;
  4698. if (!ASN1PEREncBoolean(enc, (val)->audioHeader))
  4699. return 0;
  4700. return 1;
  4701. }
  4702. static int ASN1CALL ASN1Dec_V75Capability(ASN1decoding_t dec, V75Capability *val)
  4703. {
  4704. ASN1uint32_t y;
  4705. if (!ASN1PERDecExtensionBit(dec, &y))
  4706. return 0;
  4707. if (!ASN1PERDecBoolean(dec, &(val)->audioHeader))
  4708. return 0;
  4709. if (y) {
  4710. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4711. return 0;
  4712. }
  4713. return 1;
  4714. }
  4715. static int ASN1CALL ASN1Enc_QOSMode(ASN1encoding_t enc, QOSMode *val)
  4716. {
  4717. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  4718. return 0;
  4719. return 1;
  4720. }
  4721. static int ASN1CALL ASN1Dec_QOSMode(ASN1decoding_t dec, QOSMode *val)
  4722. {
  4723. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  4724. return 0;
  4725. return 1;
  4726. }
  4727. static int ASN1CALL ASN1Enc_ATMParameters(ASN1encoding_t enc, ATMParameters *val)
  4728. {
  4729. if (!ASN1PEREncExtensionBitClear(enc))
  4730. return 0;
  4731. if (!ASN1PEREncUnsignedShort(enc, (val)->maxNTUSize))
  4732. return 0;
  4733. if (!ASN1PEREncBoolean(enc, (val)->atmUBR))
  4734. return 0;
  4735. if (!ASN1PEREncBoolean(enc, (val)->atmrtVBR))
  4736. return 0;
  4737. if (!ASN1PEREncBoolean(enc, (val)->atmnrtVBR))
  4738. return 0;
  4739. if (!ASN1PEREncBoolean(enc, (val)->atmABR))
  4740. return 0;
  4741. if (!ASN1PEREncBoolean(enc, (val)->atmCBR))
  4742. return 0;
  4743. return 1;
  4744. }
  4745. static int ASN1CALL ASN1Dec_ATMParameters(ASN1decoding_t dec, ATMParameters *val)
  4746. {
  4747. ASN1uint32_t y;
  4748. if (!ASN1PERDecExtensionBit(dec, &y))
  4749. return 0;
  4750. if (!ASN1PERDecUnsignedShort(dec, &(val)->maxNTUSize))
  4751. return 0;
  4752. if (!ASN1PERDecBoolean(dec, &(val)->atmUBR))
  4753. return 0;
  4754. if (!ASN1PERDecBoolean(dec, &(val)->atmrtVBR))
  4755. return 0;
  4756. if (!ASN1PERDecBoolean(dec, &(val)->atmnrtVBR))
  4757. return 0;
  4758. if (!ASN1PERDecBoolean(dec, &(val)->atmABR))
  4759. return 0;
  4760. if (!ASN1PERDecBoolean(dec, &(val)->atmCBR))
  4761. return 0;
  4762. if (y) {
  4763. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4764. return 0;
  4765. }
  4766. return 1;
  4767. }
  4768. static int ASN1CALL ASN1Enc_MediaTransportType(ASN1encoding_t enc, MediaTransportType *val)
  4769. {
  4770. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  4771. return 0;
  4772. return 1;
  4773. }
  4774. static int ASN1CALL ASN1Dec_MediaTransportType(ASN1decoding_t dec, MediaTransportType *val)
  4775. {
  4776. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  4777. return 0;
  4778. return 1;
  4779. }
  4780. static int ASN1CALL ASN1Enc_MediaChannelCapability(ASN1encoding_t enc, MediaChannelCapability *val)
  4781. {
  4782. if (!ASN1PEREncExtensionBitClear(enc))
  4783. return 0;
  4784. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4785. return 0;
  4786. if ((val)->o[0] & 0x80) {
  4787. if (!ASN1Enc_MediaTransportType(enc, &(val)->mediaTransport))
  4788. return 0;
  4789. }
  4790. return 1;
  4791. }
  4792. static int ASN1CALL ASN1Dec_MediaChannelCapability(ASN1decoding_t dec, MediaChannelCapability *val)
  4793. {
  4794. ASN1uint32_t y;
  4795. if (!ASN1PERDecExtensionBit(dec, &y))
  4796. return 0;
  4797. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4798. return 0;
  4799. if ((val)->o[0] & 0x80) {
  4800. if (!ASN1Dec_MediaTransportType(dec, &(val)->mediaTransport))
  4801. return 0;
  4802. }
  4803. if (y) {
  4804. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4805. return 0;
  4806. }
  4807. return 1;
  4808. }
  4809. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyEncoding(ASN1encoding_t enc, RTPH263VideoRedundancyEncoding *val)
  4810. {
  4811. if (!ASN1PEREncExtensionBitClear(enc))
  4812. return 0;
  4813. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4814. return 0;
  4815. if (!ASN1PEREncBitVal(enc, 4, (val)->numberOfThreads - 1))
  4816. return 0;
  4817. ASN1PEREncAlignment(enc);
  4818. if (!ASN1PEREncBitVal(enc, 8, (val)->framesBetweenSyncPoints - 1))
  4819. return 0;
  4820. if (!ASN1Enc_RTPH263VideoRedundancyEncoding_frameToThreadMapping(enc, &(val)->frameToThreadMapping))
  4821. return 0;
  4822. if ((val)->o[0] & 0x80) {
  4823. if (!ASN1Enc_RTPH263VideoRedundancyEncoding_containedThreads(enc, &(val)->containedThreads))
  4824. return 0;
  4825. }
  4826. return 1;
  4827. }
  4828. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyEncoding(ASN1decoding_t dec, RTPH263VideoRedundancyEncoding *val)
  4829. {
  4830. ASN1uint32_t y;
  4831. if (!ASN1PERDecExtensionBit(dec, &y))
  4832. return 0;
  4833. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4834. return 0;
  4835. if (!ASN1PERDecU16Val(dec, 4, &(val)->numberOfThreads))
  4836. return 0;
  4837. (val)->numberOfThreads += 1;
  4838. ASN1PERDecAlignment(dec);
  4839. if (!ASN1PERDecU16Val(dec, 8, &(val)->framesBetweenSyncPoints))
  4840. return 0;
  4841. (val)->framesBetweenSyncPoints += 1;
  4842. if (!ASN1Dec_RTPH263VideoRedundancyEncoding_frameToThreadMapping(dec, &(val)->frameToThreadMapping))
  4843. return 0;
  4844. if ((val)->o[0] & 0x80) {
  4845. if (!ASN1Dec_RTPH263VideoRedundancyEncoding_containedThreads(dec, &(val)->containedThreads))
  4846. return 0;
  4847. }
  4848. if (y) {
  4849. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4850. return 0;
  4851. }
  4852. return 1;
  4853. }
  4854. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyEncoding(RTPH263VideoRedundancyEncoding *val)
  4855. {
  4856. if (val) {
  4857. ASN1Free_RTPH263VideoRedundancyEncoding_frameToThreadMapping(&(val)->frameToThreadMapping);
  4858. if ((val)->o[0] & 0x80) {
  4859. ASN1Free_RTPH263VideoRedundancyEncoding_containedThreads(&(val)->containedThreads);
  4860. }
  4861. }
  4862. }
  4863. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyFrameMapping(ASN1encoding_t enc, RTPH263VideoRedundancyFrameMapping *val)
  4864. {
  4865. if (!ASN1PEREncExtensionBitClear(enc))
  4866. return 0;
  4867. if (!ASN1PEREncBitVal(enc, 4, (val)->threadNumber))
  4868. return 0;
  4869. if (!ASN1Enc_RTPH263VideoRedundancyFrameMapping_frameSequence(enc, &(val)->frameSequence))
  4870. return 0;
  4871. return 1;
  4872. }
  4873. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyFrameMapping(ASN1decoding_t dec, RTPH263VideoRedundancyFrameMapping *val)
  4874. {
  4875. ASN1uint32_t y;
  4876. if (!ASN1PERDecExtensionBit(dec, &y))
  4877. return 0;
  4878. if (!ASN1PERDecU16Val(dec, 4, &(val)->threadNumber))
  4879. return 0;
  4880. if (!ASN1Dec_RTPH263VideoRedundancyFrameMapping_frameSequence(dec, &(val)->frameSequence))
  4881. return 0;
  4882. if (y) {
  4883. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4884. return 0;
  4885. }
  4886. return 1;
  4887. }
  4888. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyFrameMapping(RTPH263VideoRedundancyFrameMapping *val)
  4889. {
  4890. if (val) {
  4891. ASN1Free_RTPH263VideoRedundancyFrameMapping_frameSequence(&(val)->frameSequence);
  4892. }
  4893. }
  4894. static int ASN1CALL ASN1Enc_MultipointCapability(ASN1encoding_t enc, MultipointCapability *val)
  4895. {
  4896. if (!ASN1PEREncExtensionBitClear(enc))
  4897. return 0;
  4898. if (!ASN1PEREncBoolean(enc, (val)->multicastCapability))
  4899. return 0;
  4900. if (!ASN1PEREncBoolean(enc, (val)->multiUniCastConference))
  4901. return 0;
  4902. if (!ASN1Enc_MultipointCapability_mediaDistributionCapability(enc, &(val)->mediaDistributionCapability))
  4903. return 0;
  4904. return 1;
  4905. }
  4906. static int ASN1CALL ASN1Dec_MultipointCapability(ASN1decoding_t dec, MultipointCapability *val)
  4907. {
  4908. ASN1uint32_t y;
  4909. if (!ASN1PERDecExtensionBit(dec, &y))
  4910. return 0;
  4911. if (!ASN1PERDecBoolean(dec, &(val)->multicastCapability))
  4912. return 0;
  4913. if (!ASN1PERDecBoolean(dec, &(val)->multiUniCastConference))
  4914. return 0;
  4915. if (!ASN1Dec_MultipointCapability_mediaDistributionCapability(dec, &(val)->mediaDistributionCapability))
  4916. return 0;
  4917. if (y) {
  4918. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4919. return 0;
  4920. }
  4921. return 1;
  4922. }
  4923. static void ASN1CALL ASN1Free_MultipointCapability(MultipointCapability *val)
  4924. {
  4925. if (val) {
  4926. ASN1Free_MultipointCapability_mediaDistributionCapability(&(val)->mediaDistributionCapability);
  4927. }
  4928. }
  4929. static int ASN1CALL ASN1Enc_MediaDistributionCapability(ASN1encoding_t enc, MediaDistributionCapability *val)
  4930. {
  4931. if (!ASN1PEREncExtensionBitClear(enc))
  4932. return 0;
  4933. if (!ASN1PEREncBits(enc, 2, (val)->o))
  4934. return 0;
  4935. if (!ASN1PEREncBoolean(enc, (val)->centralizedControl))
  4936. return 0;
  4937. if (!ASN1PEREncBoolean(enc, (val)->distributedControl))
  4938. return 0;
  4939. if (!ASN1PEREncBoolean(enc, (val)->centralizedAudio))
  4940. return 0;
  4941. if (!ASN1PEREncBoolean(enc, (val)->distributedAudio))
  4942. return 0;
  4943. if (!ASN1PEREncBoolean(enc, (val)->centralizedVideo))
  4944. return 0;
  4945. if (!ASN1PEREncBoolean(enc, (val)->distributedVideo))
  4946. return 0;
  4947. if ((val)->o[0] & 0x80) {
  4948. if (!ASN1Enc_MediaDistributionCapability_centralizedData(enc, &(val)->centralizedData))
  4949. return 0;
  4950. }
  4951. if ((val)->o[0] & 0x40) {
  4952. if (!ASN1Enc_MediaDistributionCapability_distributedData(enc, &(val)->distributedData))
  4953. return 0;
  4954. }
  4955. return 1;
  4956. }
  4957. static int ASN1CALL ASN1Dec_MediaDistributionCapability(ASN1decoding_t dec, MediaDistributionCapability *val)
  4958. {
  4959. ASN1uint32_t y;
  4960. if (!ASN1PERDecExtensionBit(dec, &y))
  4961. return 0;
  4962. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  4963. return 0;
  4964. if (!ASN1PERDecBoolean(dec, &(val)->centralizedControl))
  4965. return 0;
  4966. if (!ASN1PERDecBoolean(dec, &(val)->distributedControl))
  4967. return 0;
  4968. if (!ASN1PERDecBoolean(dec, &(val)->centralizedAudio))
  4969. return 0;
  4970. if (!ASN1PERDecBoolean(dec, &(val)->distributedAudio))
  4971. return 0;
  4972. if (!ASN1PERDecBoolean(dec, &(val)->centralizedVideo))
  4973. return 0;
  4974. if (!ASN1PERDecBoolean(dec, &(val)->distributedVideo))
  4975. return 0;
  4976. if ((val)->o[0] & 0x80) {
  4977. if (!ASN1Dec_MediaDistributionCapability_centralizedData(dec, &(val)->centralizedData))
  4978. return 0;
  4979. }
  4980. if ((val)->o[0] & 0x40) {
  4981. if (!ASN1Dec_MediaDistributionCapability_distributedData(dec, &(val)->distributedData))
  4982. return 0;
  4983. }
  4984. if (y) {
  4985. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4986. return 0;
  4987. }
  4988. return 1;
  4989. }
  4990. static void ASN1CALL ASN1Free_MediaDistributionCapability(MediaDistributionCapability *val)
  4991. {
  4992. if (val) {
  4993. if ((val)->o[0] & 0x80) {
  4994. ASN1Free_MediaDistributionCapability_centralizedData(&(val)->centralizedData);
  4995. }
  4996. if ((val)->o[0] & 0x40) {
  4997. ASN1Free_MediaDistributionCapability_distributedData(&(val)->distributedData);
  4998. }
  4999. }
  5000. }
  5001. static int ASN1CALL ASN1Enc_H261VideoCapability(ASN1encoding_t enc, H261VideoCapability *val)
  5002. {
  5003. if (!ASN1PEREncExtensionBitClear(enc))
  5004. return 0;
  5005. if (!ASN1PEREncBits(enc, 2, (val)->o))
  5006. return 0;
  5007. if ((val)->o[0] & 0x80) {
  5008. if (!ASN1PEREncBitVal(enc, 2, (val)->qcifMPI - 1))
  5009. return 0;
  5010. }
  5011. if ((val)->o[0] & 0x40) {
  5012. if (!ASN1PEREncBitVal(enc, 2, (val)->cifMPI - 1))
  5013. return 0;
  5014. }
  5015. if (!ASN1PEREncBoolean(enc, (val)->temporalSpatialTradeOffCapability))
  5016. return 0;
  5017. if (!ASN1PEREncUnsignedShort(enc, (val)->maxBitRate - 1))
  5018. return 0;
  5019. if (!ASN1PEREncBoolean(enc, (val)->stillImageTransmission))
  5020. return 0;
  5021. return 1;
  5022. }
  5023. static int ASN1CALL ASN1Dec_H261VideoCapability(ASN1decoding_t dec, H261VideoCapability *val)
  5024. {
  5025. ASN1uint32_t y;
  5026. if (!ASN1PERDecExtensionBit(dec, &y))
  5027. return 0;
  5028. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  5029. return 0;
  5030. if ((val)->o[0] & 0x80) {
  5031. if (!ASN1PERDecU16Val(dec, 2, &(val)->qcifMPI))
  5032. return 0;
  5033. (val)->qcifMPI += 1;
  5034. }
  5035. if ((val)->o[0] & 0x40) {
  5036. if (!ASN1PERDecU16Val(dec, 2, &(val)->cifMPI))
  5037. return 0;
  5038. (val)->cifMPI += 1;
  5039. }
  5040. if (!ASN1PERDecBoolean(dec, &(val)->temporalSpatialTradeOffCapability))
  5041. return 0;
  5042. if (!ASN1PERDecUnsignedShort(dec, &(val)->maxBitRate))
  5043. return 0;
  5044. (val)->maxBitRate += 1;
  5045. if (!ASN1PERDecBoolean(dec, &(val)->stillImageTransmission))
  5046. return 0;
  5047. if (y) {
  5048. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5049. return 0;
  5050. }
  5051. return 1;
  5052. }
  5053. static int ASN1CALL ASN1Enc_H262VideoCapability(ASN1encoding_t enc, H262VideoCapability *val)
  5054. {
  5055. ASN1uint32_t l;
  5056. if (!ASN1PEREncExtensionBitClear(enc))
  5057. return 0;
  5058. if (!ASN1PEREncBits(enc, 6, (val)->o))
  5059. return 0;
  5060. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_SPatML))
  5061. return 0;
  5062. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_MPatLL))
  5063. return 0;
  5064. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_MPatML))
  5065. return 0;
  5066. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_MPatH_14))
  5067. return 0;
  5068. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_MPatHL))
  5069. return 0;
  5070. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_SNRatLL))
  5071. return 0;
  5072. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_SNRatML))
  5073. return 0;
  5074. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_SpatialatH_14))
  5075. return 0;
  5076. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_HPatML))
  5077. return 0;
  5078. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_HPatH_14))
  5079. return 0;
  5080. if (!ASN1PEREncBoolean(enc, (val)->profileAndLevel_HPatHL))
  5081. return 0;
  5082. if ((val)->o[0] & 0x80) {
  5083. l = ASN1uint32_uoctets((val)->videoBitRate);
  5084. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  5085. return 0;
  5086. ASN1PEREncAlignment(enc);
  5087. if (!ASN1PEREncBitVal(enc, l * 8, (val)->videoBitRate))
  5088. return 0;
  5089. }
  5090. if ((val)->o[0] & 0x40) {
  5091. l = ASN1uint32_uoctets((val)->vbvBufferSize);
  5092. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  5093. return 0;
  5094. ASN1PEREncAlignment(enc);
  5095. if (!ASN1PEREncBitVal(enc, l * 8, (val)->vbvBufferSize))
  5096. return 0;
  5097. }
  5098. if ((val)->o[0] & 0x20) {
  5099. if (!ASN1PEREncUnsignedShort(enc, (val)->samplesPerLine))
  5100. return 0;
  5101. }
  5102. if ((val)->o[0] & 0x10) {
  5103. if (!ASN1PEREncUnsignedShort(enc, (val)->linesPerFrame))
  5104. return 0;
  5105. }
  5106. if ((val)->o[0] & 0x8) {
  5107. if (!ASN1PEREncBitVal(enc, 4, (val)->framesPerSecond))
  5108. return 0;
  5109. }
  5110. if ((val)->o[0] & 0x4) {
  5111. l = ASN1uint32_uoctets((val)->luminanceSampleRate);
  5112. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  5113. return 0;
  5114. ASN1PEREncAlignment(enc);
  5115. if (!ASN1PEREncBitVal(enc, l * 8, (val)->luminanceSampleRate))
  5116. return 0;
  5117. }
  5118. return 1;
  5119. }
  5120. static int ASN1CALL ASN1Dec_H262VideoCapability(ASN1decoding_t dec, H262VideoCapability *val)
  5121. {
  5122. ASN1uint32_t y;
  5123. ASN1uint32_t l;
  5124. if (!ASN1PERDecExtensionBit(dec, &y))
  5125. return 0;
  5126. if (!ASN1PERDecExtension(dec, 6, (val)->o))
  5127. return 0;
  5128. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_SPatML))
  5129. return 0;
  5130. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_MPatLL))
  5131. return 0;
  5132. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_MPatML))
  5133. return 0;
  5134. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_MPatH_14))
  5135. return 0;
  5136. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_MPatHL))
  5137. return 0;
  5138. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_SNRatLL))
  5139. return 0;
  5140. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_SNRatML))
  5141. return 0;
  5142. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_SpatialatH_14))
  5143. return 0;
  5144. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_HPatML))
  5145. return 0;
  5146. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_HPatH_14))
  5147. return 0;
  5148. if (!ASN1PERDecBoolean(dec, &(val)->profileAndLevel_HPatHL))
  5149. return 0;
  5150. if ((val)->o[0] & 0x80) {
  5151. if (!ASN1PERDecU32Val(dec, 2, &l))
  5152. return 0;
  5153. l += 1;
  5154. ASN1PERDecAlignment(dec);
  5155. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->videoBitRate))
  5156. return 0;
  5157. }
  5158. if ((val)->o[0] & 0x40) {
  5159. if (!ASN1PERDecU32Val(dec, 2, &l))
  5160. return 0;
  5161. l += 1;
  5162. ASN1PERDecAlignment(dec);
  5163. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->vbvBufferSize))
  5164. return 0;
  5165. }
  5166. if ((val)->o[0] & 0x20) {
  5167. if (!ASN1PERDecUnsignedShort(dec, &(val)->samplesPerLine))
  5168. return 0;
  5169. }
  5170. if ((val)->o[0] & 0x10) {
  5171. if (!ASN1PERDecUnsignedShort(dec, &(val)->linesPerFrame))
  5172. return 0;
  5173. }
  5174. if ((val)->o[0] & 0x8) {
  5175. if (!ASN1PERDecU16Val(dec, 4, &(val)->framesPerSecond))
  5176. return 0;
  5177. }
  5178. if ((val)->o[0] & 0x4) {
  5179. if (!ASN1PERDecU32Val(dec, 2, &l))
  5180. return 0;
  5181. l += 1;
  5182. ASN1PERDecAlignment(dec);
  5183. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->luminanceSampleRate))
  5184. return 0;
  5185. }
  5186. if (y) {
  5187. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5188. return 0;
  5189. }
  5190. return 1;
  5191. }
  5192. static int ASN1CALL ASN1Enc_EnhancementLayerInfo(ASN1encoding_t enc, EnhancementLayerInfo *val)
  5193. {
  5194. if (!ASN1PEREncExtensionBitClear(enc))
  5195. return 0;
  5196. if (!ASN1PEREncBits(enc, 3, (val)->o))
  5197. return 0;
  5198. if (!ASN1PEREncBoolean(enc, (val)->baseBitRateConstrained))
  5199. return 0;
  5200. if ((val)->o[0] & 0x80) {
  5201. if (!ASN1Enc_EnhancementLayerInfo_snrEnhancement(enc, &(val)->snrEnhancement))
  5202. return 0;
  5203. }
  5204. if ((val)->o[0] & 0x40) {
  5205. if (!ASN1Enc_EnhancementLayerInfo_spatialEnhancement(enc, &(val)->spatialEnhancement))
  5206. return 0;
  5207. }
  5208. if ((val)->o[0] & 0x20) {
  5209. if (!ASN1Enc_EnhancementLayerInfo_bPictureEnhancement(enc, &(val)->bPictureEnhancement))
  5210. return 0;
  5211. }
  5212. return 1;
  5213. }
  5214. static int ASN1CALL ASN1Dec_EnhancementLayerInfo(ASN1decoding_t dec, EnhancementLayerInfo *val)
  5215. {
  5216. ASN1uint32_t y;
  5217. if (!ASN1PERDecExtensionBit(dec, &y))
  5218. return 0;
  5219. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  5220. return 0;
  5221. if (!ASN1PERDecBoolean(dec, &(val)->baseBitRateConstrained))
  5222. return 0;
  5223. if ((val)->o[0] & 0x80) {
  5224. if (!ASN1Dec_EnhancementLayerInfo_snrEnhancement(dec, &(val)->snrEnhancement))
  5225. return 0;
  5226. }
  5227. if ((val)->o[0] & 0x40) {
  5228. if (!ASN1Dec_EnhancementLayerInfo_spatialEnhancement(dec, &(val)->spatialEnhancement))
  5229. return 0;
  5230. }
  5231. if ((val)->o[0] & 0x20) {
  5232. if (!ASN1Dec_EnhancementLayerInfo_bPictureEnhancement(dec, &(val)->bPictureEnhancement))
  5233. return 0;
  5234. }
  5235. if (y) {
  5236. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5237. return 0;
  5238. }
  5239. return 1;
  5240. }
  5241. static void ASN1CALL ASN1Free_EnhancementLayerInfo(EnhancementLayerInfo *val)
  5242. {
  5243. if (val) {
  5244. if ((val)->o[0] & 0x80) {
  5245. ASN1Free_EnhancementLayerInfo_snrEnhancement(&(val)->snrEnhancement);
  5246. }
  5247. if ((val)->o[0] & 0x40) {
  5248. ASN1Free_EnhancementLayerInfo_spatialEnhancement(&(val)->spatialEnhancement);
  5249. }
  5250. if ((val)->o[0] & 0x20) {
  5251. ASN1Free_EnhancementLayerInfo_bPictureEnhancement(&(val)->bPictureEnhancement);
  5252. }
  5253. }
  5254. }
  5255. static int ASN1CALL ASN1Enc_TransparencyParameters(ASN1encoding_t enc, TransparencyParameters *val)
  5256. {
  5257. ASN1uint32_t l;
  5258. if (!ASN1PEREncExtensionBitClear(enc))
  5259. return 0;
  5260. ASN1PEREncAlignment(enc);
  5261. if (!ASN1PEREncBitVal(enc, 8, (val)->presentationOrder - 1))
  5262. return 0;
  5263. l = ASN1uint32_uoctets((val)->offset_x + 262144);
  5264. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  5265. return 0;
  5266. ASN1PEREncAlignment(enc);
  5267. if (!ASN1PEREncBitVal(enc, l * 8, (val)->offset_x + 262144))
  5268. return 0;
  5269. l = ASN1uint32_uoctets((val)->offset_y + 262144);
  5270. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  5271. return 0;
  5272. ASN1PEREncAlignment(enc);
  5273. if (!ASN1PEREncBitVal(enc, l * 8, (val)->offset_y + 262144))
  5274. return 0;
  5275. if (!ASN1PEREncBitVal(enc, 8, (val)->scale_x - 1))
  5276. return 0;
  5277. if (!ASN1PEREncBitVal(enc, 8, (val)->scale_y - 1))
  5278. return 0;
  5279. return 1;
  5280. }
  5281. static int ASN1CALL ASN1Dec_TransparencyParameters(ASN1decoding_t dec, TransparencyParameters *val)
  5282. {
  5283. ASN1uint32_t y;
  5284. ASN1uint32_t l;
  5285. if (!ASN1PERDecExtensionBit(dec, &y))
  5286. return 0;
  5287. ASN1PERDecAlignment(dec);
  5288. if (!ASN1PERDecU16Val(dec, 8, &(val)->presentationOrder))
  5289. return 0;
  5290. (val)->presentationOrder += 1;
  5291. if (!ASN1PERDecU32Val(dec, 2, &l))
  5292. return 0;
  5293. l += 1;
  5294. ASN1PERDecAlignment(dec);
  5295. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->offset_x))
  5296. return 0;
  5297. (val)->offset_x += 0 - 262144;
  5298. if (!ASN1PERDecU32Val(dec, 2, &l))
  5299. return 0;
  5300. l += 1;
  5301. ASN1PERDecAlignment(dec);
  5302. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->offset_y))
  5303. return 0;
  5304. (val)->offset_y += 0 - 262144;
  5305. if (!ASN1PERDecU16Val(dec, 8, &(val)->scale_x))
  5306. return 0;
  5307. (val)->scale_x += 1;
  5308. if (!ASN1PERDecU16Val(dec, 8, &(val)->scale_y))
  5309. return 0;
  5310. (val)->scale_y += 1;
  5311. if (y) {
  5312. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5313. return 0;
  5314. }
  5315. return 1;
  5316. }
  5317. static int ASN1CALL ASN1Enc_RefPictureSelection(ASN1encoding_t enc, RefPictureSelection *val)
  5318. {
  5319. if (!ASN1PEREncExtensionBitClear(enc))
  5320. return 0;
  5321. if (!ASN1PEREncBits(enc, 1, (val)->o))
  5322. return 0;
  5323. if ((val)->o[0] & 0x80) {
  5324. if (!ASN1Enc_RefPictureSelection_additionalPictureMemory(enc, &(val)->additionalPictureMemory))
  5325. return 0;
  5326. }
  5327. if (!ASN1PEREncBoolean(enc, (val)->videoMux))
  5328. return 0;
  5329. if (!ASN1Enc_RefPictureSelection_videoBackChannelSend(enc, &(val)->videoBackChannelSend))
  5330. return 0;
  5331. return 1;
  5332. }
  5333. static int ASN1CALL ASN1Dec_RefPictureSelection(ASN1decoding_t dec, RefPictureSelection *val)
  5334. {
  5335. ASN1uint32_t y;
  5336. if (!ASN1PERDecExtensionBit(dec, &y))
  5337. return 0;
  5338. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  5339. return 0;
  5340. if ((val)->o[0] & 0x80) {
  5341. if (!ASN1Dec_RefPictureSelection_additionalPictureMemory(dec, &(val)->additionalPictureMemory))
  5342. return 0;
  5343. }
  5344. if (!ASN1PERDecBoolean(dec, &(val)->videoMux))
  5345. return 0;
  5346. if (!ASN1Dec_RefPictureSelection_videoBackChannelSend(dec, &(val)->videoBackChannelSend))
  5347. return 0;
  5348. if (y) {
  5349. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5350. return 0;
  5351. }
  5352. return 1;
  5353. }
  5354. static int ASN1CALL ASN1Enc_CustomPictureClockFrequency(ASN1encoding_t enc, CustomPictureClockFrequency *val)
  5355. {
  5356. if (!ASN1PEREncExtensionBitClear(enc))
  5357. return 0;
  5358. if (!ASN1PEREncBits(enc, 5, (val)->o))
  5359. return 0;
  5360. if (!ASN1PEREncBitVal(enc, 1, (val)->clockConversionCode - 1000))
  5361. return 0;
  5362. if (!ASN1PEREncBitVal(enc, 7, (val)->clockDivisor - 1))
  5363. return 0;
  5364. if ((val)->o[0] & 0x80) {
  5365. if (!ASN1PEREncUnsignedShort(enc, (val)->sqcifMPI - 1))
  5366. return 0;
  5367. }
  5368. if ((val)->o[0] & 0x40) {
  5369. if (!ASN1PEREncUnsignedShort(enc, (val)->qcifMPI - 1))
  5370. return 0;
  5371. }
  5372. if ((val)->o[0] & 0x20) {
  5373. if (!ASN1PEREncUnsignedShort(enc, (val)->cifMPI - 1))
  5374. return 0;
  5375. }
  5376. if ((val)->o[0] & 0x10) {
  5377. if (!ASN1PEREncUnsignedShort(enc, (val)->cif4MPI - 1))
  5378. return 0;
  5379. }
  5380. if ((val)->o[0] & 0x8) {
  5381. if (!ASN1PEREncUnsignedShort(enc, (val)->cif16MPI - 1))
  5382. return 0;
  5383. }
  5384. return 1;
  5385. }
  5386. static int ASN1CALL ASN1Dec_CustomPictureClockFrequency(ASN1decoding_t dec, CustomPictureClockFrequency *val)
  5387. {
  5388. ASN1uint32_t y;
  5389. if (!ASN1PERDecExtensionBit(dec, &y))
  5390. return 0;
  5391. if (!ASN1PERDecExtension(dec, 5, (val)->o))
  5392. return 0;
  5393. if (!ASN1PERDecU16Val(dec, 1, &(val)->clockConversionCode))
  5394. return 0;
  5395. (val)->clockConversionCode += 1000;
  5396. if (!ASN1PERDecU16Val(dec, 7, &(val)->clockDivisor))
  5397. return 0;
  5398. (val)->clockDivisor += 1;
  5399. if ((val)->o[0] & 0x80) {
  5400. if (!ASN1PERDecUnsignedShort(dec, &(val)->sqcifMPI))
  5401. return 0;
  5402. (val)->sqcifMPI += 1;
  5403. }
  5404. if ((val)->o[0] & 0x40) {
  5405. if (!ASN1PERDecUnsignedShort(dec, &(val)->qcifMPI))
  5406. return 0;
  5407. (val)->qcifMPI += 1;
  5408. }
  5409. if ((val)->o[0] & 0x20) {
  5410. if (!ASN1PERDecUnsignedShort(dec, &(val)->cifMPI))
  5411. return 0;
  5412. (val)->cifMPI += 1;
  5413. }
  5414. if ((val)->o[0] & 0x10) {
  5415. if (!ASN1PERDecUnsignedShort(dec, &(val)->cif4MPI))
  5416. return 0;
  5417. (val)->cif4MPI += 1;
  5418. }
  5419. if ((val)->o[0] & 0x8) {
  5420. if (!ASN1PERDecUnsignedShort(dec, &(val)->cif16MPI))
  5421. return 0;
  5422. (val)->cif16MPI += 1;
  5423. }
  5424. if (y) {
  5425. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5426. return 0;
  5427. }
  5428. return 1;
  5429. }
  5430. static int ASN1CALL ASN1Enc_CustomPictureFormat(ASN1encoding_t enc, CustomPictureFormat *val)
  5431. {
  5432. if (!ASN1PEREncExtensionBitClear(enc))
  5433. return 0;
  5434. if (!ASN1PEREncUnsignedShort(enc, (val)->maxCustomPictureWidth - 1))
  5435. return 0;
  5436. if (!ASN1PEREncUnsignedShort(enc, (val)->maxCustomPictureHeight - 1))
  5437. return 0;
  5438. if (!ASN1PEREncUnsignedShort(enc, (val)->minCustomPictureWidth - 1))
  5439. return 0;
  5440. if (!ASN1PEREncUnsignedShort(enc, (val)->minCustomPictureHeight - 1))
  5441. return 0;
  5442. if (!ASN1Enc_CustomPictureFormat_mPI(enc, &(val)->mPI))
  5443. return 0;
  5444. if (!ASN1Enc_CustomPictureFormat_pixelAspectInformation(enc, &(val)->pixelAspectInformation))
  5445. return 0;
  5446. return 1;
  5447. }
  5448. static int ASN1CALL ASN1Dec_CustomPictureFormat(ASN1decoding_t dec, CustomPictureFormat *val)
  5449. {
  5450. ASN1uint32_t y;
  5451. if (!ASN1PERDecExtensionBit(dec, &y))
  5452. return 0;
  5453. if (!ASN1PERDecUnsignedShort(dec, &(val)->maxCustomPictureWidth))
  5454. return 0;
  5455. (val)->maxCustomPictureWidth += 1;
  5456. if (!ASN1PERDecUnsignedShort(dec, &(val)->maxCustomPictureHeight))
  5457. return 0;
  5458. (val)->maxCustomPictureHeight += 1;
  5459. if (!ASN1PERDecUnsignedShort(dec, &(val)->minCustomPictureWidth))
  5460. return 0;
  5461. (val)->minCustomPictureWidth += 1;
  5462. if (!ASN1PERDecUnsignedShort(dec, &(val)->minCustomPictureHeight))
  5463. return 0;
  5464. (val)->minCustomPictureHeight += 1;
  5465. if (!ASN1Dec_CustomPictureFormat_mPI(dec, &(val)->mPI))
  5466. return 0;
  5467. if (!ASN1Dec_CustomPictureFormat_pixelAspectInformation(dec, &(val)->pixelAspectInformation))
  5468. return 0;
  5469. if (y) {
  5470. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5471. return 0;
  5472. }
  5473. return 1;
  5474. }
  5475. static void ASN1CALL ASN1Free_CustomPictureFormat(CustomPictureFormat *val)
  5476. {
  5477. if (val) {
  5478. ASN1Free_CustomPictureFormat_mPI(&(val)->mPI);
  5479. ASN1Free_CustomPictureFormat_pixelAspectInformation(&(val)->pixelAspectInformation);
  5480. }
  5481. }
  5482. static int ASN1CALL ASN1Enc_H263ModeComboFlags(ASN1encoding_t enc, H263ModeComboFlags *val)
  5483. {
  5484. if (!ASN1PEREncExtensionBitClear(enc))
  5485. return 0;
  5486. if (!ASN1PEREncBoolean(enc, (val)->unrestrictedVector))
  5487. return 0;
  5488. if (!ASN1PEREncBoolean(enc, (val)->arithmeticCoding))
  5489. return 0;
  5490. if (!ASN1PEREncBoolean(enc, (val)->advancedPrediction))
  5491. return 0;
  5492. if (!ASN1PEREncBoolean(enc, (val)->pbFrames))
  5493. return 0;
  5494. if (!ASN1PEREncBoolean(enc, (val)->advancedIntraCodingMode))
  5495. return 0;
  5496. if (!ASN1PEREncBoolean(enc, (val)->deblockingFilterMode))
  5497. return 0;
  5498. if (!ASN1PEREncBoolean(enc, (val)->unlimitedMotionVectors))
  5499. return 0;
  5500. if (!ASN1PEREncBoolean(enc, (val)->slicesInOrder_NonRect))
  5501. return 0;
  5502. if (!ASN1PEREncBoolean(enc, (val)->slicesInOrder_Rect))
  5503. return 0;
  5504. if (!ASN1PEREncBoolean(enc, (val)->slicesNoOrder_NonRect))
  5505. return 0;
  5506. if (!ASN1PEREncBoolean(enc, (val)->slicesNoOrder_Rect))
  5507. return 0;
  5508. if (!ASN1PEREncBoolean(enc, (val)->improvedPBFramesMode))
  5509. return 0;
  5510. if (!ASN1PEREncBoolean(enc, (val)->referencePicSelect))
  5511. return 0;
  5512. if (!ASN1PEREncBoolean(enc, (val)->dynamicPictureResizingByFour))
  5513. return 0;
  5514. if (!ASN1PEREncBoolean(enc, (val)->dynamicPictureResizingSixteenthPel))
  5515. return 0;
  5516. if (!ASN1PEREncBoolean(enc, (val)->dynamicWarpingHalfPel))
  5517. return 0;
  5518. if (!ASN1PEREncBoolean(enc, (val)->dynamicWarpingSixteenthPel))
  5519. return 0;
  5520. if (!ASN1PEREncBoolean(enc, (val)->reducedResolutionUpdate))
  5521. return 0;
  5522. if (!ASN1PEREncBoolean(enc, (val)->independentSegmentDecoding))
  5523. return 0;
  5524. if (!ASN1PEREncBoolean(enc, (val)->alternateInterVLCMode))
  5525. return 0;
  5526. if (!ASN1PEREncBoolean(enc, (val)->modifiedQuantizationMode))
  5527. return 0;
  5528. return 1;
  5529. }
  5530. static int ASN1CALL ASN1Dec_H263ModeComboFlags(ASN1decoding_t dec, H263ModeComboFlags *val)
  5531. {
  5532. ASN1uint32_t y;
  5533. if (!ASN1PERDecExtensionBit(dec, &y))
  5534. return 0;
  5535. if (!ASN1PERDecBoolean(dec, &(val)->unrestrictedVector))
  5536. return 0;
  5537. if (!ASN1PERDecBoolean(dec, &(val)->arithmeticCoding))
  5538. return 0;
  5539. if (!ASN1PERDecBoolean(dec, &(val)->advancedPrediction))
  5540. return 0;
  5541. if (!ASN1PERDecBoolean(dec, &(val)->pbFrames))
  5542. return 0;
  5543. if (!ASN1PERDecBoolean(dec, &(val)->advancedIntraCodingMode))
  5544. return 0;
  5545. if (!ASN1PERDecBoolean(dec, &(val)->deblockingFilterMode))
  5546. return 0;
  5547. if (!ASN1PERDecBoolean(dec, &(val)->unlimitedMotionVectors))
  5548. return 0;
  5549. if (!ASN1PERDecBoolean(dec, &(val)->slicesInOrder_NonRect))
  5550. return 0;
  5551. if (!ASN1PERDecBoolean(dec, &(val)->slicesInOrder_Rect))
  5552. return 0;
  5553. if (!ASN1PERDecBoolean(dec, &(val)->slicesNoOrder_NonRect))
  5554. return 0;
  5555. if (!ASN1PERDecBoolean(dec, &(val)->slicesNoOrder_Rect))
  5556. return 0;
  5557. if (!ASN1PERDecBoolean(dec, &(val)->improvedPBFramesMode))
  5558. return 0;
  5559. if (!ASN1PERDecBoolean(dec, &(val)->referencePicSelect))
  5560. return 0;
  5561. if (!ASN1PERDecBoolean(dec, &(val)->dynamicPictureResizingByFour))
  5562. return 0;
  5563. if (!ASN1PERDecBoolean(dec, &(val)->dynamicPictureResizingSixteenthPel))
  5564. return 0;
  5565. if (!ASN1PERDecBoolean(dec, &(val)->dynamicWarpingHalfPel))
  5566. return 0;
  5567. if (!ASN1PERDecBoolean(dec, &(val)->dynamicWarpingSixteenthPel))
  5568. return 0;
  5569. if (!ASN1PERDecBoolean(dec, &(val)->reducedResolutionUpdate))
  5570. return 0;
  5571. if (!ASN1PERDecBoolean(dec, &(val)->independentSegmentDecoding))
  5572. return 0;
  5573. if (!ASN1PERDecBoolean(dec, &(val)->alternateInterVLCMode))
  5574. return 0;
  5575. if (!ASN1PERDecBoolean(dec, &(val)->modifiedQuantizationMode))
  5576. return 0;
  5577. if (y) {
  5578. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5579. return 0;
  5580. }
  5581. return 1;
  5582. }
  5583. static int ASN1CALL ASN1Enc_IS11172VideoCapability(ASN1encoding_t enc, IS11172VideoCapability *val)
  5584. {
  5585. ASN1uint32_t l;
  5586. if (!ASN1PEREncExtensionBitClear(enc))
  5587. return 0;
  5588. if (!ASN1PEREncBits(enc, 6, (val)->o))
  5589. return 0;
  5590. if (!ASN1PEREncBoolean(enc, (val)->constrainedBitstream))
  5591. return 0;
  5592. if ((val)->o[0] & 0x80) {
  5593. l = ASN1uint32_uoctets((val)->videoBitRate);
  5594. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  5595. return 0;
  5596. ASN1PEREncAlignment(enc);
  5597. if (!ASN1PEREncBitVal(enc, l * 8, (val)->videoBitRate))
  5598. return 0;
  5599. }
  5600. if ((val)->o[0] & 0x40) {
  5601. l = ASN1uint32_uoctets((val)->vbvBufferSize);
  5602. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  5603. return 0;
  5604. ASN1PEREncAlignment(enc);
  5605. if (!ASN1PEREncBitVal(enc, l * 8, (val)->vbvBufferSize))
  5606. return 0;
  5607. }
  5608. if ((val)->o[0] & 0x20) {
  5609. if (!ASN1PEREncUnsignedShort(enc, (val)->samplesPerLine))
  5610. return 0;
  5611. }
  5612. if ((val)->o[0] & 0x10) {
  5613. if (!ASN1PEREncUnsignedShort(enc, (val)->linesPerFrame))
  5614. return 0;
  5615. }
  5616. if ((val)->o[0] & 0x8) {
  5617. if (!ASN1PEREncBitVal(enc, 4, (val)->pictureRate))
  5618. return 0;
  5619. }
  5620. if ((val)->o[0] & 0x4) {
  5621. l = ASN1uint32_uoctets((val)->luminanceSampleRate);
  5622. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  5623. return 0;
  5624. ASN1PEREncAlignment(enc);
  5625. if (!ASN1PEREncBitVal(enc, l * 8, (val)->luminanceSampleRate))
  5626. return 0;
  5627. }
  5628. return 1;
  5629. }
  5630. static int ASN1CALL ASN1Dec_IS11172VideoCapability(ASN1decoding_t dec, IS11172VideoCapability *val)
  5631. {
  5632. ASN1uint32_t y;
  5633. ASN1uint32_t l;
  5634. if (!ASN1PERDecExtensionBit(dec, &y))
  5635. return 0;
  5636. if (!ASN1PERDecExtension(dec, 6, (val)->o))
  5637. return 0;
  5638. if (!ASN1PERDecBoolean(dec, &(val)->constrainedBitstream))
  5639. return 0;
  5640. if ((val)->o[0] & 0x80) {
  5641. if (!ASN1PERDecU32Val(dec, 2, &l))
  5642. return 0;
  5643. l += 1;
  5644. ASN1PERDecAlignment(dec);
  5645. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->videoBitRate))
  5646. return 0;
  5647. }
  5648. if ((val)->o[0] & 0x40) {
  5649. if (!ASN1PERDecU32Val(dec, 2, &l))
  5650. return 0;
  5651. l += 1;
  5652. ASN1PERDecAlignment(dec);
  5653. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->vbvBufferSize))
  5654. return 0;
  5655. }
  5656. if ((val)->o[0] & 0x20) {
  5657. if (!ASN1PERDecUnsignedShort(dec, &(val)->samplesPerLine))
  5658. return 0;
  5659. }
  5660. if ((val)->o[0] & 0x10) {
  5661. if (!ASN1PERDecUnsignedShort(dec, &(val)->linesPerFrame))
  5662. return 0;
  5663. }
  5664. if ((val)->o[0] & 0x8) {
  5665. if (!ASN1PERDecU16Val(dec, 4, &(val)->pictureRate))
  5666. return 0;
  5667. }
  5668. if ((val)->o[0] & 0x4) {
  5669. if (!ASN1PERDecU32Val(dec, 2, &l))
  5670. return 0;
  5671. l += 1;
  5672. ASN1PERDecAlignment(dec);
  5673. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->luminanceSampleRate))
  5674. return 0;
  5675. }
  5676. if (y) {
  5677. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5678. return 0;
  5679. }
  5680. return 1;
  5681. }
  5682. static int ASN1CALL ASN1Enc_G7231AnnexCCapability(ASN1encoding_t enc, G7231AnnexCCapability *val)
  5683. {
  5684. if (!ASN1PEREncExtensionBitClear(enc))
  5685. return 0;
  5686. if (!ASN1PEREncBits(enc, 1, (val)->o))
  5687. return 0;
  5688. ASN1PEREncAlignment(enc);
  5689. if (!ASN1PEREncBitVal(enc, 8, (val)->maxAl_sduAudioFrames - 1))
  5690. return 0;
  5691. if (!ASN1PEREncBoolean(enc, (val)->silenceSuppression))
  5692. return 0;
  5693. if ((val)->o[0] & 0x80) {
  5694. if (!ASN1Enc_G7231AnnexCCapability_g723AnnexCAudioMode(enc, &(val)->g723AnnexCAudioMode))
  5695. return 0;
  5696. }
  5697. return 1;
  5698. }
  5699. static int ASN1CALL ASN1Dec_G7231AnnexCCapability(ASN1decoding_t dec, G7231AnnexCCapability *val)
  5700. {
  5701. ASN1uint32_t y;
  5702. if (!ASN1PERDecExtensionBit(dec, &y))
  5703. return 0;
  5704. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  5705. return 0;
  5706. ASN1PERDecAlignment(dec);
  5707. if (!ASN1PERDecU16Val(dec, 8, &(val)->maxAl_sduAudioFrames))
  5708. return 0;
  5709. (val)->maxAl_sduAudioFrames += 1;
  5710. if (!ASN1PERDecBoolean(dec, &(val)->silenceSuppression))
  5711. return 0;
  5712. if ((val)->o[0] & 0x80) {
  5713. if (!ASN1Dec_G7231AnnexCCapability_g723AnnexCAudioMode(dec, &(val)->g723AnnexCAudioMode))
  5714. return 0;
  5715. }
  5716. if (y) {
  5717. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5718. return 0;
  5719. }
  5720. return 1;
  5721. }
  5722. static int ASN1CALL ASN1Enc_IS11172AudioCapability(ASN1encoding_t enc, IS11172AudioCapability *val)
  5723. {
  5724. if (!ASN1PEREncExtensionBitClear(enc))
  5725. return 0;
  5726. if (!ASN1PEREncBoolean(enc, (val)->audioLayer1))
  5727. return 0;
  5728. if (!ASN1PEREncBoolean(enc, (val)->audioLayer2))
  5729. return 0;
  5730. if (!ASN1PEREncBoolean(enc, (val)->audioLayer3))
  5731. return 0;
  5732. if (!ASN1PEREncBoolean(enc, (val)->audioSampling32k))
  5733. return 0;
  5734. if (!ASN1PEREncBoolean(enc, (val)->audioSampling44k1))
  5735. return 0;
  5736. if (!ASN1PEREncBoolean(enc, (val)->audioSampling48k))
  5737. return 0;
  5738. if (!ASN1PEREncBoolean(enc, (val)->singleChannel))
  5739. return 0;
  5740. if (!ASN1PEREncBoolean(enc, (val)->twoChannels))
  5741. return 0;
  5742. if (!ASN1PEREncUnsignedShort(enc, (val)->bitRate - 1))
  5743. return 0;
  5744. return 1;
  5745. }
  5746. static int ASN1CALL ASN1Dec_IS11172AudioCapability(ASN1decoding_t dec, IS11172AudioCapability *val)
  5747. {
  5748. ASN1uint32_t y;
  5749. if (!ASN1PERDecExtensionBit(dec, &y))
  5750. return 0;
  5751. if (!ASN1PERDecBoolean(dec, &(val)->audioLayer1))
  5752. return 0;
  5753. if (!ASN1PERDecBoolean(dec, &(val)->audioLayer2))
  5754. return 0;
  5755. if (!ASN1PERDecBoolean(dec, &(val)->audioLayer3))
  5756. return 0;
  5757. if (!ASN1PERDecBoolean(dec, &(val)->audioSampling32k))
  5758. return 0;
  5759. if (!ASN1PERDecBoolean(dec, &(val)->audioSampling44k1))
  5760. return 0;
  5761. if (!ASN1PERDecBoolean(dec, &(val)->audioSampling48k))
  5762. return 0;
  5763. if (!ASN1PERDecBoolean(dec, &(val)->singleChannel))
  5764. return 0;
  5765. if (!ASN1PERDecBoolean(dec, &(val)->twoChannels))
  5766. return 0;
  5767. if (!ASN1PERDecUnsignedShort(dec, &(val)->bitRate))
  5768. return 0;
  5769. (val)->bitRate += 1;
  5770. if (y) {
  5771. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5772. return 0;
  5773. }
  5774. return 1;
  5775. }
  5776. static int ASN1CALL ASN1Enc_IS13818AudioCapability(ASN1encoding_t enc, IS13818AudioCapability *val)
  5777. {
  5778. if (!ASN1PEREncExtensionBitClear(enc))
  5779. return 0;
  5780. if (!ASN1PEREncBoolean(enc, (val)->audioLayer1))
  5781. return 0;
  5782. if (!ASN1PEREncBoolean(enc, (val)->audioLayer2))
  5783. return 0;
  5784. if (!ASN1PEREncBoolean(enc, (val)->audioLayer3))
  5785. return 0;
  5786. if (!ASN1PEREncBoolean(enc, (val)->audioSampling16k))
  5787. return 0;
  5788. if (!ASN1PEREncBoolean(enc, (val)->audioSampling22k05))
  5789. return 0;
  5790. if (!ASN1PEREncBoolean(enc, (val)->audioSampling24k))
  5791. return 0;
  5792. if (!ASN1PEREncBoolean(enc, (val)->audioSampling32k))
  5793. return 0;
  5794. if (!ASN1PEREncBoolean(enc, (val)->audioSampling44k1))
  5795. return 0;
  5796. if (!ASN1PEREncBoolean(enc, (val)->audioSampling48k))
  5797. return 0;
  5798. if (!ASN1PEREncBoolean(enc, (val)->singleChannel))
  5799. return 0;
  5800. if (!ASN1PEREncBoolean(enc, (val)->twoChannels))
  5801. return 0;
  5802. if (!ASN1PEREncBoolean(enc, (val)->threeChannels2_1))
  5803. return 0;
  5804. if (!ASN1PEREncBoolean(enc, (val)->threeChannels3_0))
  5805. return 0;
  5806. if (!ASN1PEREncBoolean(enc, (val)->fourChannels2_0_2_0))
  5807. return 0;
  5808. if (!ASN1PEREncBoolean(enc, (val)->fourChannels2_2))
  5809. return 0;
  5810. if (!ASN1PEREncBoolean(enc, (val)->fourChannels3_1))
  5811. return 0;
  5812. if (!ASN1PEREncBoolean(enc, (val)->fiveChannels3_0_2_0))
  5813. return 0;
  5814. if (!ASN1PEREncBoolean(enc, (val)->fiveChannels3_2))
  5815. return 0;
  5816. if (!ASN1PEREncBoolean(enc, (val)->lowFrequencyEnhancement))
  5817. return 0;
  5818. if (!ASN1PEREncBoolean(enc, (val)->multilingual))
  5819. return 0;
  5820. if (!ASN1PEREncUnsignedShort(enc, (val)->bitRate - 1))
  5821. return 0;
  5822. return 1;
  5823. }
  5824. static int ASN1CALL ASN1Dec_IS13818AudioCapability(ASN1decoding_t dec, IS13818AudioCapability *val)
  5825. {
  5826. ASN1uint32_t y;
  5827. if (!ASN1PERDecExtensionBit(dec, &y))
  5828. return 0;
  5829. if (!ASN1PERDecBoolean(dec, &(val)->audioLayer1))
  5830. return 0;
  5831. if (!ASN1PERDecBoolean(dec, &(val)->audioLayer2))
  5832. return 0;
  5833. if (!ASN1PERDecBoolean(dec, &(val)->audioLayer3))
  5834. return 0;
  5835. if (!ASN1PERDecBoolean(dec, &(val)->audioSampling16k))
  5836. return 0;
  5837. if (!ASN1PERDecBoolean(dec, &(val)->audioSampling22k05))
  5838. return 0;
  5839. if (!ASN1PERDecBoolean(dec, &(val)->audioSampling24k))
  5840. return 0;
  5841. if (!ASN1PERDecBoolean(dec, &(val)->audioSampling32k))
  5842. return 0;
  5843. if (!ASN1PERDecBoolean(dec, &(val)->audioSampling44k1))
  5844. return 0;
  5845. if (!ASN1PERDecBoolean(dec, &(val)->audioSampling48k))
  5846. return 0;
  5847. if (!ASN1PERDecBoolean(dec, &(val)->singleChannel))
  5848. return 0;
  5849. if (!ASN1PERDecBoolean(dec, &(val)->twoChannels))
  5850. return 0;
  5851. if (!ASN1PERDecBoolean(dec, &(val)->threeChannels2_1))
  5852. return 0;
  5853. if (!ASN1PERDecBoolean(dec, &(val)->threeChannels3_0))
  5854. return 0;
  5855. if (!ASN1PERDecBoolean(dec, &(val)->fourChannels2_0_2_0))
  5856. return 0;
  5857. if (!ASN1PERDecBoolean(dec, &(val)->fourChannels2_2))
  5858. return 0;
  5859. if (!ASN1PERDecBoolean(dec, &(val)->fourChannels3_1))
  5860. return 0;
  5861. if (!ASN1PERDecBoolean(dec, &(val)->fiveChannels3_0_2_0))
  5862. return 0;
  5863. if (!ASN1PERDecBoolean(dec, &(val)->fiveChannels3_2))
  5864. return 0;
  5865. if (!ASN1PERDecBoolean(dec, &(val)->lowFrequencyEnhancement))
  5866. return 0;
  5867. if (!ASN1PERDecBoolean(dec, &(val)->multilingual))
  5868. return 0;
  5869. if (!ASN1PERDecUnsignedShort(dec, &(val)->bitRate))
  5870. return 0;
  5871. (val)->bitRate += 1;
  5872. if (y) {
  5873. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5874. return 0;
  5875. }
  5876. return 1;
  5877. }
  5878. static int ASN1CALL ASN1Enc_GSMAudioCapability(ASN1encoding_t enc, GSMAudioCapability *val)
  5879. {
  5880. if (!ASN1PEREncExtensionBitClear(enc))
  5881. return 0;
  5882. ASN1PEREncAlignment(enc);
  5883. if (!ASN1PEREncBitVal(enc, 8, (val)->audioUnitSize - 1))
  5884. return 0;
  5885. if (!ASN1PEREncBoolean(enc, (val)->comfortNoise))
  5886. return 0;
  5887. if (!ASN1PEREncBoolean(enc, (val)->scrambled))
  5888. return 0;
  5889. return 1;
  5890. }
  5891. static int ASN1CALL ASN1Dec_GSMAudioCapability(ASN1decoding_t dec, GSMAudioCapability *val)
  5892. {
  5893. ASN1uint32_t y;
  5894. if (!ASN1PERDecExtensionBit(dec, &y))
  5895. return 0;
  5896. ASN1PERDecAlignment(dec);
  5897. if (!ASN1PERDecU16Val(dec, 8, &(val)->audioUnitSize))
  5898. return 0;
  5899. (val)->audioUnitSize += 1;
  5900. if (!ASN1PERDecBoolean(dec, &(val)->comfortNoise))
  5901. return 0;
  5902. if (!ASN1PERDecBoolean(dec, &(val)->scrambled))
  5903. return 0;
  5904. if (y) {
  5905. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5906. return 0;
  5907. }
  5908. return 1;
  5909. }
  5910. static int ASN1CALL ASN1Enc_V42bis(ASN1encoding_t enc, V42bis *val)
  5911. {
  5912. if (!ASN1PEREncExtensionBitClear(enc))
  5913. return 0;
  5914. ASN1PEREncAlignment(enc);
  5915. if (!ASN1PEREncBitVal(enc, 16, (val)->numberOfCodewords - 1))
  5916. return 0;
  5917. ASN1PEREncAlignment(enc);
  5918. if (!ASN1PEREncBitVal(enc, 8, (val)->maximumStringLength - 1))
  5919. return 0;
  5920. return 1;
  5921. }
  5922. static int ASN1CALL ASN1Dec_V42bis(ASN1decoding_t dec, V42bis *val)
  5923. {
  5924. ASN1uint32_t y;
  5925. if (!ASN1PERDecExtensionBit(dec, &y))
  5926. return 0;
  5927. ASN1PERDecAlignment(dec);
  5928. if (!ASN1PERDecU32Val(dec, 16, &(val)->numberOfCodewords))
  5929. return 0;
  5930. (val)->numberOfCodewords += 1;
  5931. ASN1PERDecAlignment(dec);
  5932. if (!ASN1PERDecU16Val(dec, 8, &(val)->maximumStringLength))
  5933. return 0;
  5934. (val)->maximumStringLength += 1;
  5935. if (y) {
  5936. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5937. return 0;
  5938. }
  5939. return 1;
  5940. }
  5941. static int ASN1CALL ASN1Enc_T84Profile(ASN1encoding_t enc, T84Profile *val)
  5942. {
  5943. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  5944. return 0;
  5945. switch ((val)->choice) {
  5946. case 1:
  5947. break;
  5948. case 2:
  5949. if (!ASN1Enc_T84Profile_t84Restricted(enc, &(val)->u.t84Restricted))
  5950. return 0;
  5951. break;
  5952. default:
  5953. /* impossible */
  5954. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  5955. return 0;
  5956. }
  5957. return 1;
  5958. }
  5959. static int ASN1CALL ASN1Dec_T84Profile(ASN1decoding_t dec, T84Profile *val)
  5960. {
  5961. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  5962. return 0;
  5963. switch ((val)->choice) {
  5964. case 1:
  5965. break;
  5966. case 2:
  5967. if (!ASN1Dec_T84Profile_t84Restricted(dec, &(val)->u.t84Restricted))
  5968. return 0;
  5969. break;
  5970. default:
  5971. /* impossible */
  5972. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  5973. return 0;
  5974. }
  5975. return 1;
  5976. }
  5977. static int ASN1CALL ASN1Enc_ConferenceCapability(ASN1encoding_t enc, ConferenceCapability *val)
  5978. {
  5979. ASN1octet_t o[2];
  5980. ASN1uint32_t y;
  5981. ASN1encoding_t ee;
  5982. CopyMemory(o, (val)->o, 2);
  5983. o[1] |= 0x80;
  5984. y = ASN1PEREncCheckExtensions(1, (val)->o + 1);
  5985. if (!ASN1PEREncBitVal(enc, 1, y))
  5986. return 0;
  5987. if (!ASN1PEREncBits(enc, 1, o))
  5988. return 0;
  5989. if (o[0] & 0x80) {
  5990. if (!ASN1Enc_ConferenceCapability_nonStandardData(enc, &(val)->nonStandardData))
  5991. return 0;
  5992. }
  5993. if (!ASN1PEREncBoolean(enc, (val)->chairControlCapability))
  5994. return 0;
  5995. if (y) {
  5996. if (!ASN1PEREncNormallySmallBits(enc, 1, o + 1))
  5997. return 0;
  5998. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  5999. return 0;
  6000. if (o[1] & 0x80) {
  6001. if (!ASN1PEREncBoolean(ee, (val)->videoIndicateMixingCapability))
  6002. return 0;
  6003. if (!ASN1PEREncFlushFragmentedToParent(ee))
  6004. return 0;
  6005. }
  6006. ASN1_CloseEncoder2(ee);
  6007. }
  6008. return 1;
  6009. }
  6010. static int ASN1CALL ASN1Dec_ConferenceCapability(ASN1decoding_t dec, ConferenceCapability *val)
  6011. {
  6012. ASN1uint32_t y;
  6013. ASN1decoding_t dd;
  6014. ASN1octet_t *db;
  6015. ASN1uint32_t ds;
  6016. ASN1uint32_t i;
  6017. ASN1uint32_t e;
  6018. if (!ASN1PERDecExtensionBit(dec, &y))
  6019. return 0;
  6020. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  6021. return 0;
  6022. if ((val)->o[0] & 0x80) {
  6023. if (!ASN1Dec_ConferenceCapability_nonStandardData(dec, &(val)->nonStandardData))
  6024. return 0;
  6025. }
  6026. if (!ASN1PERDecBoolean(dec, &(val)->chairControlCapability))
  6027. return 0;
  6028. if (!y) {
  6029. ZeroMemory((val)->o + 1, 1);
  6030. } else {
  6031. if (!ASN1PERDecNormallySmallExtension(dec, &e, 1, (val)->o + 1))
  6032. return 0;
  6033. if ((val)->o[1] & 0x80) {
  6034. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  6035. return 0;
  6036. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  6037. return 0;
  6038. if (!ASN1PERDecBoolean(dd, &(val)->videoIndicateMixingCapability))
  6039. return 0;
  6040. ASN1_CloseDecoder(dd);
  6041. ASN1Free(db);
  6042. }
  6043. for (i = 0; i < e; i++) {
  6044. if (!ASN1PERDecSkipFragmented(dec, 8))
  6045. return 0;
  6046. }
  6047. }
  6048. return 1;
  6049. }
  6050. static void ASN1CALL ASN1Free_ConferenceCapability(ConferenceCapability *val)
  6051. {
  6052. if (val) {
  6053. if ((val)->o[0] & 0x80) {
  6054. ASN1Free_ConferenceCapability_nonStandardData(&(val)->nonStandardData);
  6055. }
  6056. }
  6057. }
  6058. static int ASN1CALL ASN1Enc_Q2931Address(ASN1encoding_t enc, Q2931Address *val)
  6059. {
  6060. if (!ASN1PEREncExtensionBitClear(enc))
  6061. return 0;
  6062. if (!ASN1PEREncBits(enc, 1, (val)->o))
  6063. return 0;
  6064. if (!ASN1Enc_Q2931Address_address(enc, &(val)->address))
  6065. return 0;
  6066. if ((val)->o[0] & 0x80) {
  6067. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->subaddress, 1, 20, 5))
  6068. return 0;
  6069. }
  6070. return 1;
  6071. }
  6072. static int ASN1CALL ASN1Dec_Q2931Address(ASN1decoding_t dec, Q2931Address *val)
  6073. {
  6074. ASN1uint32_t y;
  6075. if (!ASN1PERDecExtensionBit(dec, &y))
  6076. return 0;
  6077. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  6078. return 0;
  6079. if (!ASN1Dec_Q2931Address_address(dec, &(val)->address))
  6080. return 0;
  6081. if ((val)->o[0] & 0x80) {
  6082. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->subaddress, 1, 20, 5))
  6083. return 0;
  6084. }
  6085. if (y) {
  6086. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6087. return 0;
  6088. }
  6089. return 1;
  6090. }
  6091. static void ASN1CALL ASN1Free_Q2931Address(Q2931Address *val)
  6092. {
  6093. if (val) {
  6094. ASN1Free_Q2931Address_address(&(val)->address);
  6095. if ((val)->o[0] & 0x80) {
  6096. }
  6097. }
  6098. }
  6099. static int ASN1CALL ASN1Enc_V75Parameters(ASN1encoding_t enc, V75Parameters *val)
  6100. {
  6101. if (!ASN1PEREncExtensionBitClear(enc))
  6102. return 0;
  6103. if (!ASN1PEREncBoolean(enc, (val)->audioHeaderPresent))
  6104. return 0;
  6105. return 1;
  6106. }
  6107. static int ASN1CALL ASN1Dec_V75Parameters(ASN1decoding_t dec, V75Parameters *val)
  6108. {
  6109. ASN1uint32_t y;
  6110. if (!ASN1PERDecExtensionBit(dec, &y))
  6111. return 0;
  6112. if (!ASN1PERDecBoolean(dec, &(val)->audioHeaderPresent))
  6113. return 0;
  6114. if (y) {
  6115. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6116. return 0;
  6117. }
  6118. return 1;
  6119. }
  6120. static int ASN1CALL ASN1Enc_H222LogicalChannelParameters(ASN1encoding_t enc, H222LogicalChannelParameters *val)
  6121. {
  6122. if (!ASN1PEREncExtensionBitClear(enc))
  6123. return 0;
  6124. if (!ASN1PEREncBits(enc, 3, (val)->o))
  6125. return 0;
  6126. if (!ASN1PEREncUnsignedShort(enc, (val)->resourceID))
  6127. return 0;
  6128. if (!ASN1PEREncUnsignedShort(enc, (val)->subChannelID))
  6129. return 0;
  6130. if ((val)->o[0] & 0x80) {
  6131. if (!ASN1PEREncUnsignedShort(enc, (val)->pcr_pid))
  6132. return 0;
  6133. }
  6134. if ((val)->o[0] & 0x40) {
  6135. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->programDescriptors))
  6136. return 0;
  6137. }
  6138. if ((val)->o[0] & 0x20) {
  6139. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->streamDescriptors))
  6140. return 0;
  6141. }
  6142. return 1;
  6143. }
  6144. static int ASN1CALL ASN1Dec_H222LogicalChannelParameters(ASN1decoding_t dec, H222LogicalChannelParameters *val)
  6145. {
  6146. ASN1uint32_t y;
  6147. if (!ASN1PERDecExtensionBit(dec, &y))
  6148. return 0;
  6149. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  6150. return 0;
  6151. if (!ASN1PERDecUnsignedShort(dec, &(val)->resourceID))
  6152. return 0;
  6153. if (!ASN1PERDecUnsignedShort(dec, &(val)->subChannelID))
  6154. return 0;
  6155. if ((val)->o[0] & 0x80) {
  6156. if (!ASN1PERDecUnsignedShort(dec, &(val)->pcr_pid))
  6157. return 0;
  6158. }
  6159. if ((val)->o[0] & 0x40) {
  6160. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->programDescriptors))
  6161. return 0;
  6162. }
  6163. if ((val)->o[0] & 0x20) {
  6164. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->streamDescriptors))
  6165. return 0;
  6166. }
  6167. if (y) {
  6168. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6169. return 0;
  6170. }
  6171. return 1;
  6172. }
  6173. static void ASN1CALL ASN1Free_H222LogicalChannelParameters(H222LogicalChannelParameters *val)
  6174. {
  6175. if (val) {
  6176. if ((val)->o[0] & 0x40) {
  6177. ASN1octetstring_free(&(val)->programDescriptors);
  6178. }
  6179. if ((val)->o[0] & 0x20) {
  6180. ASN1octetstring_free(&(val)->streamDescriptors);
  6181. }
  6182. }
  6183. }
  6184. static int ASN1CALL ASN1Enc_H223AL2MParameters(ASN1encoding_t enc, H223AL2MParameters *val)
  6185. {
  6186. if (!ASN1PEREncExtensionBitClear(enc))
  6187. return 0;
  6188. if (!ASN1Enc_H223AL2MParameters_headerFEC(enc, &(val)->headerFEC))
  6189. return 0;
  6190. if (!ASN1PEREncBoolean(enc, (val)->alpduInterleaving))
  6191. return 0;
  6192. return 1;
  6193. }
  6194. static int ASN1CALL ASN1Dec_H223AL2MParameters(ASN1decoding_t dec, H223AL2MParameters *val)
  6195. {
  6196. ASN1uint32_t y;
  6197. if (!ASN1PERDecExtensionBit(dec, &y))
  6198. return 0;
  6199. if (!ASN1Dec_H223AL2MParameters_headerFEC(dec, &(val)->headerFEC))
  6200. return 0;
  6201. if (!ASN1PERDecBoolean(dec, &(val)->alpduInterleaving))
  6202. return 0;
  6203. if (y) {
  6204. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6205. return 0;
  6206. }
  6207. return 1;
  6208. }
  6209. static int ASN1CALL ASN1Enc_H223AnnexCArqParameters(ASN1encoding_t enc, H223AnnexCArqParameters *val)
  6210. {
  6211. ASN1uint32_t l;
  6212. if (!ASN1PEREncExtensionBitClear(enc))
  6213. return 0;
  6214. if (!ASN1Enc_H223AnnexCArqParameters_numberOfRetransmissions(enc, &(val)->numberOfRetransmissions))
  6215. return 0;
  6216. l = ASN1uint32_uoctets((val)->sendBufferSize);
  6217. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  6218. return 0;
  6219. ASN1PEREncAlignment(enc);
  6220. if (!ASN1PEREncBitVal(enc, l * 8, (val)->sendBufferSize))
  6221. return 0;
  6222. return 1;
  6223. }
  6224. static int ASN1CALL ASN1Dec_H223AnnexCArqParameters(ASN1decoding_t dec, H223AnnexCArqParameters *val)
  6225. {
  6226. ASN1uint32_t y;
  6227. ASN1uint32_t l;
  6228. if (!ASN1PERDecExtensionBit(dec, &y))
  6229. return 0;
  6230. if (!ASN1Dec_H223AnnexCArqParameters_numberOfRetransmissions(dec, &(val)->numberOfRetransmissions))
  6231. return 0;
  6232. if (!ASN1PERDecU32Val(dec, 2, &l))
  6233. return 0;
  6234. l += 1;
  6235. ASN1PERDecAlignment(dec);
  6236. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->sendBufferSize))
  6237. return 0;
  6238. if (y) {
  6239. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6240. return 0;
  6241. }
  6242. return 1;
  6243. }
  6244. static int ASN1CALL ASN1Enc_CRCLength(ASN1encoding_t enc, CRCLength *val)
  6245. {
  6246. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  6247. return 0;
  6248. return 1;
  6249. }
  6250. static int ASN1CALL ASN1Dec_CRCLength(ASN1decoding_t dec, CRCLength *val)
  6251. {
  6252. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  6253. return 0;
  6254. return 1;
  6255. }
  6256. static int ASN1CALL ASN1Enc_EscrowData(ASN1encoding_t enc, EscrowData *val)
  6257. {
  6258. if (!ASN1PEREncExtensionBitClear(enc))
  6259. return 0;
  6260. if (!ASN1PEREncObjectIdentifier(enc, &(val)->escrowID))
  6261. return 0;
  6262. ASN1PEREncAlignment(enc);
  6263. if (!ASN1PEREncBitVal(enc, 16, ((val)->escrowValue).length - 1))
  6264. return 0;
  6265. if (!ASN1PEREncBits(enc, ((val)->escrowValue).length, ((val)->escrowValue).value))
  6266. return 0;
  6267. return 1;
  6268. }
  6269. static int ASN1CALL ASN1Dec_EscrowData(ASN1decoding_t dec, EscrowData *val)
  6270. {
  6271. ASN1uint32_t y;
  6272. if (!ASN1PERDecExtensionBit(dec, &y))
  6273. return 0;
  6274. if (!ASN1PERDecObjectIdentifier(dec, &(val)->escrowID))
  6275. return 0;
  6276. ASN1PERDecAlignment(dec);
  6277. if (!ASN1PERDecU32Val(dec, 16, &((val)->escrowValue).length))
  6278. return 0;
  6279. ((val)->escrowValue).length += 1;
  6280. if (!ASN1PERDecBits(dec, ((val)->escrowValue).length, &((val)->escrowValue).value))
  6281. return 0;
  6282. if (y) {
  6283. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6284. return 0;
  6285. }
  6286. return 1;
  6287. }
  6288. static void ASN1CALL ASN1Free_EscrowData(EscrowData *val)
  6289. {
  6290. if (val) {
  6291. ASN1objectidentifier_free(&(val)->escrowID);
  6292. ASN1bitstring_free(&(val)->escrowValue);
  6293. }
  6294. }
  6295. static int ASN1CALL ASN1Enc_OpenLogicalChannelReject(ASN1encoding_t enc, OpenLogicalChannelReject *val)
  6296. {
  6297. if (!ASN1PEREncExtensionBitClear(enc))
  6298. return 0;
  6299. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  6300. return 0;
  6301. if (!ASN1Enc_OpenLogicalChannelReject_cause(enc, &(val)->cause))
  6302. return 0;
  6303. return 1;
  6304. }
  6305. static int ASN1CALL ASN1Dec_OpenLogicalChannelReject(ASN1decoding_t dec, OpenLogicalChannelReject *val)
  6306. {
  6307. ASN1uint32_t y;
  6308. if (!ASN1PERDecExtensionBit(dec, &y))
  6309. return 0;
  6310. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  6311. return 0;
  6312. (val)->forwardLogicalChannelNumber += 1;
  6313. if (!ASN1Dec_OpenLogicalChannelReject_cause(dec, &(val)->cause))
  6314. return 0;
  6315. if (y) {
  6316. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6317. return 0;
  6318. }
  6319. return 1;
  6320. }
  6321. static int ASN1CALL ASN1Enc_OpenLogicalChannelConfirm(ASN1encoding_t enc, OpenLogicalChannelConfirm *val)
  6322. {
  6323. if (!ASN1PEREncExtensionBitClear(enc))
  6324. return 0;
  6325. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  6326. return 0;
  6327. return 1;
  6328. }
  6329. static int ASN1CALL ASN1Dec_OpenLogicalChannelConfirm(ASN1decoding_t dec, OpenLogicalChannelConfirm *val)
  6330. {
  6331. ASN1uint32_t y;
  6332. if (!ASN1PERDecExtensionBit(dec, &y))
  6333. return 0;
  6334. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  6335. return 0;
  6336. (val)->forwardLogicalChannelNumber += 1;
  6337. if (y) {
  6338. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6339. return 0;
  6340. }
  6341. return 1;
  6342. }
  6343. static int ASN1CALL ASN1Enc_CloseLogicalChannel(ASN1encoding_t enc, CloseLogicalChannel *val)
  6344. {
  6345. ASN1octet_t o[1];
  6346. ASN1uint32_t y;
  6347. ASN1encoding_t ee;
  6348. CopyMemory(o, (val)->o, 1);
  6349. o[0] |= 0x80;
  6350. y = ASN1PEREncCheckExtensions(1, (val)->o + 0);
  6351. if (!ASN1PEREncBitVal(enc, 1, y))
  6352. return 0;
  6353. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  6354. return 0;
  6355. if (!ASN1Enc_CloseLogicalChannel_source(enc, &(val)->source))
  6356. return 0;
  6357. if (y) {
  6358. if (!ASN1PEREncNormallySmallBits(enc, 1, o + 0))
  6359. return 0;
  6360. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  6361. return 0;
  6362. if (o[0] & 0x80) {
  6363. if (!ASN1Enc_CloseLogicalChannel_reason(ee, &(val)->reason))
  6364. return 0;
  6365. if (!ASN1PEREncFlushFragmentedToParent(ee))
  6366. return 0;
  6367. }
  6368. ASN1_CloseEncoder2(ee);
  6369. }
  6370. return 1;
  6371. }
  6372. static int ASN1CALL ASN1Dec_CloseLogicalChannel(ASN1decoding_t dec, CloseLogicalChannel *val)
  6373. {
  6374. ASN1uint32_t y;
  6375. ASN1decoding_t dd;
  6376. ASN1octet_t *db;
  6377. ASN1uint32_t ds;
  6378. ASN1uint32_t i;
  6379. ASN1uint32_t e;
  6380. if (!ASN1PERDecExtensionBit(dec, &y))
  6381. return 0;
  6382. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  6383. return 0;
  6384. (val)->forwardLogicalChannelNumber += 1;
  6385. if (!ASN1Dec_CloseLogicalChannel_source(dec, &(val)->source))
  6386. return 0;
  6387. if (!y) {
  6388. ZeroMemory((val)->o + 0, 1);
  6389. } else {
  6390. if (!ASN1PERDecNormallySmallExtension(dec, &e, 1, (val)->o + 0))
  6391. return 0;
  6392. if ((val)->o[0] & 0x80) {
  6393. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  6394. return 0;
  6395. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  6396. return 0;
  6397. if (!ASN1Dec_CloseLogicalChannel_reason(dd, &(val)->reason))
  6398. return 0;
  6399. ASN1_CloseDecoder(dd);
  6400. ASN1Free(db);
  6401. }
  6402. for (i = 0; i < e; i++) {
  6403. if (!ASN1PERDecSkipFragmented(dec, 8))
  6404. return 0;
  6405. }
  6406. }
  6407. return 1;
  6408. }
  6409. static int ASN1CALL ASN1Enc_CloseLogicalChannelAck(ASN1encoding_t enc, CloseLogicalChannelAck *val)
  6410. {
  6411. if (!ASN1PEREncExtensionBitClear(enc))
  6412. return 0;
  6413. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  6414. return 0;
  6415. return 1;
  6416. }
  6417. static int ASN1CALL ASN1Dec_CloseLogicalChannelAck(ASN1decoding_t dec, CloseLogicalChannelAck *val)
  6418. {
  6419. ASN1uint32_t y;
  6420. if (!ASN1PERDecExtensionBit(dec, &y))
  6421. return 0;
  6422. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  6423. return 0;
  6424. (val)->forwardLogicalChannelNumber += 1;
  6425. if (y) {
  6426. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6427. return 0;
  6428. }
  6429. return 1;
  6430. }
  6431. static int ASN1CALL ASN1Enc_RequestChannelCloseAck(ASN1encoding_t enc, RequestChannelCloseAck *val)
  6432. {
  6433. if (!ASN1PEREncExtensionBitClear(enc))
  6434. return 0;
  6435. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  6436. return 0;
  6437. return 1;
  6438. }
  6439. static int ASN1CALL ASN1Dec_RequestChannelCloseAck(ASN1decoding_t dec, RequestChannelCloseAck *val)
  6440. {
  6441. ASN1uint32_t y;
  6442. if (!ASN1PERDecExtensionBit(dec, &y))
  6443. return 0;
  6444. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  6445. return 0;
  6446. (val)->forwardLogicalChannelNumber += 1;
  6447. if (y) {
  6448. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6449. return 0;
  6450. }
  6451. return 1;
  6452. }
  6453. static int ASN1CALL ASN1Enc_RequestChannelCloseReject(ASN1encoding_t enc, RequestChannelCloseReject *val)
  6454. {
  6455. if (!ASN1PEREncExtensionBitClear(enc))
  6456. return 0;
  6457. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  6458. return 0;
  6459. if (!ASN1Enc_RequestChannelCloseReject_cause(enc, &(val)->cause))
  6460. return 0;
  6461. return 1;
  6462. }
  6463. static int ASN1CALL ASN1Dec_RequestChannelCloseReject(ASN1decoding_t dec, RequestChannelCloseReject *val)
  6464. {
  6465. ASN1uint32_t y;
  6466. if (!ASN1PERDecExtensionBit(dec, &y))
  6467. return 0;
  6468. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  6469. return 0;
  6470. (val)->forwardLogicalChannelNumber += 1;
  6471. if (!ASN1Dec_RequestChannelCloseReject_cause(dec, &(val)->cause))
  6472. return 0;
  6473. if (y) {
  6474. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6475. return 0;
  6476. }
  6477. return 1;
  6478. }
  6479. static int ASN1CALL ASN1Enc_RequestChannelCloseRelease(ASN1encoding_t enc, RequestChannelCloseRelease *val)
  6480. {
  6481. if (!ASN1PEREncExtensionBitClear(enc))
  6482. return 0;
  6483. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  6484. return 0;
  6485. return 1;
  6486. }
  6487. static int ASN1CALL ASN1Dec_RequestChannelCloseRelease(ASN1decoding_t dec, RequestChannelCloseRelease *val)
  6488. {
  6489. ASN1uint32_t y;
  6490. if (!ASN1PERDecExtensionBit(dec, &y))
  6491. return 0;
  6492. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  6493. return 0;
  6494. (val)->forwardLogicalChannelNumber += 1;
  6495. if (y) {
  6496. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6497. return 0;
  6498. }
  6499. return 1;
  6500. }
  6501. static int ASN1CALL ASN1Enc_MultiplexEntrySend(ASN1encoding_t enc, MultiplexEntrySend *val)
  6502. {
  6503. if (!ASN1PEREncExtensionBitClear(enc))
  6504. return 0;
  6505. ASN1PEREncAlignment(enc);
  6506. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  6507. return 0;
  6508. if (!ASN1Enc_MultiplexEntrySend_multiplexEntryDescriptors(enc, &(val)->multiplexEntryDescriptors))
  6509. return 0;
  6510. return 1;
  6511. }
  6512. static int ASN1CALL ASN1Dec_MultiplexEntrySend(ASN1decoding_t dec, MultiplexEntrySend *val)
  6513. {
  6514. ASN1uint32_t y;
  6515. if (!ASN1PERDecExtensionBit(dec, &y))
  6516. return 0;
  6517. ASN1PERDecAlignment(dec);
  6518. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  6519. return 0;
  6520. if (!ASN1Dec_MultiplexEntrySend_multiplexEntryDescriptors(dec, &(val)->multiplexEntryDescriptors))
  6521. return 0;
  6522. if (y) {
  6523. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6524. return 0;
  6525. }
  6526. return 1;
  6527. }
  6528. static void ASN1CALL ASN1Free_MultiplexEntrySend(MultiplexEntrySend *val)
  6529. {
  6530. if (val) {
  6531. ASN1Free_MultiplexEntrySend_multiplexEntryDescriptors(&(val)->multiplexEntryDescriptors);
  6532. }
  6533. }
  6534. static int ASN1CALL ASN1Enc_MultiplexElement(ASN1encoding_t enc, MultiplexElement *val)
  6535. {
  6536. if (!ASN1Enc_MultiplexElement_type(enc, &(val)->type))
  6537. return 0;
  6538. if (!ASN1Enc_MultiplexElement_repeatCount(enc, &(val)->repeatCount))
  6539. return 0;
  6540. return 1;
  6541. }
  6542. static int ASN1CALL ASN1Dec_MultiplexElement(ASN1decoding_t dec, MultiplexElement *val)
  6543. {
  6544. if (!ASN1Dec_MultiplexElement_type(dec, &(val)->type))
  6545. return 0;
  6546. if (!ASN1Dec_MultiplexElement_repeatCount(dec, &(val)->repeatCount))
  6547. return 0;
  6548. return 1;
  6549. }
  6550. static void ASN1CALL ASN1Free_MultiplexElement(MultiplexElement *val)
  6551. {
  6552. if (val) {
  6553. ASN1Free_MultiplexElement_type(&(val)->type);
  6554. }
  6555. }
  6556. static int ASN1CALL ASN1Enc_MultiplexEntrySendAck(ASN1encoding_t enc, MultiplexEntrySendAck *val)
  6557. {
  6558. if (!ASN1PEREncExtensionBitClear(enc))
  6559. return 0;
  6560. ASN1PEREncAlignment(enc);
  6561. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  6562. return 0;
  6563. if (!ASN1Enc_MultiplexEntrySendAck_multiplexTableEntryNumber(enc, &(val)->multiplexTableEntryNumber))
  6564. return 0;
  6565. return 1;
  6566. }
  6567. static int ASN1CALL ASN1Dec_MultiplexEntrySendAck(ASN1decoding_t dec, MultiplexEntrySendAck *val)
  6568. {
  6569. ASN1uint32_t y;
  6570. if (!ASN1PERDecExtensionBit(dec, &y))
  6571. return 0;
  6572. ASN1PERDecAlignment(dec);
  6573. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  6574. return 0;
  6575. if (!ASN1Dec_MultiplexEntrySendAck_multiplexTableEntryNumber(dec, &(val)->multiplexTableEntryNumber))
  6576. return 0;
  6577. if (y) {
  6578. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6579. return 0;
  6580. }
  6581. return 1;
  6582. }
  6583. static void ASN1CALL ASN1Free_MultiplexEntrySendAck(MultiplexEntrySendAck *val)
  6584. {
  6585. if (val) {
  6586. ASN1Free_MultiplexEntrySendAck_multiplexTableEntryNumber(&(val)->multiplexTableEntryNumber);
  6587. }
  6588. }
  6589. static int ASN1CALL ASN1Enc_MultiplexEntryRejectionDescriptions(ASN1encoding_t enc, MultiplexEntryRejectionDescriptions *val)
  6590. {
  6591. if (!ASN1PEREncExtensionBitClear(enc))
  6592. return 0;
  6593. if (!ASN1PEREncBitVal(enc, 4, (val)->multiplexTableEntryNumber - 1))
  6594. return 0;
  6595. if (!ASN1Enc_MultiplexEntryRejectionDescriptions_cause(enc, &(val)->cause))
  6596. return 0;
  6597. return 1;
  6598. }
  6599. static int ASN1CALL ASN1Dec_MultiplexEntryRejectionDescriptions(ASN1decoding_t dec, MultiplexEntryRejectionDescriptions *val)
  6600. {
  6601. ASN1uint32_t y;
  6602. if (!ASN1PERDecExtensionBit(dec, &y))
  6603. return 0;
  6604. if (!ASN1PERDecU16Val(dec, 4, &(val)->multiplexTableEntryNumber))
  6605. return 0;
  6606. (val)->multiplexTableEntryNumber += 1;
  6607. if (!ASN1Dec_MultiplexEntryRejectionDescriptions_cause(dec, &(val)->cause))
  6608. return 0;
  6609. if (y) {
  6610. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6611. return 0;
  6612. }
  6613. return 1;
  6614. }
  6615. static int ASN1CALL ASN1Enc_MultiplexEntrySendRelease(ASN1encoding_t enc, MultiplexEntrySendRelease *val)
  6616. {
  6617. if (!ASN1PEREncExtensionBitClear(enc))
  6618. return 0;
  6619. if (!ASN1Enc_MultiplexEntrySendRelease_multiplexTableEntryNumber(enc, &(val)->multiplexTableEntryNumber))
  6620. return 0;
  6621. return 1;
  6622. }
  6623. static int ASN1CALL ASN1Dec_MultiplexEntrySendRelease(ASN1decoding_t dec, MultiplexEntrySendRelease *val)
  6624. {
  6625. ASN1uint32_t y;
  6626. if (!ASN1PERDecExtensionBit(dec, &y))
  6627. return 0;
  6628. if (!ASN1Dec_MultiplexEntrySendRelease_multiplexTableEntryNumber(dec, &(val)->multiplexTableEntryNumber))
  6629. return 0;
  6630. if (y) {
  6631. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6632. return 0;
  6633. }
  6634. return 1;
  6635. }
  6636. static void ASN1CALL ASN1Free_MultiplexEntrySendRelease(MultiplexEntrySendRelease *val)
  6637. {
  6638. if (val) {
  6639. ASN1Free_MultiplexEntrySendRelease_multiplexTableEntryNumber(&(val)->multiplexTableEntryNumber);
  6640. }
  6641. }
  6642. static int ASN1CALL ASN1Enc_RequestMultiplexEntry(ASN1encoding_t enc, RequestMultiplexEntry *val)
  6643. {
  6644. if (!ASN1PEREncExtensionBitClear(enc))
  6645. return 0;
  6646. if (!ASN1Enc_RequestMultiplexEntry_entryNumbers(enc, &(val)->entryNumbers))
  6647. return 0;
  6648. return 1;
  6649. }
  6650. static int ASN1CALL ASN1Dec_RequestMultiplexEntry(ASN1decoding_t dec, RequestMultiplexEntry *val)
  6651. {
  6652. ASN1uint32_t y;
  6653. if (!ASN1PERDecExtensionBit(dec, &y))
  6654. return 0;
  6655. if (!ASN1Dec_RequestMultiplexEntry_entryNumbers(dec, &(val)->entryNumbers))
  6656. return 0;
  6657. if (y) {
  6658. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6659. return 0;
  6660. }
  6661. return 1;
  6662. }
  6663. static void ASN1CALL ASN1Free_RequestMultiplexEntry(RequestMultiplexEntry *val)
  6664. {
  6665. if (val) {
  6666. ASN1Free_RequestMultiplexEntry_entryNumbers(&(val)->entryNumbers);
  6667. }
  6668. }
  6669. static int ASN1CALL ASN1Enc_RequestMultiplexEntryAck(ASN1encoding_t enc, RequestMultiplexEntryAck *val)
  6670. {
  6671. if (!ASN1PEREncExtensionBitClear(enc))
  6672. return 0;
  6673. if (!ASN1Enc_RequestMultiplexEntryAck_entryNumbers(enc, &(val)->entryNumbers))
  6674. return 0;
  6675. return 1;
  6676. }
  6677. static int ASN1CALL ASN1Dec_RequestMultiplexEntryAck(ASN1decoding_t dec, RequestMultiplexEntryAck *val)
  6678. {
  6679. ASN1uint32_t y;
  6680. if (!ASN1PERDecExtensionBit(dec, &y))
  6681. return 0;
  6682. if (!ASN1Dec_RequestMultiplexEntryAck_entryNumbers(dec, &(val)->entryNumbers))
  6683. return 0;
  6684. if (y) {
  6685. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6686. return 0;
  6687. }
  6688. return 1;
  6689. }
  6690. static void ASN1CALL ASN1Free_RequestMultiplexEntryAck(RequestMultiplexEntryAck *val)
  6691. {
  6692. if (val) {
  6693. ASN1Free_RequestMultiplexEntryAck_entryNumbers(&(val)->entryNumbers);
  6694. }
  6695. }
  6696. static int ASN1CALL ASN1Enc_RequestMultiplexEntryRejectionDescriptions(ASN1encoding_t enc, RequestMultiplexEntryRejectionDescriptions *val)
  6697. {
  6698. if (!ASN1PEREncExtensionBitClear(enc))
  6699. return 0;
  6700. if (!ASN1PEREncBitVal(enc, 4, (val)->multiplexTableEntryNumber - 1))
  6701. return 0;
  6702. if (!ASN1Enc_RequestMultiplexEntryRejectionDescriptions_cause(enc, &(val)->cause))
  6703. return 0;
  6704. return 1;
  6705. }
  6706. static int ASN1CALL ASN1Dec_RequestMultiplexEntryRejectionDescriptions(ASN1decoding_t dec, RequestMultiplexEntryRejectionDescriptions *val)
  6707. {
  6708. ASN1uint32_t y;
  6709. if (!ASN1PERDecExtensionBit(dec, &y))
  6710. return 0;
  6711. if (!ASN1PERDecU16Val(dec, 4, &(val)->multiplexTableEntryNumber))
  6712. return 0;
  6713. (val)->multiplexTableEntryNumber += 1;
  6714. if (!ASN1Dec_RequestMultiplexEntryRejectionDescriptions_cause(dec, &(val)->cause))
  6715. return 0;
  6716. if (y) {
  6717. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6718. return 0;
  6719. }
  6720. return 1;
  6721. }
  6722. static int ASN1CALL ASN1Enc_RequestMultiplexEntryRelease(ASN1encoding_t enc, RequestMultiplexEntryRelease *val)
  6723. {
  6724. if (!ASN1PEREncExtensionBitClear(enc))
  6725. return 0;
  6726. if (!ASN1Enc_RequestMultiplexEntryRelease_entryNumbers(enc, &(val)->entryNumbers))
  6727. return 0;
  6728. return 1;
  6729. }
  6730. static int ASN1CALL ASN1Dec_RequestMultiplexEntryRelease(ASN1decoding_t dec, RequestMultiplexEntryRelease *val)
  6731. {
  6732. ASN1uint32_t y;
  6733. if (!ASN1PERDecExtensionBit(dec, &y))
  6734. return 0;
  6735. if (!ASN1Dec_RequestMultiplexEntryRelease_entryNumbers(dec, &(val)->entryNumbers))
  6736. return 0;
  6737. if (y) {
  6738. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6739. return 0;
  6740. }
  6741. return 1;
  6742. }
  6743. static void ASN1CALL ASN1Free_RequestMultiplexEntryRelease(RequestMultiplexEntryRelease *val)
  6744. {
  6745. if (val) {
  6746. ASN1Free_RequestMultiplexEntryRelease_entryNumbers(&(val)->entryNumbers);
  6747. }
  6748. }
  6749. static int ASN1CALL ASN1Enc_RequestMode(ASN1encoding_t enc, RequestMode *val)
  6750. {
  6751. if (!ASN1PEREncExtensionBitClear(enc))
  6752. return 0;
  6753. ASN1PEREncAlignment(enc);
  6754. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  6755. return 0;
  6756. if (!ASN1Enc_RequestMode_requestedModes(enc, &(val)->requestedModes))
  6757. return 0;
  6758. return 1;
  6759. }
  6760. static int ASN1CALL ASN1Dec_RequestMode(ASN1decoding_t dec, RequestMode *val)
  6761. {
  6762. ASN1uint32_t y;
  6763. if (!ASN1PERDecExtensionBit(dec, &y))
  6764. return 0;
  6765. ASN1PERDecAlignment(dec);
  6766. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  6767. return 0;
  6768. if (!ASN1Dec_RequestMode_requestedModes(dec, &(val)->requestedModes))
  6769. return 0;
  6770. if (y) {
  6771. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6772. return 0;
  6773. }
  6774. return 1;
  6775. }
  6776. static void ASN1CALL ASN1Free_RequestMode(RequestMode *val)
  6777. {
  6778. if (val) {
  6779. ASN1Free_RequestMode_requestedModes(&(val)->requestedModes);
  6780. }
  6781. }
  6782. static int ASN1CALL ASN1Enc_RequestModeAck(ASN1encoding_t enc, RequestModeAck *val)
  6783. {
  6784. if (!ASN1PEREncExtensionBitClear(enc))
  6785. return 0;
  6786. ASN1PEREncAlignment(enc);
  6787. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  6788. return 0;
  6789. if (!ASN1Enc_RequestModeAck_response(enc, &(val)->response))
  6790. return 0;
  6791. return 1;
  6792. }
  6793. static int ASN1CALL ASN1Dec_RequestModeAck(ASN1decoding_t dec, RequestModeAck *val)
  6794. {
  6795. ASN1uint32_t y;
  6796. if (!ASN1PERDecExtensionBit(dec, &y))
  6797. return 0;
  6798. ASN1PERDecAlignment(dec);
  6799. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  6800. return 0;
  6801. if (!ASN1Dec_RequestModeAck_response(dec, &(val)->response))
  6802. return 0;
  6803. if (y) {
  6804. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6805. return 0;
  6806. }
  6807. return 1;
  6808. }
  6809. static int ASN1CALL ASN1Enc_RequestModeReject(ASN1encoding_t enc, RequestModeReject *val)
  6810. {
  6811. if (!ASN1PEREncExtensionBitClear(enc))
  6812. return 0;
  6813. ASN1PEREncAlignment(enc);
  6814. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  6815. return 0;
  6816. if (!ASN1Enc_RequestModeReject_cause(enc, &(val)->cause))
  6817. return 0;
  6818. return 1;
  6819. }
  6820. static int ASN1CALL ASN1Dec_RequestModeReject(ASN1decoding_t dec, RequestModeReject *val)
  6821. {
  6822. ASN1uint32_t y;
  6823. if (!ASN1PERDecExtensionBit(dec, &y))
  6824. return 0;
  6825. ASN1PERDecAlignment(dec);
  6826. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  6827. return 0;
  6828. if (!ASN1Dec_RequestModeReject_cause(dec, &(val)->cause))
  6829. return 0;
  6830. if (y) {
  6831. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6832. return 0;
  6833. }
  6834. return 1;
  6835. }
  6836. static int ASN1CALL ASN1Enc_RequestModeRelease(ASN1encoding_t enc, RequestModeRelease *val)
  6837. {
  6838. if (!ASN1PEREncExtensionBitClear(enc))
  6839. return 0;
  6840. return 1;
  6841. }
  6842. static int ASN1CALL ASN1Dec_RequestModeRelease(ASN1decoding_t dec, RequestModeRelease *val)
  6843. {
  6844. ASN1uint32_t y;
  6845. if (!ASN1PERDecExtensionBit(dec, &y))
  6846. return 0;
  6847. if (y) {
  6848. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6849. return 0;
  6850. }
  6851. return 1;
  6852. }
  6853. static int ASN1CALL ASN1Enc_V76ModeParameters(ASN1encoding_t enc, V76ModeParameters *val)
  6854. {
  6855. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  6856. return 0;
  6857. return 1;
  6858. }
  6859. static int ASN1CALL ASN1Dec_V76ModeParameters(ASN1decoding_t dec, V76ModeParameters *val)
  6860. {
  6861. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  6862. return 0;
  6863. return 1;
  6864. }
  6865. static int ASN1CALL ASN1Enc_H261VideoMode(ASN1encoding_t enc, H261VideoMode *val)
  6866. {
  6867. if (!ASN1PEREncExtensionBitClear(enc))
  6868. return 0;
  6869. if (!ASN1Enc_H261VideoMode_resolution(enc, &(val)->resolution))
  6870. return 0;
  6871. if (!ASN1PEREncUnsignedShort(enc, (val)->bitRate - 1))
  6872. return 0;
  6873. if (!ASN1PEREncBoolean(enc, (val)->stillImageTransmission))
  6874. return 0;
  6875. return 1;
  6876. }
  6877. static int ASN1CALL ASN1Dec_H261VideoMode(ASN1decoding_t dec, H261VideoMode *val)
  6878. {
  6879. ASN1uint32_t y;
  6880. if (!ASN1PERDecExtensionBit(dec, &y))
  6881. return 0;
  6882. if (!ASN1Dec_H261VideoMode_resolution(dec, &(val)->resolution))
  6883. return 0;
  6884. if (!ASN1PERDecUnsignedShort(dec, &(val)->bitRate))
  6885. return 0;
  6886. (val)->bitRate += 1;
  6887. if (!ASN1PERDecBoolean(dec, &(val)->stillImageTransmission))
  6888. return 0;
  6889. if (y) {
  6890. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6891. return 0;
  6892. }
  6893. return 1;
  6894. }
  6895. static int ASN1CALL ASN1Enc_H262VideoMode(ASN1encoding_t enc, H262VideoMode *val)
  6896. {
  6897. ASN1uint32_t l;
  6898. if (!ASN1PEREncExtensionBitClear(enc))
  6899. return 0;
  6900. if (!ASN1PEREncBits(enc, 6, (val)->o))
  6901. return 0;
  6902. if (!ASN1Enc_H262VideoMode_profileAndLevel(enc, &(val)->profileAndLevel))
  6903. return 0;
  6904. if ((val)->o[0] & 0x80) {
  6905. l = ASN1uint32_uoctets((val)->videoBitRate);
  6906. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  6907. return 0;
  6908. ASN1PEREncAlignment(enc);
  6909. if (!ASN1PEREncBitVal(enc, l * 8, (val)->videoBitRate))
  6910. return 0;
  6911. }
  6912. if ((val)->o[0] & 0x40) {
  6913. l = ASN1uint32_uoctets((val)->vbvBufferSize);
  6914. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  6915. return 0;
  6916. ASN1PEREncAlignment(enc);
  6917. if (!ASN1PEREncBitVal(enc, l * 8, (val)->vbvBufferSize))
  6918. return 0;
  6919. }
  6920. if ((val)->o[0] & 0x20) {
  6921. if (!ASN1PEREncUnsignedShort(enc, (val)->samplesPerLine))
  6922. return 0;
  6923. }
  6924. if ((val)->o[0] & 0x10) {
  6925. if (!ASN1PEREncUnsignedShort(enc, (val)->linesPerFrame))
  6926. return 0;
  6927. }
  6928. if ((val)->o[0] & 0x8) {
  6929. if (!ASN1PEREncBitVal(enc, 4, (val)->framesPerSecond))
  6930. return 0;
  6931. }
  6932. if ((val)->o[0] & 0x4) {
  6933. l = ASN1uint32_uoctets((val)->luminanceSampleRate);
  6934. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  6935. return 0;
  6936. ASN1PEREncAlignment(enc);
  6937. if (!ASN1PEREncBitVal(enc, l * 8, (val)->luminanceSampleRate))
  6938. return 0;
  6939. }
  6940. return 1;
  6941. }
  6942. static int ASN1CALL ASN1Dec_H262VideoMode(ASN1decoding_t dec, H262VideoMode *val)
  6943. {
  6944. ASN1uint32_t y;
  6945. ASN1uint32_t l;
  6946. if (!ASN1PERDecExtensionBit(dec, &y))
  6947. return 0;
  6948. if (!ASN1PERDecExtension(dec, 6, (val)->o))
  6949. return 0;
  6950. if (!ASN1Dec_H262VideoMode_profileAndLevel(dec, &(val)->profileAndLevel))
  6951. return 0;
  6952. if ((val)->o[0] & 0x80) {
  6953. if (!ASN1PERDecU32Val(dec, 2, &l))
  6954. return 0;
  6955. l += 1;
  6956. ASN1PERDecAlignment(dec);
  6957. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->videoBitRate))
  6958. return 0;
  6959. }
  6960. if ((val)->o[0] & 0x40) {
  6961. if (!ASN1PERDecU32Val(dec, 2, &l))
  6962. return 0;
  6963. l += 1;
  6964. ASN1PERDecAlignment(dec);
  6965. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->vbvBufferSize))
  6966. return 0;
  6967. }
  6968. if ((val)->o[0] & 0x20) {
  6969. if (!ASN1PERDecUnsignedShort(dec, &(val)->samplesPerLine))
  6970. return 0;
  6971. }
  6972. if ((val)->o[0] & 0x10) {
  6973. if (!ASN1PERDecUnsignedShort(dec, &(val)->linesPerFrame))
  6974. return 0;
  6975. }
  6976. if ((val)->o[0] & 0x8) {
  6977. if (!ASN1PERDecU16Val(dec, 4, &(val)->framesPerSecond))
  6978. return 0;
  6979. }
  6980. if ((val)->o[0] & 0x4) {
  6981. if (!ASN1PERDecU32Val(dec, 2, &l))
  6982. return 0;
  6983. l += 1;
  6984. ASN1PERDecAlignment(dec);
  6985. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->luminanceSampleRate))
  6986. return 0;
  6987. }
  6988. if (y) {
  6989. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6990. return 0;
  6991. }
  6992. return 1;
  6993. }
  6994. static int ASN1CALL ASN1Enc_IS11172VideoMode(ASN1encoding_t enc, IS11172VideoMode *val)
  6995. {
  6996. ASN1uint32_t l;
  6997. if (!ASN1PEREncExtensionBitClear(enc))
  6998. return 0;
  6999. if (!ASN1PEREncBits(enc, 6, (val)->o))
  7000. return 0;
  7001. if (!ASN1PEREncBoolean(enc, (val)->constrainedBitstream))
  7002. return 0;
  7003. if ((val)->o[0] & 0x80) {
  7004. l = ASN1uint32_uoctets((val)->videoBitRate);
  7005. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  7006. return 0;
  7007. ASN1PEREncAlignment(enc);
  7008. if (!ASN1PEREncBitVal(enc, l * 8, (val)->videoBitRate))
  7009. return 0;
  7010. }
  7011. if ((val)->o[0] & 0x40) {
  7012. l = ASN1uint32_uoctets((val)->vbvBufferSize);
  7013. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  7014. return 0;
  7015. ASN1PEREncAlignment(enc);
  7016. if (!ASN1PEREncBitVal(enc, l * 8, (val)->vbvBufferSize))
  7017. return 0;
  7018. }
  7019. if ((val)->o[0] & 0x20) {
  7020. if (!ASN1PEREncUnsignedShort(enc, (val)->samplesPerLine))
  7021. return 0;
  7022. }
  7023. if ((val)->o[0] & 0x10) {
  7024. if (!ASN1PEREncUnsignedShort(enc, (val)->linesPerFrame))
  7025. return 0;
  7026. }
  7027. if ((val)->o[0] & 0x8) {
  7028. if (!ASN1PEREncBitVal(enc, 4, (val)->pictureRate))
  7029. return 0;
  7030. }
  7031. if ((val)->o[0] & 0x4) {
  7032. l = ASN1uint32_uoctets((val)->luminanceSampleRate);
  7033. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  7034. return 0;
  7035. ASN1PEREncAlignment(enc);
  7036. if (!ASN1PEREncBitVal(enc, l * 8, (val)->luminanceSampleRate))
  7037. return 0;
  7038. }
  7039. return 1;
  7040. }
  7041. static int ASN1CALL ASN1Dec_IS11172VideoMode(ASN1decoding_t dec, IS11172VideoMode *val)
  7042. {
  7043. ASN1uint32_t y;
  7044. ASN1uint32_t l;
  7045. if (!ASN1PERDecExtensionBit(dec, &y))
  7046. return 0;
  7047. if (!ASN1PERDecExtension(dec, 6, (val)->o))
  7048. return 0;
  7049. if (!ASN1PERDecBoolean(dec, &(val)->constrainedBitstream))
  7050. return 0;
  7051. if ((val)->o[0] & 0x80) {
  7052. if (!ASN1PERDecU32Val(dec, 2, &l))
  7053. return 0;
  7054. l += 1;
  7055. ASN1PERDecAlignment(dec);
  7056. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->videoBitRate))
  7057. return 0;
  7058. }
  7059. if ((val)->o[0] & 0x40) {
  7060. if (!ASN1PERDecU32Val(dec, 2, &l))
  7061. return 0;
  7062. l += 1;
  7063. ASN1PERDecAlignment(dec);
  7064. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->vbvBufferSize))
  7065. return 0;
  7066. }
  7067. if ((val)->o[0] & 0x20) {
  7068. if (!ASN1PERDecUnsignedShort(dec, &(val)->samplesPerLine))
  7069. return 0;
  7070. }
  7071. if ((val)->o[0] & 0x10) {
  7072. if (!ASN1PERDecUnsignedShort(dec, &(val)->linesPerFrame))
  7073. return 0;
  7074. }
  7075. if ((val)->o[0] & 0x8) {
  7076. if (!ASN1PERDecU16Val(dec, 4, &(val)->pictureRate))
  7077. return 0;
  7078. }
  7079. if ((val)->o[0] & 0x4) {
  7080. if (!ASN1PERDecU32Val(dec, 2, &l))
  7081. return 0;
  7082. l += 1;
  7083. ASN1PERDecAlignment(dec);
  7084. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->luminanceSampleRate))
  7085. return 0;
  7086. }
  7087. if (y) {
  7088. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7089. return 0;
  7090. }
  7091. return 1;
  7092. }
  7093. static int ASN1CALL ASN1Enc_IS11172AudioMode(ASN1encoding_t enc, IS11172AudioMode *val)
  7094. {
  7095. if (!ASN1PEREncExtensionBitClear(enc))
  7096. return 0;
  7097. if (!ASN1Enc_IS11172AudioMode_audioLayer(enc, &(val)->audioLayer))
  7098. return 0;
  7099. if (!ASN1Enc_IS11172AudioMode_audioSampling(enc, &(val)->audioSampling))
  7100. return 0;
  7101. if (!ASN1Enc_IS11172AudioMode_multichannelType(enc, &(val)->multichannelType))
  7102. return 0;
  7103. if (!ASN1PEREncUnsignedShort(enc, (val)->bitRate - 1))
  7104. return 0;
  7105. return 1;
  7106. }
  7107. static int ASN1CALL ASN1Dec_IS11172AudioMode(ASN1decoding_t dec, IS11172AudioMode *val)
  7108. {
  7109. ASN1uint32_t y;
  7110. if (!ASN1PERDecExtensionBit(dec, &y))
  7111. return 0;
  7112. if (!ASN1Dec_IS11172AudioMode_audioLayer(dec, &(val)->audioLayer))
  7113. return 0;
  7114. if (!ASN1Dec_IS11172AudioMode_audioSampling(dec, &(val)->audioSampling))
  7115. return 0;
  7116. if (!ASN1Dec_IS11172AudioMode_multichannelType(dec, &(val)->multichannelType))
  7117. return 0;
  7118. if (!ASN1PERDecUnsignedShort(dec, &(val)->bitRate))
  7119. return 0;
  7120. (val)->bitRate += 1;
  7121. if (y) {
  7122. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7123. return 0;
  7124. }
  7125. return 1;
  7126. }
  7127. static int ASN1CALL ASN1Enc_IS13818AudioMode(ASN1encoding_t enc, IS13818AudioMode *val)
  7128. {
  7129. if (!ASN1PEREncExtensionBitClear(enc))
  7130. return 0;
  7131. if (!ASN1Enc_IS13818AudioMode_audioLayer(enc, &(val)->audioLayer))
  7132. return 0;
  7133. if (!ASN1Enc_IS13818AudioMode_audioSampling(enc, &(val)->audioSampling))
  7134. return 0;
  7135. if (!ASN1Enc_IS13818AudioMode_multichannelType(enc, &(val)->multichannelType))
  7136. return 0;
  7137. if (!ASN1PEREncBoolean(enc, (val)->lowFrequencyEnhancement))
  7138. return 0;
  7139. if (!ASN1PEREncBoolean(enc, (val)->multilingual))
  7140. return 0;
  7141. if (!ASN1PEREncUnsignedShort(enc, (val)->bitRate - 1))
  7142. return 0;
  7143. return 1;
  7144. }
  7145. static int ASN1CALL ASN1Dec_IS13818AudioMode(ASN1decoding_t dec, IS13818AudioMode *val)
  7146. {
  7147. ASN1uint32_t y;
  7148. if (!ASN1PERDecExtensionBit(dec, &y))
  7149. return 0;
  7150. if (!ASN1Dec_IS13818AudioMode_audioLayer(dec, &(val)->audioLayer))
  7151. return 0;
  7152. if (!ASN1Dec_IS13818AudioMode_audioSampling(dec, &(val)->audioSampling))
  7153. return 0;
  7154. if (!ASN1Dec_IS13818AudioMode_multichannelType(dec, &(val)->multichannelType))
  7155. return 0;
  7156. if (!ASN1PERDecBoolean(dec, &(val)->lowFrequencyEnhancement))
  7157. return 0;
  7158. if (!ASN1PERDecBoolean(dec, &(val)->multilingual))
  7159. return 0;
  7160. if (!ASN1PERDecUnsignedShort(dec, &(val)->bitRate))
  7161. return 0;
  7162. (val)->bitRate += 1;
  7163. if (y) {
  7164. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7165. return 0;
  7166. }
  7167. return 1;
  7168. }
  7169. static int ASN1CALL ASN1Enc_G7231AnnexCMode(ASN1encoding_t enc, G7231AnnexCMode *val)
  7170. {
  7171. if (!ASN1PEREncExtensionBitClear(enc))
  7172. return 0;
  7173. ASN1PEREncAlignment(enc);
  7174. if (!ASN1PEREncBitVal(enc, 8, (val)->maxAl_sduAudioFrames - 1))
  7175. return 0;
  7176. if (!ASN1PEREncBoolean(enc, (val)->silenceSuppression))
  7177. return 0;
  7178. if (!ASN1Enc_G7231AnnexCMode_g723AnnexCAudioMode(enc, &(val)->g723AnnexCAudioMode))
  7179. return 0;
  7180. return 1;
  7181. }
  7182. static int ASN1CALL ASN1Dec_G7231AnnexCMode(ASN1decoding_t dec, G7231AnnexCMode *val)
  7183. {
  7184. ASN1uint32_t y;
  7185. if (!ASN1PERDecExtensionBit(dec, &y))
  7186. return 0;
  7187. ASN1PERDecAlignment(dec);
  7188. if (!ASN1PERDecU16Val(dec, 8, &(val)->maxAl_sduAudioFrames))
  7189. return 0;
  7190. (val)->maxAl_sduAudioFrames += 1;
  7191. if (!ASN1PERDecBoolean(dec, &(val)->silenceSuppression))
  7192. return 0;
  7193. if (!ASN1Dec_G7231AnnexCMode_g723AnnexCAudioMode(dec, &(val)->g723AnnexCAudioMode))
  7194. return 0;
  7195. if (y) {
  7196. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7197. return 0;
  7198. }
  7199. return 1;
  7200. }
  7201. static int ASN1CALL ASN1Enc_RoundTripDelayRequest(ASN1encoding_t enc, RoundTripDelayRequest *val)
  7202. {
  7203. if (!ASN1PEREncExtensionBitClear(enc))
  7204. return 0;
  7205. ASN1PEREncAlignment(enc);
  7206. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  7207. return 0;
  7208. return 1;
  7209. }
  7210. static int ASN1CALL ASN1Dec_RoundTripDelayRequest(ASN1decoding_t dec, RoundTripDelayRequest *val)
  7211. {
  7212. ASN1uint32_t y;
  7213. if (!ASN1PERDecExtensionBit(dec, &y))
  7214. return 0;
  7215. ASN1PERDecAlignment(dec);
  7216. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  7217. return 0;
  7218. if (y) {
  7219. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7220. return 0;
  7221. }
  7222. return 1;
  7223. }
  7224. static int ASN1CALL ASN1Enc_RoundTripDelayResponse(ASN1encoding_t enc, RoundTripDelayResponse *val)
  7225. {
  7226. if (!ASN1PEREncExtensionBitClear(enc))
  7227. return 0;
  7228. ASN1PEREncAlignment(enc);
  7229. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  7230. return 0;
  7231. return 1;
  7232. }
  7233. static int ASN1CALL ASN1Dec_RoundTripDelayResponse(ASN1decoding_t dec, RoundTripDelayResponse *val)
  7234. {
  7235. ASN1uint32_t y;
  7236. if (!ASN1PERDecExtensionBit(dec, &y))
  7237. return 0;
  7238. ASN1PERDecAlignment(dec);
  7239. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  7240. return 0;
  7241. if (y) {
  7242. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7243. return 0;
  7244. }
  7245. return 1;
  7246. }
  7247. static int ASN1CALL ASN1Enc_MaintenanceLoopRequest(ASN1encoding_t enc, MaintenanceLoopRequest *val)
  7248. {
  7249. if (!ASN1PEREncExtensionBitClear(enc))
  7250. return 0;
  7251. if (!ASN1Enc_MaintenanceLoopRequest_type(enc, &(val)->type))
  7252. return 0;
  7253. return 1;
  7254. }
  7255. static int ASN1CALL ASN1Dec_MaintenanceLoopRequest(ASN1decoding_t dec, MaintenanceLoopRequest *val)
  7256. {
  7257. ASN1uint32_t y;
  7258. if (!ASN1PERDecExtensionBit(dec, &y))
  7259. return 0;
  7260. if (!ASN1Dec_MaintenanceLoopRequest_type(dec, &(val)->type))
  7261. return 0;
  7262. if (y) {
  7263. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7264. return 0;
  7265. }
  7266. return 1;
  7267. }
  7268. static int ASN1CALL ASN1Enc_MaintenanceLoopAck(ASN1encoding_t enc, MaintenanceLoopAck *val)
  7269. {
  7270. if (!ASN1PEREncExtensionBitClear(enc))
  7271. return 0;
  7272. if (!ASN1Enc_MaintenanceLoopAck_type(enc, &(val)->type))
  7273. return 0;
  7274. return 1;
  7275. }
  7276. static int ASN1CALL ASN1Dec_MaintenanceLoopAck(ASN1decoding_t dec, MaintenanceLoopAck *val)
  7277. {
  7278. ASN1uint32_t y;
  7279. if (!ASN1PERDecExtensionBit(dec, &y))
  7280. return 0;
  7281. if (!ASN1Dec_MaintenanceLoopAck_type(dec, &(val)->type))
  7282. return 0;
  7283. if (y) {
  7284. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7285. return 0;
  7286. }
  7287. return 1;
  7288. }
  7289. static int ASN1CALL ASN1Enc_MaintenanceLoopReject(ASN1encoding_t enc, MaintenanceLoopReject *val)
  7290. {
  7291. if (!ASN1PEREncExtensionBitClear(enc))
  7292. return 0;
  7293. if (!ASN1Enc_MaintenanceLoopReject_type(enc, &(val)->type))
  7294. return 0;
  7295. if (!ASN1Enc_MaintenanceLoopReject_cause(enc, &(val)->cause))
  7296. return 0;
  7297. return 1;
  7298. }
  7299. static int ASN1CALL ASN1Dec_MaintenanceLoopReject(ASN1decoding_t dec, MaintenanceLoopReject *val)
  7300. {
  7301. ASN1uint32_t y;
  7302. if (!ASN1PERDecExtensionBit(dec, &y))
  7303. return 0;
  7304. if (!ASN1Dec_MaintenanceLoopReject_type(dec, &(val)->type))
  7305. return 0;
  7306. if (!ASN1Dec_MaintenanceLoopReject_cause(dec, &(val)->cause))
  7307. return 0;
  7308. if (y) {
  7309. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7310. return 0;
  7311. }
  7312. return 1;
  7313. }
  7314. static int ASN1CALL ASN1Enc_MaintenanceLoopOffCommand(ASN1encoding_t enc, MaintenanceLoopOffCommand *val)
  7315. {
  7316. if (!ASN1PEREncExtensionBitClear(enc))
  7317. return 0;
  7318. return 1;
  7319. }
  7320. static int ASN1CALL ASN1Dec_MaintenanceLoopOffCommand(ASN1decoding_t dec, MaintenanceLoopOffCommand *val)
  7321. {
  7322. ASN1uint32_t y;
  7323. if (!ASN1PERDecExtensionBit(dec, &y))
  7324. return 0;
  7325. if (y) {
  7326. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7327. return 0;
  7328. }
  7329. return 1;
  7330. }
  7331. static int ASN1CALL ASN1Enc_CommunicationModeCommand(ASN1encoding_t enc, CommunicationModeCommand *val)
  7332. {
  7333. if (!ASN1PEREncExtensionBitClear(enc))
  7334. return 0;
  7335. if (!ASN1Enc_CommunicationModeCommand_communicationModeTable(enc, &(val)->communicationModeTable))
  7336. return 0;
  7337. return 1;
  7338. }
  7339. static int ASN1CALL ASN1Dec_CommunicationModeCommand(ASN1decoding_t dec, CommunicationModeCommand *val)
  7340. {
  7341. ASN1uint32_t y;
  7342. if (!ASN1PERDecExtensionBit(dec, &y))
  7343. return 0;
  7344. if (!ASN1Dec_CommunicationModeCommand_communicationModeTable(dec, &(val)->communicationModeTable))
  7345. return 0;
  7346. if (y) {
  7347. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7348. return 0;
  7349. }
  7350. return 1;
  7351. }
  7352. static void ASN1CALL ASN1Free_CommunicationModeCommand(CommunicationModeCommand *val)
  7353. {
  7354. if (val) {
  7355. ASN1Free_CommunicationModeCommand_communicationModeTable(&(val)->communicationModeTable);
  7356. }
  7357. }
  7358. static int ASN1CALL ASN1Enc_CommunicationModeRequest(ASN1encoding_t enc, CommunicationModeRequest *val)
  7359. {
  7360. if (!ASN1PEREncExtensionBitClear(enc))
  7361. return 0;
  7362. return 1;
  7363. }
  7364. static int ASN1CALL ASN1Dec_CommunicationModeRequest(ASN1decoding_t dec, CommunicationModeRequest *val)
  7365. {
  7366. ASN1uint32_t y;
  7367. if (!ASN1PERDecExtensionBit(dec, &y))
  7368. return 0;
  7369. if (y) {
  7370. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7371. return 0;
  7372. }
  7373. return 1;
  7374. }
  7375. static int ASN1CALL ASN1Enc_CommunicationModeResponse(ASN1encoding_t enc, CommunicationModeResponse *val)
  7376. {
  7377. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 0))
  7378. return 0;
  7379. switch ((val)->choice) {
  7380. case 1:
  7381. if (!ASN1Enc_CommunicationModeResponse_communicationModeTable(enc, &(val)->u.communicationModeTable))
  7382. return 0;
  7383. break;
  7384. default:
  7385. /* impossible */
  7386. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  7387. return 0;
  7388. }
  7389. return 1;
  7390. }
  7391. static int ASN1CALL ASN1Dec_CommunicationModeResponse(ASN1decoding_t dec, CommunicationModeResponse *val)
  7392. {
  7393. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 0))
  7394. return 0;
  7395. switch ((val)->choice) {
  7396. case 1:
  7397. if (!ASN1Dec_CommunicationModeResponse_communicationModeTable(dec, &(val)->u.communicationModeTable))
  7398. return 0;
  7399. break;
  7400. case 0:
  7401. /* extension case */
  7402. if (!ASN1PERDecSkipFragmented(dec, 8))
  7403. return 0;
  7404. break;
  7405. default:
  7406. /* impossible */
  7407. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  7408. return 0;
  7409. }
  7410. return 1;
  7411. }
  7412. static void ASN1CALL ASN1Free_CommunicationModeResponse(CommunicationModeResponse *val)
  7413. {
  7414. if (val) {
  7415. switch ((val)->choice) {
  7416. case 1:
  7417. ASN1Free_CommunicationModeResponse_communicationModeTable(&(val)->u.communicationModeTable);
  7418. break;
  7419. }
  7420. }
  7421. }
  7422. static int ASN1CALL ASN1Enc_Criteria(ASN1encoding_t enc, Criteria *val)
  7423. {
  7424. if (!ASN1PEREncExtensionBitClear(enc))
  7425. return 0;
  7426. if (!ASN1PEREncObjectIdentifier(enc, &(val)->field))
  7427. return 0;
  7428. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->value, 1, 65535, 16))
  7429. return 0;
  7430. return 1;
  7431. }
  7432. static int ASN1CALL ASN1Dec_Criteria(ASN1decoding_t dec, Criteria *val)
  7433. {
  7434. ASN1uint32_t y;
  7435. if (!ASN1PERDecExtensionBit(dec, &y))
  7436. return 0;
  7437. if (!ASN1PERDecObjectIdentifier(dec, &(val)->field))
  7438. return 0;
  7439. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->value, 1, 65535, 16))
  7440. return 0;
  7441. if (y) {
  7442. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7443. return 0;
  7444. }
  7445. return 1;
  7446. }
  7447. static void ASN1CALL ASN1Free_Criteria(Criteria *val)
  7448. {
  7449. if (val) {
  7450. ASN1objectidentifier_free(&(val)->field);
  7451. }
  7452. }
  7453. static int ASN1CALL ASN1Enc_TerminalLabel(ASN1encoding_t enc, TerminalLabel *val)
  7454. {
  7455. if (!ASN1PEREncExtensionBitClear(enc))
  7456. return 0;
  7457. if (!ASN1PEREncBitVal(enc, 8, (val)->mcuNumber))
  7458. return 0;
  7459. if (!ASN1PEREncBitVal(enc, 8, (val)->terminalNumber))
  7460. return 0;
  7461. return 1;
  7462. }
  7463. static int ASN1CALL ASN1Dec_TerminalLabel(ASN1decoding_t dec, TerminalLabel *val)
  7464. {
  7465. ASN1uint32_t y;
  7466. if (!ASN1PERDecExtensionBit(dec, &y))
  7467. return 0;
  7468. if (!ASN1PERDecU16Val(dec, 8, &(val)->mcuNumber))
  7469. return 0;
  7470. if (!ASN1PERDecU16Val(dec, 8, &(val)->terminalNumber))
  7471. return 0;
  7472. if (y) {
  7473. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7474. return 0;
  7475. }
  7476. return 1;
  7477. }
  7478. static int ASN1CALL ASN1Enc_RequestAllTerminalIDsResponse(ASN1encoding_t enc, RequestAllTerminalIDsResponse *val)
  7479. {
  7480. if (!ASN1PEREncExtensionBitClear(enc))
  7481. return 0;
  7482. if (!ASN1Enc_RequestAllTerminalIDsResponse_terminalInformation(enc, &(val)->terminalInformation))
  7483. return 0;
  7484. return 1;
  7485. }
  7486. static int ASN1CALL ASN1Dec_RequestAllTerminalIDsResponse(ASN1decoding_t dec, RequestAllTerminalIDsResponse *val)
  7487. {
  7488. ASN1uint32_t y;
  7489. if (!ASN1PERDecExtensionBit(dec, &y))
  7490. return 0;
  7491. if (!ASN1Dec_RequestAllTerminalIDsResponse_terminalInformation(dec, &(val)->terminalInformation))
  7492. return 0;
  7493. if (y) {
  7494. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7495. return 0;
  7496. }
  7497. return 1;
  7498. }
  7499. static void ASN1CALL ASN1Free_RequestAllTerminalIDsResponse(RequestAllTerminalIDsResponse *val)
  7500. {
  7501. if (val) {
  7502. ASN1Free_RequestAllTerminalIDsResponse_terminalInformation(&(val)->terminalInformation);
  7503. }
  7504. }
  7505. static int ASN1CALL ASN1Enc_TerminalInformation(ASN1encoding_t enc, TerminalInformation *val)
  7506. {
  7507. if (!ASN1PEREncExtensionBitClear(enc))
  7508. return 0;
  7509. if (!ASN1Enc_TerminalLabel(enc, &(val)->terminalLabel))
  7510. return 0;
  7511. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->terminalID, 1, 128, 7))
  7512. return 0;
  7513. return 1;
  7514. }
  7515. static int ASN1CALL ASN1Dec_TerminalInformation(ASN1decoding_t dec, TerminalInformation *val)
  7516. {
  7517. ASN1uint32_t y;
  7518. if (!ASN1PERDecExtensionBit(dec, &y))
  7519. return 0;
  7520. if (!ASN1Dec_TerminalLabel(dec, &(val)->terminalLabel))
  7521. return 0;
  7522. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->terminalID, 1, 128, 7))
  7523. return 0;
  7524. if (y) {
  7525. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7526. return 0;
  7527. }
  7528. return 1;
  7529. }
  7530. static void ASN1CALL ASN1Free_TerminalInformation(TerminalInformation *val)
  7531. {
  7532. if (val) {
  7533. }
  7534. }
  7535. static int ASN1CALL ASN1Enc_RemoteMCRequest(ASN1encoding_t enc, RemoteMCRequest *val)
  7536. {
  7537. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  7538. return 0;
  7539. return 1;
  7540. }
  7541. static int ASN1CALL ASN1Dec_RemoteMCRequest(ASN1decoding_t dec, RemoteMCRequest *val)
  7542. {
  7543. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  7544. return 0;
  7545. return 1;
  7546. }
  7547. static int ASN1CALL ASN1Enc_RemoteMCResponse(ASN1encoding_t enc, RemoteMCResponse *val)
  7548. {
  7549. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  7550. return 0;
  7551. switch ((val)->choice) {
  7552. case 1:
  7553. break;
  7554. case 2:
  7555. if (!ASN1Enc_RemoteMCResponse_reject(enc, &(val)->u.reject))
  7556. return 0;
  7557. break;
  7558. default:
  7559. /* impossible */
  7560. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  7561. return 0;
  7562. }
  7563. return 1;
  7564. }
  7565. static int ASN1CALL ASN1Dec_RemoteMCResponse(ASN1decoding_t dec, RemoteMCResponse *val)
  7566. {
  7567. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  7568. return 0;
  7569. switch ((val)->choice) {
  7570. case 1:
  7571. break;
  7572. case 2:
  7573. if (!ASN1Dec_RemoteMCResponse_reject(dec, &(val)->u.reject))
  7574. return 0;
  7575. break;
  7576. case 0:
  7577. /* extension case */
  7578. if (!ASN1PERDecSkipFragmented(dec, 8))
  7579. return 0;
  7580. break;
  7581. default:
  7582. /* impossible */
  7583. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  7584. return 0;
  7585. }
  7586. return 1;
  7587. }
  7588. static int ASN1CALL ASN1Enc_SendTerminalCapabilitySet(ASN1encoding_t enc, SendTerminalCapabilitySet *val)
  7589. {
  7590. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  7591. return 0;
  7592. switch ((val)->choice) {
  7593. case 1:
  7594. if (!ASN1Enc_SendTerminalCapabilitySet_specificRequest(enc, &(val)->u.specificRequest))
  7595. return 0;
  7596. break;
  7597. case 2:
  7598. break;
  7599. default:
  7600. /* impossible */
  7601. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  7602. return 0;
  7603. }
  7604. return 1;
  7605. }
  7606. static int ASN1CALL ASN1Dec_SendTerminalCapabilitySet(ASN1decoding_t dec, SendTerminalCapabilitySet *val)
  7607. {
  7608. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  7609. return 0;
  7610. switch ((val)->choice) {
  7611. case 1:
  7612. if (!ASN1Dec_SendTerminalCapabilitySet_specificRequest(dec, &(val)->u.specificRequest))
  7613. return 0;
  7614. break;
  7615. case 2:
  7616. break;
  7617. case 0:
  7618. /* extension case */
  7619. if (!ASN1PERDecSkipFragmented(dec, 8))
  7620. return 0;
  7621. break;
  7622. default:
  7623. /* impossible */
  7624. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  7625. return 0;
  7626. }
  7627. return 1;
  7628. }
  7629. static void ASN1CALL ASN1Free_SendTerminalCapabilitySet(SendTerminalCapabilitySet *val)
  7630. {
  7631. if (val) {
  7632. switch ((val)->choice) {
  7633. case 1:
  7634. ASN1Free_SendTerminalCapabilitySet_specificRequest(&(val)->u.specificRequest);
  7635. break;
  7636. }
  7637. }
  7638. }
  7639. static int ASN1CALL ASN1Enc_FlowControlCommand(ASN1encoding_t enc, FlowControlCommand *val)
  7640. {
  7641. if (!ASN1PEREncExtensionBitClear(enc))
  7642. return 0;
  7643. if (!ASN1Enc_FlowControlCommand_scope(enc, &(val)->scope))
  7644. return 0;
  7645. if (!ASN1Enc_FlowControlCommand_restriction(enc, &(val)->restriction))
  7646. return 0;
  7647. return 1;
  7648. }
  7649. static int ASN1CALL ASN1Dec_FlowControlCommand(ASN1decoding_t dec, FlowControlCommand *val)
  7650. {
  7651. ASN1uint32_t y;
  7652. if (!ASN1PERDecExtensionBit(dec, &y))
  7653. return 0;
  7654. if (!ASN1Dec_FlowControlCommand_scope(dec, &(val)->scope))
  7655. return 0;
  7656. if (!ASN1Dec_FlowControlCommand_restriction(dec, &(val)->restriction))
  7657. return 0;
  7658. if (y) {
  7659. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7660. return 0;
  7661. }
  7662. return 1;
  7663. }
  7664. static int ASN1CALL ASN1Enc_SubstituteConferenceIDCommand(ASN1encoding_t enc, SubstituteConferenceIDCommand *val)
  7665. {
  7666. if (!ASN1PEREncExtensionBitClear(enc))
  7667. return 0;
  7668. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->conferenceIdentifier, 16))
  7669. return 0;
  7670. return 1;
  7671. }
  7672. static int ASN1CALL ASN1Dec_SubstituteConferenceIDCommand(ASN1decoding_t dec, SubstituteConferenceIDCommand *val)
  7673. {
  7674. ASN1uint32_t y;
  7675. if (!ASN1PERDecExtensionBit(dec, &y))
  7676. return 0;
  7677. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->conferenceIdentifier, 16))
  7678. return 0;
  7679. if (y) {
  7680. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7681. return 0;
  7682. }
  7683. return 1;
  7684. }
  7685. static void ASN1CALL ASN1Free_SubstituteConferenceIDCommand(SubstituteConferenceIDCommand *val)
  7686. {
  7687. if (val) {
  7688. }
  7689. }
  7690. static int ASN1CALL ASN1Enc_KeyProtectionMethod(ASN1encoding_t enc, KeyProtectionMethod *val)
  7691. {
  7692. if (!ASN1PEREncExtensionBitClear(enc))
  7693. return 0;
  7694. if (!ASN1PEREncBoolean(enc, (val)->secureChannel))
  7695. return 0;
  7696. if (!ASN1PEREncBoolean(enc, (val)->sharedSecret))
  7697. return 0;
  7698. if (!ASN1PEREncBoolean(enc, (val)->certProtectedKey))
  7699. return 0;
  7700. return 1;
  7701. }
  7702. static int ASN1CALL ASN1Dec_KeyProtectionMethod(ASN1decoding_t dec, KeyProtectionMethod *val)
  7703. {
  7704. ASN1uint32_t y;
  7705. if (!ASN1PERDecExtensionBit(dec, &y))
  7706. return 0;
  7707. if (!ASN1PERDecBoolean(dec, &(val)->secureChannel))
  7708. return 0;
  7709. if (!ASN1PERDecBoolean(dec, &(val)->sharedSecret))
  7710. return 0;
  7711. if (!ASN1PERDecBoolean(dec, &(val)->certProtectedKey))
  7712. return 0;
  7713. if (y) {
  7714. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7715. return 0;
  7716. }
  7717. return 1;
  7718. }
  7719. static int ASN1CALL ASN1Enc_EncryptionUpdateRequest(ASN1encoding_t enc, EncryptionUpdateRequest *val)
  7720. {
  7721. if (!ASN1PEREncExtensionBitClear(enc))
  7722. return 0;
  7723. if (!ASN1PEREncBits(enc, 1, (val)->o))
  7724. return 0;
  7725. if ((val)->o[0] & 0x80) {
  7726. if (!ASN1Enc_KeyProtectionMethod(enc, &(val)->keyProtectionMethod))
  7727. return 0;
  7728. }
  7729. return 1;
  7730. }
  7731. static int ASN1CALL ASN1Dec_EncryptionUpdateRequest(ASN1decoding_t dec, EncryptionUpdateRequest *val)
  7732. {
  7733. ASN1uint32_t y;
  7734. if (!ASN1PERDecExtensionBit(dec, &y))
  7735. return 0;
  7736. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  7737. return 0;
  7738. if ((val)->o[0] & 0x80) {
  7739. if (!ASN1Dec_KeyProtectionMethod(dec, &(val)->keyProtectionMethod))
  7740. return 0;
  7741. }
  7742. if (y) {
  7743. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7744. return 0;
  7745. }
  7746. return 1;
  7747. }
  7748. static int ASN1CALL ASN1Enc_H223MultiplexReconfiguration(ASN1encoding_t enc, H223MultiplexReconfiguration *val)
  7749. {
  7750. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  7751. return 0;
  7752. switch ((val)->choice) {
  7753. case 1:
  7754. if (!ASN1Enc_H223MultiplexReconfiguration_h223ModeChange(enc, &(val)->u.h223ModeChange))
  7755. return 0;
  7756. break;
  7757. case 2:
  7758. if (!ASN1Enc_H223MultiplexReconfiguration_h223AnnexADoubleFlag(enc, &(val)->u.h223AnnexADoubleFlag))
  7759. return 0;
  7760. break;
  7761. default:
  7762. /* impossible */
  7763. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  7764. return 0;
  7765. }
  7766. return 1;
  7767. }
  7768. static int ASN1CALL ASN1Dec_H223MultiplexReconfiguration(ASN1decoding_t dec, H223MultiplexReconfiguration *val)
  7769. {
  7770. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  7771. return 0;
  7772. switch ((val)->choice) {
  7773. case 1:
  7774. if (!ASN1Dec_H223MultiplexReconfiguration_h223ModeChange(dec, &(val)->u.h223ModeChange))
  7775. return 0;
  7776. break;
  7777. case 2:
  7778. if (!ASN1Dec_H223MultiplexReconfiguration_h223AnnexADoubleFlag(dec, &(val)->u.h223AnnexADoubleFlag))
  7779. return 0;
  7780. break;
  7781. case 0:
  7782. /* extension case */
  7783. if (!ASN1PERDecSkipFragmented(dec, 8))
  7784. return 0;
  7785. break;
  7786. default:
  7787. /* impossible */
  7788. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  7789. return 0;
  7790. }
  7791. return 1;
  7792. }
  7793. static int ASN1CALL ASN1Enc_FunctionNotSupported(ASN1encoding_t enc, FunctionNotSupported *val)
  7794. {
  7795. if (!ASN1PEREncExtensionBitClear(enc))
  7796. return 0;
  7797. if (!ASN1PEREncBits(enc, 1, (val)->o))
  7798. return 0;
  7799. if (!ASN1Enc_FunctionNotSupported_cause(enc, &(val)->cause))
  7800. return 0;
  7801. if ((val)->o[0] & 0x80) {
  7802. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->returnedFunction))
  7803. return 0;
  7804. }
  7805. return 1;
  7806. }
  7807. static int ASN1CALL ASN1Dec_FunctionNotSupported(ASN1decoding_t dec, FunctionNotSupported *val)
  7808. {
  7809. ASN1uint32_t y;
  7810. if (!ASN1PERDecExtensionBit(dec, &y))
  7811. return 0;
  7812. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  7813. return 0;
  7814. if (!ASN1Dec_FunctionNotSupported_cause(dec, &(val)->cause))
  7815. return 0;
  7816. if ((val)->o[0] & 0x80) {
  7817. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->returnedFunction))
  7818. return 0;
  7819. }
  7820. if (y) {
  7821. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7822. return 0;
  7823. }
  7824. return 1;
  7825. }
  7826. static void ASN1CALL ASN1Free_FunctionNotSupported(FunctionNotSupported *val)
  7827. {
  7828. if (val) {
  7829. if ((val)->o[0] & 0x80) {
  7830. ASN1octetstring_free(&(val)->returnedFunction);
  7831. }
  7832. }
  7833. }
  7834. static int ASN1CALL ASN1Enc_TerminalYouAreSeeingInSubPictureNumber(ASN1encoding_t enc, TerminalYouAreSeeingInSubPictureNumber *val)
  7835. {
  7836. if (!ASN1PEREncExtensionBitClear(enc))
  7837. return 0;
  7838. if (!ASN1PEREncBitVal(enc, 8, (val)->terminalNumber))
  7839. return 0;
  7840. ASN1PEREncAlignment(enc);
  7841. if (!ASN1PEREncBitVal(enc, 8, (val)->subPictureNumber))
  7842. return 0;
  7843. return 1;
  7844. }
  7845. static int ASN1CALL ASN1Dec_TerminalYouAreSeeingInSubPictureNumber(ASN1decoding_t dec, TerminalYouAreSeeingInSubPictureNumber *val)
  7846. {
  7847. ASN1uint32_t y;
  7848. if (!ASN1PERDecExtensionBit(dec, &y))
  7849. return 0;
  7850. if (!ASN1PERDecU16Val(dec, 8, &(val)->terminalNumber))
  7851. return 0;
  7852. ASN1PERDecAlignment(dec);
  7853. if (!ASN1PERDecU16Val(dec, 8, &(val)->subPictureNumber))
  7854. return 0;
  7855. if (y) {
  7856. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7857. return 0;
  7858. }
  7859. return 1;
  7860. }
  7861. static int ASN1CALL ASN1Enc_VideoIndicateCompose(ASN1encoding_t enc, VideoIndicateCompose *val)
  7862. {
  7863. if (!ASN1PEREncExtensionBitClear(enc))
  7864. return 0;
  7865. ASN1PEREncAlignment(enc);
  7866. if (!ASN1PEREncBitVal(enc, 8, (val)->compositionNumber))
  7867. return 0;
  7868. return 1;
  7869. }
  7870. static int ASN1CALL ASN1Dec_VideoIndicateCompose(ASN1decoding_t dec, VideoIndicateCompose *val)
  7871. {
  7872. ASN1uint32_t y;
  7873. if (!ASN1PERDecExtensionBit(dec, &y))
  7874. return 0;
  7875. ASN1PERDecAlignment(dec);
  7876. if (!ASN1PERDecU16Val(dec, 8, &(val)->compositionNumber))
  7877. return 0;
  7878. if (y) {
  7879. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  7880. return 0;
  7881. }
  7882. return 1;
  7883. }
  7884. static int ASN1CALL ASN1Enc_ConferenceIndication(ASN1encoding_t enc, ConferenceIndication *val)
  7885. {
  7886. ASN1encoding_t ee;
  7887. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 10))
  7888. return 0;
  7889. switch ((val)->choice) {
  7890. case 1:
  7891. if (!ASN1PEREncBitVal(enc, 4, (val)->u.sbeNumber))
  7892. return 0;
  7893. break;
  7894. case 2:
  7895. if (!ASN1Enc_TerminalLabel(enc, &(val)->u.terminalNumberAssign))
  7896. return 0;
  7897. break;
  7898. case 3:
  7899. if (!ASN1Enc_TerminalLabel(enc, &(val)->u.terminalJoinedConference))
  7900. return 0;
  7901. break;
  7902. case 4:
  7903. if (!ASN1Enc_TerminalLabel(enc, &(val)->u.terminalLeftConference))
  7904. return 0;
  7905. break;
  7906. case 5:
  7907. break;
  7908. case 6:
  7909. break;
  7910. case 7:
  7911. break;
  7912. case 8:
  7913. break;
  7914. case 9:
  7915. if (!ASN1Enc_TerminalLabel(enc, &(val)->u.terminalYouAreSeeing))
  7916. return 0;
  7917. break;
  7918. case 10:
  7919. break;
  7920. case 11:
  7921. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  7922. return 0;
  7923. if (!ASN1PEREncFlushFragmentedToParent(ee))
  7924. return 0;
  7925. ASN1_CloseEncoder2(ee);
  7926. break;
  7927. case 12:
  7928. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  7929. return 0;
  7930. if (!ASN1Enc_TerminalLabel(ee, &(val)->u.floorRequested))
  7931. return 0;
  7932. if (!ASN1PEREncFlushFragmentedToParent(ee))
  7933. return 0;
  7934. ASN1_CloseEncoder2(ee);
  7935. break;
  7936. case 13:
  7937. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  7938. return 0;
  7939. if (!ASN1Enc_TerminalYouAreSeeingInSubPictureNumber(ee, &(val)->u.terminalYouAreSeeingInSubPictureNumber))
  7940. return 0;
  7941. if (!ASN1PEREncFlushFragmentedToParent(ee))
  7942. return 0;
  7943. ASN1_CloseEncoder2(ee);
  7944. break;
  7945. case 14:
  7946. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  7947. return 0;
  7948. if (!ASN1Enc_VideoIndicateCompose(ee, &(val)->u.videoIndicateCompose))
  7949. return 0;
  7950. if (!ASN1PEREncFlushFragmentedToParent(ee))
  7951. return 0;
  7952. ASN1_CloseEncoder2(ee);
  7953. break;
  7954. default:
  7955. /* impossible */
  7956. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  7957. return 0;
  7958. }
  7959. return 1;
  7960. }
  7961. static int ASN1CALL ASN1Dec_ConferenceIndication(ASN1decoding_t dec, ConferenceIndication *val)
  7962. {
  7963. ASN1decoding_t dd;
  7964. ASN1octet_t *db;
  7965. ASN1uint32_t ds;
  7966. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 10))
  7967. return 0;
  7968. switch ((val)->choice) {
  7969. case 1:
  7970. if (!ASN1PERDecU16Val(dec, 4, &(val)->u.sbeNumber))
  7971. return 0;
  7972. break;
  7973. case 2:
  7974. if (!ASN1Dec_TerminalLabel(dec, &(val)->u.terminalNumberAssign))
  7975. return 0;
  7976. break;
  7977. case 3:
  7978. if (!ASN1Dec_TerminalLabel(dec, &(val)->u.terminalJoinedConference))
  7979. return 0;
  7980. break;
  7981. case 4:
  7982. if (!ASN1Dec_TerminalLabel(dec, &(val)->u.terminalLeftConference))
  7983. return 0;
  7984. break;
  7985. case 5:
  7986. break;
  7987. case 6:
  7988. break;
  7989. case 7:
  7990. break;
  7991. case 8:
  7992. break;
  7993. case 9:
  7994. if (!ASN1Dec_TerminalLabel(dec, &(val)->u.terminalYouAreSeeing))
  7995. return 0;
  7996. break;
  7997. case 10:
  7998. break;
  7999. case 11:
  8000. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  8001. return 0;
  8002. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  8003. return 0;
  8004. ASN1_CloseDecoder(dd);
  8005. ASN1Free(db);
  8006. break;
  8007. case 12:
  8008. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  8009. return 0;
  8010. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  8011. return 0;
  8012. if (!ASN1Dec_TerminalLabel(dd, &(val)->u.floorRequested))
  8013. return 0;
  8014. ASN1_CloseDecoder(dd);
  8015. ASN1Free(db);
  8016. break;
  8017. case 13:
  8018. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  8019. return 0;
  8020. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  8021. return 0;
  8022. if (!ASN1Dec_TerminalYouAreSeeingInSubPictureNumber(dd, &(val)->u.terminalYouAreSeeingInSubPictureNumber))
  8023. return 0;
  8024. ASN1_CloseDecoder(dd);
  8025. ASN1Free(db);
  8026. break;
  8027. case 14:
  8028. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  8029. return 0;
  8030. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  8031. return 0;
  8032. if (!ASN1Dec_VideoIndicateCompose(dd, &(val)->u.videoIndicateCompose))
  8033. return 0;
  8034. ASN1_CloseDecoder(dd);
  8035. ASN1Free(db);
  8036. break;
  8037. case 0:
  8038. /* extension case */
  8039. if (!ASN1PERDecSkipFragmented(dec, 8))
  8040. return 0;
  8041. break;
  8042. default:
  8043. /* impossible */
  8044. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  8045. return 0;
  8046. }
  8047. return 1;
  8048. }
  8049. static int ASN1CALL ASN1Enc_JitterIndication(ASN1encoding_t enc, JitterIndication *val)
  8050. {
  8051. ASN1uint32_t l;
  8052. if (!ASN1PEREncExtensionBitClear(enc))
  8053. return 0;
  8054. if (!ASN1PEREncBits(enc, 2, (val)->o))
  8055. return 0;
  8056. if (!ASN1Enc_JitterIndication_scope(enc, &(val)->scope))
  8057. return 0;
  8058. if (!ASN1PEREncBitVal(enc, 2, (val)->estimatedReceivedJitterMantissa))
  8059. return 0;
  8060. if (!ASN1PEREncBitVal(enc, 3, (val)->estimatedReceivedJitterExponent))
  8061. return 0;
  8062. if ((val)->o[0] & 0x80) {
  8063. if (!ASN1PEREncBitVal(enc, 4, (val)->skippedFrameCount))
  8064. return 0;
  8065. }
  8066. if ((val)->o[0] & 0x40) {
  8067. l = ASN1uint32_uoctets((val)->additionalDecoderBuffer);
  8068. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  8069. return 0;
  8070. ASN1PEREncAlignment(enc);
  8071. if (!ASN1PEREncBitVal(enc, l * 8, (val)->additionalDecoderBuffer))
  8072. return 0;
  8073. }
  8074. return 1;
  8075. }
  8076. static int ASN1CALL ASN1Dec_JitterIndication(ASN1decoding_t dec, JitterIndication *val)
  8077. {
  8078. ASN1uint32_t y;
  8079. ASN1uint32_t l;
  8080. if (!ASN1PERDecExtensionBit(dec, &y))
  8081. return 0;
  8082. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  8083. return 0;
  8084. if (!ASN1Dec_JitterIndication_scope(dec, &(val)->scope))
  8085. return 0;
  8086. if (!ASN1PERDecU16Val(dec, 2, &(val)->estimatedReceivedJitterMantissa))
  8087. return 0;
  8088. if (!ASN1PERDecU16Val(dec, 3, &(val)->estimatedReceivedJitterExponent))
  8089. return 0;
  8090. if ((val)->o[0] & 0x80) {
  8091. if (!ASN1PERDecU16Val(dec, 4, &(val)->skippedFrameCount))
  8092. return 0;
  8093. }
  8094. if ((val)->o[0] & 0x40) {
  8095. if (!ASN1PERDecU32Val(dec, 2, &l))
  8096. return 0;
  8097. l += 1;
  8098. ASN1PERDecAlignment(dec);
  8099. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->additionalDecoderBuffer))
  8100. return 0;
  8101. }
  8102. if (y) {
  8103. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8104. return 0;
  8105. }
  8106. return 1;
  8107. }
  8108. static int ASN1CALL ASN1Enc_H223SkewIndication(ASN1encoding_t enc, H223SkewIndication *val)
  8109. {
  8110. if (!ASN1PEREncExtensionBitClear(enc))
  8111. return 0;
  8112. if (!ASN1PEREncUnsignedShort(enc, (val)->logicalChannelNumber1 - 1))
  8113. return 0;
  8114. if (!ASN1PEREncUnsignedShort(enc, (val)->logicalChannelNumber2 - 1))
  8115. return 0;
  8116. if (!ASN1PEREncUnsignedShort(enc, (val)->skew))
  8117. return 0;
  8118. return 1;
  8119. }
  8120. static int ASN1CALL ASN1Dec_H223SkewIndication(ASN1decoding_t dec, H223SkewIndication *val)
  8121. {
  8122. ASN1uint32_t y;
  8123. if (!ASN1PERDecExtensionBit(dec, &y))
  8124. return 0;
  8125. if (!ASN1PERDecUnsignedShort(dec, &(val)->logicalChannelNumber1))
  8126. return 0;
  8127. (val)->logicalChannelNumber1 += 1;
  8128. if (!ASN1PERDecUnsignedShort(dec, &(val)->logicalChannelNumber2))
  8129. return 0;
  8130. (val)->logicalChannelNumber2 += 1;
  8131. if (!ASN1PERDecUnsignedShort(dec, &(val)->skew))
  8132. return 0;
  8133. if (y) {
  8134. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8135. return 0;
  8136. }
  8137. return 1;
  8138. }
  8139. static int ASN1CALL ASN1Enc_H2250MaximumSkewIndication(ASN1encoding_t enc, H2250MaximumSkewIndication *val)
  8140. {
  8141. if (!ASN1PEREncExtensionBitClear(enc))
  8142. return 0;
  8143. if (!ASN1PEREncUnsignedShort(enc, (val)->logicalChannelNumber1 - 1))
  8144. return 0;
  8145. if (!ASN1PEREncUnsignedShort(enc, (val)->logicalChannelNumber2 - 1))
  8146. return 0;
  8147. if (!ASN1PEREncUnsignedShort(enc, (val)->maximumSkew))
  8148. return 0;
  8149. return 1;
  8150. }
  8151. static int ASN1CALL ASN1Dec_H2250MaximumSkewIndication(ASN1decoding_t dec, H2250MaximumSkewIndication *val)
  8152. {
  8153. ASN1uint32_t y;
  8154. if (!ASN1PERDecExtensionBit(dec, &y))
  8155. return 0;
  8156. if (!ASN1PERDecUnsignedShort(dec, &(val)->logicalChannelNumber1))
  8157. return 0;
  8158. (val)->logicalChannelNumber1 += 1;
  8159. if (!ASN1PERDecUnsignedShort(dec, &(val)->logicalChannelNumber2))
  8160. return 0;
  8161. (val)->logicalChannelNumber2 += 1;
  8162. if (!ASN1PERDecUnsignedShort(dec, &(val)->maximumSkew))
  8163. return 0;
  8164. if (y) {
  8165. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8166. return 0;
  8167. }
  8168. return 1;
  8169. }
  8170. static int ASN1CALL ASN1Enc_VendorIdentification(ASN1encoding_t enc, VendorIdentification *val)
  8171. {
  8172. if (!ASN1PEREncExtensionBitClear(enc))
  8173. return 0;
  8174. if (!ASN1PEREncBits(enc, 2, (val)->o))
  8175. return 0;
  8176. if (!ASN1Enc_NonStandardIdentifier(enc, &(val)->vendor))
  8177. return 0;
  8178. if ((val)->o[0] & 0x80) {
  8179. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->productNumber, 1, 256, 8))
  8180. return 0;
  8181. }
  8182. if ((val)->o[0] & 0x40) {
  8183. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->versionNumber, 1, 256, 8))
  8184. return 0;
  8185. }
  8186. return 1;
  8187. }
  8188. static int ASN1CALL ASN1Dec_VendorIdentification(ASN1decoding_t dec, VendorIdentification *val)
  8189. {
  8190. ASN1uint32_t y;
  8191. if (!ASN1PERDecExtensionBit(dec, &y))
  8192. return 0;
  8193. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  8194. return 0;
  8195. if (!ASN1Dec_NonStandardIdentifier(dec, &(val)->vendor))
  8196. return 0;
  8197. if ((val)->o[0] & 0x80) {
  8198. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->productNumber, 1, 256, 8))
  8199. return 0;
  8200. }
  8201. if ((val)->o[0] & 0x40) {
  8202. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->versionNumber, 1, 256, 8))
  8203. return 0;
  8204. }
  8205. if (y) {
  8206. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8207. return 0;
  8208. }
  8209. return 1;
  8210. }
  8211. static void ASN1CALL ASN1Free_VendorIdentification(VendorIdentification *val)
  8212. {
  8213. if (val) {
  8214. ASN1Free_NonStandardIdentifier(&(val)->vendor);
  8215. if ((val)->o[0] & 0x80) {
  8216. }
  8217. if ((val)->o[0] & 0x40) {
  8218. }
  8219. }
  8220. }
  8221. static int ASN1CALL ASN1Enc_NewATMVCIndication(ASN1encoding_t enc, NewATMVCIndication *val)
  8222. {
  8223. ASN1octet_t o[1];
  8224. ASN1uint32_t y;
  8225. ASN1encoding_t ee;
  8226. CopyMemory(o, (val)->o, 1);
  8227. o[0] |= 0x80;
  8228. y = ASN1PEREncCheckExtensions(1, (val)->o + 0);
  8229. if (!ASN1PEREncBitVal(enc, 1, y))
  8230. return 0;
  8231. if (!ASN1PEREncUnsignedShort(enc, (val)->resourceID))
  8232. return 0;
  8233. if (!ASN1PEREncUnsignedShort(enc, (val)->bitRate - 1))
  8234. return 0;
  8235. if (!ASN1PEREncBoolean(enc, (val)->bitRateLockedToPCRClock))
  8236. return 0;
  8237. if (!ASN1PEREncBoolean(enc, (val)->bitRateLockedToNetworkClock))
  8238. return 0;
  8239. if (!ASN1Enc_NewATMVCIndication_aal(enc, &(val)->aal))
  8240. return 0;
  8241. if (!ASN1Enc_NewATMVCIndication_multiplex(enc, &(val)->multiplex))
  8242. return 0;
  8243. if (y) {
  8244. if (!ASN1PEREncNormallySmallBits(enc, 1, o + 0))
  8245. return 0;
  8246. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  8247. return 0;
  8248. if (o[0] & 0x80) {
  8249. if (!ASN1Enc_NewATMVCIndication_reverseParameters(ee, &(val)->reverseParameters))
  8250. return 0;
  8251. if (!ASN1PEREncFlushFragmentedToParent(ee))
  8252. return 0;
  8253. }
  8254. ASN1_CloseEncoder2(ee);
  8255. }
  8256. return 1;
  8257. }
  8258. static int ASN1CALL ASN1Dec_NewATMVCIndication(ASN1decoding_t dec, NewATMVCIndication *val)
  8259. {
  8260. ASN1uint32_t y;
  8261. ASN1decoding_t dd;
  8262. ASN1octet_t *db;
  8263. ASN1uint32_t ds;
  8264. ASN1uint32_t i;
  8265. ASN1uint32_t e;
  8266. if (!ASN1PERDecExtensionBit(dec, &y))
  8267. return 0;
  8268. if (!ASN1PERDecUnsignedShort(dec, &(val)->resourceID))
  8269. return 0;
  8270. if (!ASN1PERDecUnsignedShort(dec, &(val)->bitRate))
  8271. return 0;
  8272. (val)->bitRate += 1;
  8273. if (!ASN1PERDecBoolean(dec, &(val)->bitRateLockedToPCRClock))
  8274. return 0;
  8275. if (!ASN1PERDecBoolean(dec, &(val)->bitRateLockedToNetworkClock))
  8276. return 0;
  8277. if (!ASN1Dec_NewATMVCIndication_aal(dec, &(val)->aal))
  8278. return 0;
  8279. if (!ASN1Dec_NewATMVCIndication_multiplex(dec, &(val)->multiplex))
  8280. return 0;
  8281. if (!y) {
  8282. ZeroMemory((val)->o + 0, 1);
  8283. } else {
  8284. if (!ASN1PERDecNormallySmallExtension(dec, &e, 1, (val)->o + 0))
  8285. return 0;
  8286. if ((val)->o[0] & 0x80) {
  8287. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  8288. return 0;
  8289. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  8290. return 0;
  8291. if (!ASN1Dec_NewATMVCIndication_reverseParameters(dd, &(val)->reverseParameters))
  8292. return 0;
  8293. ASN1_CloseDecoder(dd);
  8294. ASN1Free(db);
  8295. }
  8296. for (i = 0; i < e; i++) {
  8297. if (!ASN1PERDecSkipFragmented(dec, 8))
  8298. return 0;
  8299. }
  8300. }
  8301. return 1;
  8302. }
  8303. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom(ASN1encoding_t enc, PRTPH263VideoRedundancyEncoding_frameToThreadMapping_custom *val)
  8304. {
  8305. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom_ElmFn, 1, 256, 8);
  8306. }
  8307. static int ASN1CALL ASN1Enc_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom_ElmFn(ASN1encoding_t enc, PRTPH263VideoRedundancyEncoding_frameToThreadMapping_custom val)
  8308. {
  8309. if (!ASN1Enc_RTPH263VideoRedundancyFrameMapping(enc, &val->value))
  8310. return 0;
  8311. return 1;
  8312. }
  8313. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom(ASN1decoding_t dec, PRTPH263VideoRedundancyEncoding_frameToThreadMapping_custom *val)
  8314. {
  8315. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom_ElmFn, sizeof(**val), 1, 256, 8);
  8316. }
  8317. static int ASN1CALL ASN1Dec_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom_ElmFn(ASN1decoding_t dec, PRTPH263VideoRedundancyEncoding_frameToThreadMapping_custom val)
  8318. {
  8319. if (!ASN1Dec_RTPH263VideoRedundancyFrameMapping(dec, &val->value))
  8320. return 0;
  8321. return 1;
  8322. }
  8323. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom(PRTPH263VideoRedundancyEncoding_frameToThreadMapping_custom *val)
  8324. {
  8325. if (val) {
  8326. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom_ElmFn);
  8327. }
  8328. }
  8329. static void ASN1CALL ASN1Free_RTPH263VideoRedundancyEncoding_frameToThreadMapping_custom_ElmFn(PRTPH263VideoRedundancyEncoding_frameToThreadMapping_custom val)
  8330. {
  8331. if (val) {
  8332. ASN1Free_RTPH263VideoRedundancyFrameMapping(&val->value);
  8333. }
  8334. }
  8335. static int ASN1CALL ASN1Enc_MultiplexElement_type_subElementList(ASN1encoding_t enc, PMultiplexElement_type_subElementList *val)
  8336. {
  8337. ASN1uint32_t i;
  8338. if (!ASN1PEREncBitVal(enc, 8, (*val)->count - 2))
  8339. return 0;
  8340. for (i = 0; i < (*val)->count; i++) {
  8341. if (!ASN1Enc_MultiplexElement(enc, &((*val)->value)[i]))
  8342. return 0;
  8343. }
  8344. return 1;
  8345. }
  8346. static int ASN1CALL ASN1Dec_MultiplexElement_type_subElementList(ASN1decoding_t dec, PMultiplexElement_type_subElementList *val)
  8347. {
  8348. ASN1uint32_t i;
  8349. if (!ASN1PERDecU32Val(dec, 8, &(*val)->count))
  8350. return 0;
  8351. (*val)->count += 2;
  8352. for (i = 0; i < (*val)->count; i++) {
  8353. if (!ASN1Dec_MultiplexElement(dec, &((*val)->value)[i]))
  8354. return 0;
  8355. }
  8356. return 1;
  8357. }
  8358. static void ASN1CALL ASN1Free_MultiplexElement_type_subElementList(PMultiplexElement_type_subElementList *val)
  8359. {
  8360. ASN1uint32_t i;
  8361. if (val) {
  8362. for (i = 0; i < (*val)->count; i++) {
  8363. ASN1Free_MultiplexElement(&(*val)->value[i]);
  8364. }
  8365. }
  8366. }
  8367. static int ASN1CALL ASN1Enc_RequestAllTerminalIDsResponse_terminalInformation(ASN1encoding_t enc, PRequestAllTerminalIDsResponse_terminalInformation *val)
  8368. {
  8369. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_RequestAllTerminalIDsResponse_terminalInformation_ElmFn);
  8370. }
  8371. static int ASN1CALL ASN1Enc_RequestAllTerminalIDsResponse_terminalInformation_ElmFn(ASN1encoding_t enc, PRequestAllTerminalIDsResponse_terminalInformation val)
  8372. {
  8373. if (!ASN1Enc_TerminalInformation(enc, &val->value))
  8374. return 0;
  8375. return 1;
  8376. }
  8377. static int ASN1CALL ASN1Dec_RequestAllTerminalIDsResponse_terminalInformation(ASN1decoding_t dec, PRequestAllTerminalIDsResponse_terminalInformation *val)
  8378. {
  8379. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_RequestAllTerminalIDsResponse_terminalInformation_ElmFn, sizeof(**val));
  8380. }
  8381. static int ASN1CALL ASN1Dec_RequestAllTerminalIDsResponse_terminalInformation_ElmFn(ASN1decoding_t dec, PRequestAllTerminalIDsResponse_terminalInformation val)
  8382. {
  8383. if (!ASN1Dec_TerminalInformation(dec, &val->value))
  8384. return 0;
  8385. return 1;
  8386. }
  8387. static void ASN1CALL ASN1Free_RequestAllTerminalIDsResponse_terminalInformation(PRequestAllTerminalIDsResponse_terminalInformation *val)
  8388. {
  8389. if (val) {
  8390. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_RequestAllTerminalIDsResponse_terminalInformation_ElmFn);
  8391. }
  8392. }
  8393. static void ASN1CALL ASN1Free_RequestAllTerminalIDsResponse_terminalInformation_ElmFn(PRequestAllTerminalIDsResponse_terminalInformation val)
  8394. {
  8395. if (val) {
  8396. ASN1Free_TerminalInformation(&val->value);
  8397. }
  8398. }
  8399. static int ASN1CALL ASN1Enc_ConferenceResponse_terminalCertificateResponse(ASN1encoding_t enc, ConferenceResponse_terminalCertificateResponse *val)
  8400. {
  8401. if (!ASN1PEREncExtensionBitClear(enc))
  8402. return 0;
  8403. if (!ASN1PEREncBits(enc, 2, (val)->o))
  8404. return 0;
  8405. if ((val)->o[0] & 0x80) {
  8406. if (!ASN1Enc_TerminalLabel(enc, &(val)->terminalLabel))
  8407. return 0;
  8408. }
  8409. if ((val)->o[0] & 0x40) {
  8410. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->certificateResponse, 1, 65535, 16))
  8411. return 0;
  8412. }
  8413. return 1;
  8414. }
  8415. static int ASN1CALL ASN1Dec_ConferenceResponse_terminalCertificateResponse(ASN1decoding_t dec, ConferenceResponse_terminalCertificateResponse *val)
  8416. {
  8417. ASN1uint32_t y;
  8418. if (!ASN1PERDecExtensionBit(dec, &y))
  8419. return 0;
  8420. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  8421. return 0;
  8422. if ((val)->o[0] & 0x80) {
  8423. if (!ASN1Dec_TerminalLabel(dec, &(val)->terminalLabel))
  8424. return 0;
  8425. }
  8426. if ((val)->o[0] & 0x40) {
  8427. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->certificateResponse, 1, 65535, 16))
  8428. return 0;
  8429. }
  8430. if (y) {
  8431. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8432. return 0;
  8433. }
  8434. return 1;
  8435. }
  8436. static void ASN1CALL ASN1Free_ConferenceResponse_terminalCertificateResponse(ConferenceResponse_terminalCertificateResponse *val)
  8437. {
  8438. if (val) {
  8439. if ((val)->o[0] & 0x40) {
  8440. }
  8441. }
  8442. }
  8443. static int ASN1CALL ASN1Enc_ConferenceResponse_chairTokenOwnerResponse(ASN1encoding_t enc, ConferenceResponse_chairTokenOwnerResponse *val)
  8444. {
  8445. if (!ASN1PEREncExtensionBitClear(enc))
  8446. return 0;
  8447. if (!ASN1Enc_TerminalLabel(enc, &(val)->terminalLabel))
  8448. return 0;
  8449. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->terminalID, 1, 128, 7))
  8450. return 0;
  8451. return 1;
  8452. }
  8453. static int ASN1CALL ASN1Dec_ConferenceResponse_chairTokenOwnerResponse(ASN1decoding_t dec, ConferenceResponse_chairTokenOwnerResponse *val)
  8454. {
  8455. ASN1uint32_t y;
  8456. if (!ASN1PERDecExtensionBit(dec, &y))
  8457. return 0;
  8458. if (!ASN1Dec_TerminalLabel(dec, &(val)->terminalLabel))
  8459. return 0;
  8460. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->terminalID, 1, 128, 7))
  8461. return 0;
  8462. if (y) {
  8463. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8464. return 0;
  8465. }
  8466. return 1;
  8467. }
  8468. static void ASN1CALL ASN1Free_ConferenceResponse_chairTokenOwnerResponse(ConferenceResponse_chairTokenOwnerResponse *val)
  8469. {
  8470. if (val) {
  8471. }
  8472. }
  8473. static int ASN1CALL ASN1Enc_ConferenceResponse_terminalListResponse(ASN1encoding_t enc, ConferenceResponse_terminalListResponse *val)
  8474. {
  8475. ASN1uint32_t i;
  8476. ASN1PEREncAlignment(enc);
  8477. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  8478. return 0;
  8479. for (i = 0; i < (val)->count; i++) {
  8480. if (!ASN1Enc_TerminalLabel(enc, &((val)->value)[i]))
  8481. return 0;
  8482. }
  8483. return 1;
  8484. }
  8485. static int ASN1CALL ASN1Dec_ConferenceResponse_terminalListResponse(ASN1decoding_t dec, ConferenceResponse_terminalListResponse *val)
  8486. {
  8487. ASN1uint32_t i;
  8488. ASN1PERDecAlignment(dec);
  8489. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  8490. return 0;
  8491. (val)->count += 1;
  8492. for (i = 0; i < (val)->count; i++) {
  8493. if (!ASN1Dec_TerminalLabel(dec, &((val)->value)[i]))
  8494. return 0;
  8495. }
  8496. return 1;
  8497. }
  8498. static void ASN1CALL ASN1Free_ConferenceResponse_terminalListResponse(ConferenceResponse_terminalListResponse *val)
  8499. {
  8500. if (val) {
  8501. }
  8502. }
  8503. static int ASN1CALL ASN1Enc_ConferenceResponse_passwordResponse(ASN1encoding_t enc, ConferenceResponse_passwordResponse *val)
  8504. {
  8505. if (!ASN1PEREncExtensionBitClear(enc))
  8506. return 0;
  8507. if (!ASN1Enc_TerminalLabel(enc, &(val)->terminalLabel))
  8508. return 0;
  8509. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->password, 1, 32, 5))
  8510. return 0;
  8511. return 1;
  8512. }
  8513. static int ASN1CALL ASN1Dec_ConferenceResponse_passwordResponse(ASN1decoding_t dec, ConferenceResponse_passwordResponse *val)
  8514. {
  8515. ASN1uint32_t y;
  8516. if (!ASN1PERDecExtensionBit(dec, &y))
  8517. return 0;
  8518. if (!ASN1Dec_TerminalLabel(dec, &(val)->terminalLabel))
  8519. return 0;
  8520. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->password, 1, 32, 5))
  8521. return 0;
  8522. if (y) {
  8523. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8524. return 0;
  8525. }
  8526. return 1;
  8527. }
  8528. static void ASN1CALL ASN1Free_ConferenceResponse_passwordResponse(ConferenceResponse_passwordResponse *val)
  8529. {
  8530. if (val) {
  8531. }
  8532. }
  8533. static int ASN1CALL ASN1Enc_ConferenceResponse_conferenceIDResponse(ASN1encoding_t enc, ConferenceResponse_conferenceIDResponse *val)
  8534. {
  8535. if (!ASN1PEREncExtensionBitClear(enc))
  8536. return 0;
  8537. if (!ASN1Enc_TerminalLabel(enc, &(val)->terminalLabel))
  8538. return 0;
  8539. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->conferenceID, 1, 32, 5))
  8540. return 0;
  8541. return 1;
  8542. }
  8543. static int ASN1CALL ASN1Dec_ConferenceResponse_conferenceIDResponse(ASN1decoding_t dec, ConferenceResponse_conferenceIDResponse *val)
  8544. {
  8545. ASN1uint32_t y;
  8546. if (!ASN1PERDecExtensionBit(dec, &y))
  8547. return 0;
  8548. if (!ASN1Dec_TerminalLabel(dec, &(val)->terminalLabel))
  8549. return 0;
  8550. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->conferenceID, 1, 32, 5))
  8551. return 0;
  8552. if (y) {
  8553. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8554. return 0;
  8555. }
  8556. return 1;
  8557. }
  8558. static void ASN1CALL ASN1Free_ConferenceResponse_conferenceIDResponse(ConferenceResponse_conferenceIDResponse *val)
  8559. {
  8560. if (val) {
  8561. }
  8562. }
  8563. static int ASN1CALL ASN1Enc_ConferenceResponse_terminalIDResponse(ASN1encoding_t enc, ConferenceResponse_terminalIDResponse *val)
  8564. {
  8565. if (!ASN1PEREncExtensionBitClear(enc))
  8566. return 0;
  8567. if (!ASN1Enc_TerminalLabel(enc, &(val)->terminalLabel))
  8568. return 0;
  8569. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->terminalID, 1, 128, 7))
  8570. return 0;
  8571. return 1;
  8572. }
  8573. static int ASN1CALL ASN1Dec_ConferenceResponse_terminalIDResponse(ASN1decoding_t dec, ConferenceResponse_terminalIDResponse *val)
  8574. {
  8575. ASN1uint32_t y;
  8576. if (!ASN1PERDecExtensionBit(dec, &y))
  8577. return 0;
  8578. if (!ASN1Dec_TerminalLabel(dec, &(val)->terminalLabel))
  8579. return 0;
  8580. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->terminalID, 1, 128, 7))
  8581. return 0;
  8582. if (y) {
  8583. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8584. return 0;
  8585. }
  8586. return 1;
  8587. }
  8588. static void ASN1CALL ASN1Free_ConferenceResponse_terminalIDResponse(ConferenceResponse_terminalIDResponse *val)
  8589. {
  8590. if (val) {
  8591. }
  8592. }
  8593. static int ASN1CALL ASN1Enc_ConferenceResponse_mCTerminalIDResponse(ASN1encoding_t enc, ConferenceResponse_mCTerminalIDResponse *val)
  8594. {
  8595. if (!ASN1PEREncExtensionBitClear(enc))
  8596. return 0;
  8597. if (!ASN1Enc_TerminalLabel(enc, &(val)->terminalLabel))
  8598. return 0;
  8599. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->terminalID, 1, 128, 7))
  8600. return 0;
  8601. return 1;
  8602. }
  8603. static int ASN1CALL ASN1Dec_ConferenceResponse_mCTerminalIDResponse(ASN1decoding_t dec, ConferenceResponse_mCTerminalIDResponse *val)
  8604. {
  8605. ASN1uint32_t y;
  8606. if (!ASN1PERDecExtensionBit(dec, &y))
  8607. return 0;
  8608. if (!ASN1Dec_TerminalLabel(dec, &(val)->terminalLabel))
  8609. return 0;
  8610. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->terminalID, 1, 128, 7))
  8611. return 0;
  8612. if (y) {
  8613. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8614. return 0;
  8615. }
  8616. return 1;
  8617. }
  8618. static void ASN1CALL ASN1Free_ConferenceResponse_mCTerminalIDResponse(ConferenceResponse_mCTerminalIDResponse *val)
  8619. {
  8620. if (val) {
  8621. }
  8622. }
  8623. static int ASN1CALL ASN1Enc_ConferenceRequest_requestTerminalCertificate(ASN1encoding_t enc, ConferenceRequest_requestTerminalCertificate *val)
  8624. {
  8625. ASN1uint32_t l;
  8626. if (!ASN1PEREncExtensionBitClear(enc))
  8627. return 0;
  8628. if (!ASN1PEREncBits(enc, 3, (val)->o))
  8629. return 0;
  8630. if ((val)->o[0] & 0x80) {
  8631. if (!ASN1Enc_TerminalLabel(enc, &(val)->terminalLabel))
  8632. return 0;
  8633. }
  8634. if ((val)->o[0] & 0x40) {
  8635. if (!ASN1Enc_CertSelectionCriteria(enc, &(val)->certSelectionCriteria))
  8636. return 0;
  8637. }
  8638. if ((val)->o[0] & 0x20) {
  8639. l = ASN1uint32_uoctets((val)->sRandom - 1);
  8640. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  8641. return 0;
  8642. ASN1PEREncAlignment(enc);
  8643. if (!ASN1PEREncBitVal(enc, l * 8, (val)->sRandom - 1))
  8644. return 0;
  8645. }
  8646. return 1;
  8647. }
  8648. static int ASN1CALL ASN1Dec_ConferenceRequest_requestTerminalCertificate(ASN1decoding_t dec, ConferenceRequest_requestTerminalCertificate *val)
  8649. {
  8650. ASN1uint32_t y;
  8651. ASN1uint32_t l;
  8652. if (!ASN1PERDecExtensionBit(dec, &y))
  8653. return 0;
  8654. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  8655. return 0;
  8656. if ((val)->o[0] & 0x80) {
  8657. if (!ASN1Dec_TerminalLabel(dec, &(val)->terminalLabel))
  8658. return 0;
  8659. }
  8660. if ((val)->o[0] & 0x40) {
  8661. if (!ASN1Dec_CertSelectionCriteria(dec, &(val)->certSelectionCriteria))
  8662. return 0;
  8663. }
  8664. if ((val)->o[0] & 0x20) {
  8665. if (!ASN1PERDecU32Val(dec, 2, &l))
  8666. return 0;
  8667. l += 1;
  8668. ASN1PERDecAlignment(dec);
  8669. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->sRandom))
  8670. return 0;
  8671. (val)->sRandom += 1;
  8672. }
  8673. if (y) {
  8674. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  8675. return 0;
  8676. }
  8677. return 1;
  8678. }
  8679. static void ASN1CALL ASN1Free_ConferenceRequest_requestTerminalCertificate(ConferenceRequest_requestTerminalCertificate *val)
  8680. {
  8681. if (val) {
  8682. if ((val)->o[0] & 0x40) {
  8683. ASN1Free_CertSelectionCriteria(&(val)->certSelectionCriteria);
  8684. }
  8685. }
  8686. }
  8687. static int ASN1CALL ASN1Enc_RequestMultiplexEntryReject_rejectionDescriptions(ASN1encoding_t enc, RequestMultiplexEntryReject_rejectionDescriptions *val)
  8688. {
  8689. ASN1uint32_t i;
  8690. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  8691. return 0;
  8692. for (i = 0; i < (val)->count; i++) {
  8693. if (!ASN1Enc_RequestMultiplexEntryRejectionDescriptions(enc, &((val)->value)[i]))
  8694. return 0;
  8695. }
  8696. return 1;
  8697. }
  8698. static int ASN1CALL ASN1Dec_RequestMultiplexEntryReject_rejectionDescriptions(ASN1decoding_t dec, RequestMultiplexEntryReject_rejectionDescriptions *val)
  8699. {
  8700. ASN1uint32_t i;
  8701. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  8702. return 0;
  8703. (val)->count += 1;
  8704. for (i = 0; i < (val)->count; i++) {
  8705. if (!ASN1Dec_RequestMultiplexEntryRejectionDescriptions(dec, &((val)->value)[i]))
  8706. return 0;
  8707. }
  8708. return 1;
  8709. }
  8710. static void ASN1CALL ASN1Free_RequestMultiplexEntryReject_rejectionDescriptions(RequestMultiplexEntryReject_rejectionDescriptions *val)
  8711. {
  8712. if (val) {
  8713. }
  8714. }
  8715. static int ASN1CALL ASN1Enc_MultiplexEntrySendReject_rejectionDescriptions(ASN1encoding_t enc, MultiplexEntrySendReject_rejectionDescriptions *val)
  8716. {
  8717. ASN1uint32_t i;
  8718. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  8719. return 0;
  8720. for (i = 0; i < (val)->count; i++) {
  8721. if (!ASN1Enc_MultiplexEntryRejectionDescriptions(enc, &((val)->value)[i]))
  8722. return 0;
  8723. }
  8724. return 1;
  8725. }
  8726. static int ASN1CALL ASN1Dec_MultiplexEntrySendReject_rejectionDescriptions(ASN1decoding_t dec, MultiplexEntrySendReject_rejectionDescriptions *val)
  8727. {
  8728. ASN1uint32_t i;
  8729. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  8730. return 0;
  8731. (val)->count += 1;
  8732. for (i = 0; i < (val)->count; i++) {
  8733. if (!ASN1Dec_MultiplexEntryRejectionDescriptions(dec, &((val)->value)[i]))
  8734. return 0;
  8735. }
  8736. return 1;
  8737. }
  8738. static void ASN1CALL ASN1Free_MultiplexEntrySendReject_rejectionDescriptions(MultiplexEntrySendReject_rejectionDescriptions *val)
  8739. {
  8740. if (val) {
  8741. }
  8742. }
  8743. static int ASN1CALL ASN1Enc_MultiplexEntryDescriptor_elementList(ASN1encoding_t enc, MultiplexEntryDescriptor_elementList *val)
  8744. {
  8745. ASN1uint32_t i;
  8746. ASN1PEREncAlignment(enc);
  8747. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  8748. return 0;
  8749. for (i = 0; i < (val)->count; i++) {
  8750. if (!ASN1Enc_MultiplexElement(enc, &((val)->value)[i]))
  8751. return 0;
  8752. }
  8753. return 1;
  8754. }
  8755. static int ASN1CALL ASN1Dec_MultiplexEntryDescriptor_elementList(ASN1decoding_t dec, MultiplexEntryDescriptor_elementList *val)
  8756. {
  8757. ASN1uint32_t i;
  8758. ASN1PERDecAlignment(dec);
  8759. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  8760. return 0;
  8761. (val)->count += 1;
  8762. for (i = 0; i < (val)->count; i++) {
  8763. if (!ASN1Dec_MultiplexElement(dec, &((val)->value)[i]))
  8764. return 0;
  8765. }
  8766. return 1;
  8767. }
  8768. static void ASN1CALL ASN1Free_MultiplexEntryDescriptor_elementList(MultiplexEntryDescriptor_elementList *val)
  8769. {
  8770. ASN1uint32_t i;
  8771. if (val) {
  8772. for (i = 0; i < (val)->count; i++) {
  8773. ASN1Free_MultiplexElement(&(val)->value[i]);
  8774. }
  8775. }
  8776. }
  8777. static int ASN1CALL ASN1Enc_EncryptionSync_escrowentry(ASN1encoding_t enc, PEncryptionSync_escrowentry *val)
  8778. {
  8779. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_EncryptionSync_escrowentry_ElmFn, 1, 256, 8);
  8780. }
  8781. static int ASN1CALL ASN1Enc_EncryptionSync_escrowentry_ElmFn(ASN1encoding_t enc, PEncryptionSync_escrowentry val)
  8782. {
  8783. if (!ASN1Enc_EscrowData(enc, &val->value))
  8784. return 0;
  8785. return 1;
  8786. }
  8787. static int ASN1CALL ASN1Dec_EncryptionSync_escrowentry(ASN1decoding_t dec, PEncryptionSync_escrowentry *val)
  8788. {
  8789. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_EncryptionSync_escrowentry_ElmFn, sizeof(**val), 1, 256, 8);
  8790. }
  8791. static int ASN1CALL ASN1Dec_EncryptionSync_escrowentry_ElmFn(ASN1decoding_t dec, PEncryptionSync_escrowentry val)
  8792. {
  8793. if (!ASN1Dec_EscrowData(dec, &val->value))
  8794. return 0;
  8795. return 1;
  8796. }
  8797. static void ASN1CALL ASN1Free_EncryptionSync_escrowentry(PEncryptionSync_escrowentry *val)
  8798. {
  8799. if (val) {
  8800. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_EncryptionSync_escrowentry_ElmFn);
  8801. }
  8802. }
  8803. static void ASN1CALL ASN1Free_EncryptionSync_escrowentry_ElmFn(PEncryptionSync_escrowentry val)
  8804. {
  8805. if (val) {
  8806. ASN1Free_EscrowData(&val->value);
  8807. }
  8808. }
  8809. static int ASN1CALL ASN1Enc_H223AL3MParameters_arqType(ASN1encoding_t enc, H223AL3MParameters_arqType *val)
  8810. {
  8811. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  8812. return 0;
  8813. switch ((val)->choice) {
  8814. case 1:
  8815. break;
  8816. case 2:
  8817. if (!ASN1Enc_H223AnnexCArqParameters(enc, &(val)->u.typeIArq))
  8818. return 0;
  8819. break;
  8820. case 3:
  8821. if (!ASN1Enc_H223AnnexCArqParameters(enc, &(val)->u.typeIIArq))
  8822. return 0;
  8823. break;
  8824. default:
  8825. /* impossible */
  8826. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  8827. return 0;
  8828. }
  8829. return 1;
  8830. }
  8831. static int ASN1CALL ASN1Dec_H223AL3MParameters_arqType(ASN1decoding_t dec, H223AL3MParameters_arqType *val)
  8832. {
  8833. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  8834. return 0;
  8835. switch ((val)->choice) {
  8836. case 1:
  8837. break;
  8838. case 2:
  8839. if (!ASN1Dec_H223AnnexCArqParameters(dec, &(val)->u.typeIArq))
  8840. return 0;
  8841. break;
  8842. case 3:
  8843. if (!ASN1Dec_H223AnnexCArqParameters(dec, &(val)->u.typeIIArq))
  8844. return 0;
  8845. break;
  8846. case 0:
  8847. /* extension case */
  8848. if (!ASN1PERDecSkipFragmented(dec, 8))
  8849. return 0;
  8850. break;
  8851. default:
  8852. /* impossible */
  8853. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  8854. return 0;
  8855. }
  8856. return 1;
  8857. }
  8858. static int ASN1CALL ASN1Enc_H223AL1MParameters_arqType(ASN1encoding_t enc, H223AL1MParameters_arqType *val)
  8859. {
  8860. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  8861. return 0;
  8862. switch ((val)->choice) {
  8863. case 1:
  8864. break;
  8865. case 2:
  8866. if (!ASN1Enc_H223AnnexCArqParameters(enc, &(val)->u.typeIArq))
  8867. return 0;
  8868. break;
  8869. case 3:
  8870. if (!ASN1Enc_H223AnnexCArqParameters(enc, &(val)->u.typeIIArq))
  8871. return 0;
  8872. break;
  8873. default:
  8874. /* impossible */
  8875. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  8876. return 0;
  8877. }
  8878. return 1;
  8879. }
  8880. static int ASN1CALL ASN1Dec_H223AL1MParameters_arqType(ASN1decoding_t dec, H223AL1MParameters_arqType *val)
  8881. {
  8882. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  8883. return 0;
  8884. switch ((val)->choice) {
  8885. case 1:
  8886. break;
  8887. case 2:
  8888. if (!ASN1Dec_H223AnnexCArqParameters(dec, &(val)->u.typeIArq))
  8889. return 0;
  8890. break;
  8891. case 3:
  8892. if (!ASN1Dec_H223AnnexCArqParameters(dec, &(val)->u.typeIIArq))
  8893. return 0;
  8894. break;
  8895. case 0:
  8896. /* extension case */
  8897. if (!ASN1PERDecSkipFragmented(dec, 8))
  8898. return 0;
  8899. break;
  8900. default:
  8901. /* impossible */
  8902. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  8903. return 0;
  8904. }
  8905. return 1;
  8906. }
  8907. static int ASN1CALL ASN1Enc_H263VideoModeCombos_h263VideoCoupledModes(ASN1encoding_t enc, H263VideoModeCombos_h263VideoCoupledModes *val)
  8908. {
  8909. ASN1uint32_t i;
  8910. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  8911. return 0;
  8912. for (i = 0; i < (val)->count; i++) {
  8913. if (!ASN1Enc_H263ModeComboFlags(enc, &((val)->value)[i]))
  8914. return 0;
  8915. }
  8916. return 1;
  8917. }
  8918. static int ASN1CALL ASN1Dec_H263VideoModeCombos_h263VideoCoupledModes(ASN1decoding_t dec, H263VideoModeCombos_h263VideoCoupledModes *val)
  8919. {
  8920. ASN1uint32_t i;
  8921. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  8922. return 0;
  8923. (val)->count += 1;
  8924. for (i = 0; i < (val)->count; i++) {
  8925. if (!ASN1Dec_H263ModeComboFlags(dec, &((val)->value)[i]))
  8926. return 0;
  8927. }
  8928. return 1;
  8929. }
  8930. static void ASN1CALL ASN1Free_H263VideoModeCombos_h263VideoCoupledModes(H263VideoModeCombos_h263VideoCoupledModes *val)
  8931. {
  8932. if (val) {
  8933. }
  8934. }
  8935. static int ASN1CALL ASN1Enc_H263Options_customPictureFormat(ASN1encoding_t enc, PH263Options_customPictureFormat *val)
  8936. {
  8937. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_H263Options_customPictureFormat_ElmFn, 1, 16, 4);
  8938. }
  8939. static int ASN1CALL ASN1Enc_H263Options_customPictureFormat_ElmFn(ASN1encoding_t enc, PH263Options_customPictureFormat val)
  8940. {
  8941. if (!ASN1Enc_CustomPictureFormat(enc, &val->value))
  8942. return 0;
  8943. return 1;
  8944. }
  8945. static int ASN1CALL ASN1Dec_H263Options_customPictureFormat(ASN1decoding_t dec, PH263Options_customPictureFormat *val)
  8946. {
  8947. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_H263Options_customPictureFormat_ElmFn, sizeof(**val), 1, 16, 4);
  8948. }
  8949. static int ASN1CALL ASN1Dec_H263Options_customPictureFormat_ElmFn(ASN1decoding_t dec, PH263Options_customPictureFormat val)
  8950. {
  8951. if (!ASN1Dec_CustomPictureFormat(dec, &val->value))
  8952. return 0;
  8953. return 1;
  8954. }
  8955. static void ASN1CALL ASN1Free_H263Options_customPictureFormat(PH263Options_customPictureFormat *val)
  8956. {
  8957. if (val) {
  8958. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_H263Options_customPictureFormat_ElmFn);
  8959. }
  8960. }
  8961. static void ASN1CALL ASN1Free_H263Options_customPictureFormat_ElmFn(PH263Options_customPictureFormat val)
  8962. {
  8963. if (val) {
  8964. ASN1Free_CustomPictureFormat(&val->value);
  8965. }
  8966. }
  8967. static int ASN1CALL ASN1Enc_H263Options_customPictureClockFrequency(ASN1encoding_t enc, PH263Options_customPictureClockFrequency *val)
  8968. {
  8969. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_H263Options_customPictureClockFrequency_ElmFn, 1, 16, 4);
  8970. }
  8971. static int ASN1CALL ASN1Enc_H263Options_customPictureClockFrequency_ElmFn(ASN1encoding_t enc, PH263Options_customPictureClockFrequency val)
  8972. {
  8973. if (!ASN1Enc_CustomPictureClockFrequency(enc, &val->value))
  8974. return 0;
  8975. return 1;
  8976. }
  8977. static int ASN1CALL ASN1Dec_H263Options_customPictureClockFrequency(ASN1decoding_t dec, PH263Options_customPictureClockFrequency *val)
  8978. {
  8979. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_H263Options_customPictureClockFrequency_ElmFn, sizeof(**val), 1, 16, 4);
  8980. }
  8981. static int ASN1CALL ASN1Dec_H263Options_customPictureClockFrequency_ElmFn(ASN1decoding_t dec, PH263Options_customPictureClockFrequency val)
  8982. {
  8983. if (!ASN1Dec_CustomPictureClockFrequency(dec, &val->value))
  8984. return 0;
  8985. return 1;
  8986. }
  8987. static void ASN1CALL ASN1Free_H263Options_customPictureClockFrequency(PH263Options_customPictureClockFrequency *val)
  8988. {
  8989. if (val) {
  8990. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_H263Options_customPictureClockFrequency_ElmFn);
  8991. }
  8992. }
  8993. static void ASN1CALL ASN1Free_H263Options_customPictureClockFrequency_ElmFn(PH263Options_customPictureClockFrequency val)
  8994. {
  8995. if (val) {
  8996. }
  8997. }
  8998. static int ASN1CALL ASN1Enc_MultipointCapability_mediaDistributionCapability(ASN1encoding_t enc, PMultipointCapability_mediaDistributionCapability *val)
  8999. {
  9000. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_MultipointCapability_mediaDistributionCapability_ElmFn);
  9001. }
  9002. static int ASN1CALL ASN1Enc_MultipointCapability_mediaDistributionCapability_ElmFn(ASN1encoding_t enc, PMultipointCapability_mediaDistributionCapability val)
  9003. {
  9004. if (!ASN1Enc_MediaDistributionCapability(enc, &val->value))
  9005. return 0;
  9006. return 1;
  9007. }
  9008. static int ASN1CALL ASN1Dec_MultipointCapability_mediaDistributionCapability(ASN1decoding_t dec, PMultipointCapability_mediaDistributionCapability *val)
  9009. {
  9010. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_MultipointCapability_mediaDistributionCapability_ElmFn, sizeof(**val));
  9011. }
  9012. static int ASN1CALL ASN1Dec_MultipointCapability_mediaDistributionCapability_ElmFn(ASN1decoding_t dec, PMultipointCapability_mediaDistributionCapability val)
  9013. {
  9014. if (!ASN1Dec_MediaDistributionCapability(dec, &val->value))
  9015. return 0;
  9016. return 1;
  9017. }
  9018. static void ASN1CALL ASN1Free_MultipointCapability_mediaDistributionCapability(PMultipointCapability_mediaDistributionCapability *val)
  9019. {
  9020. if (val) {
  9021. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_MultipointCapability_mediaDistributionCapability_ElmFn);
  9022. }
  9023. }
  9024. static void ASN1CALL ASN1Free_MultipointCapability_mediaDistributionCapability_ElmFn(PMultipointCapability_mediaDistributionCapability val)
  9025. {
  9026. if (val) {
  9027. ASN1Free_MediaDistributionCapability(&val->value);
  9028. }
  9029. }
  9030. static int ASN1CALL ASN1Enc_TransportCapability_mediaChannelCapabilities(ASN1encoding_t enc, TransportCapability_mediaChannelCapabilities *val)
  9031. {
  9032. ASN1uint32_t i;
  9033. ASN1PEREncAlignment(enc);
  9034. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  9035. return 0;
  9036. for (i = 0; i < (val)->count; i++) {
  9037. if (!ASN1Enc_MediaChannelCapability(enc, &((val)->value)[i]))
  9038. return 0;
  9039. }
  9040. return 1;
  9041. }
  9042. static int ASN1CALL ASN1Dec_TransportCapability_mediaChannelCapabilities(ASN1decoding_t dec, TransportCapability_mediaChannelCapabilities *val)
  9043. {
  9044. ASN1uint32_t i;
  9045. ASN1PERDecAlignment(dec);
  9046. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  9047. return 0;
  9048. (val)->count += 1;
  9049. for (i = 0; i < (val)->count; i++) {
  9050. if (!ASN1Dec_MediaChannelCapability(dec, &((val)->value)[i]))
  9051. return 0;
  9052. }
  9053. return 1;
  9054. }
  9055. static void ASN1CALL ASN1Free_TransportCapability_mediaChannelCapabilities(TransportCapability_mediaChannelCapabilities *val)
  9056. {
  9057. if (val) {
  9058. }
  9059. }
  9060. static int ASN1CALL ASN1Enc_H222Capability_vcCapability(ASN1encoding_t enc, PH222Capability_vcCapability *val)
  9061. {
  9062. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_H222Capability_vcCapability_ElmFn);
  9063. }
  9064. static int ASN1CALL ASN1Enc_H222Capability_vcCapability_ElmFn(ASN1encoding_t enc, PH222Capability_vcCapability val)
  9065. {
  9066. if (!ASN1Enc_VCCapability(enc, &val->value))
  9067. return 0;
  9068. return 1;
  9069. }
  9070. static int ASN1CALL ASN1Dec_H222Capability_vcCapability(ASN1decoding_t dec, PH222Capability_vcCapability *val)
  9071. {
  9072. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_H222Capability_vcCapability_ElmFn, sizeof(**val));
  9073. }
  9074. static int ASN1CALL ASN1Dec_H222Capability_vcCapability_ElmFn(ASN1decoding_t dec, PH222Capability_vcCapability val)
  9075. {
  9076. if (!ASN1Dec_VCCapability(dec, &val->value))
  9077. return 0;
  9078. return 1;
  9079. }
  9080. static void ASN1CALL ASN1Free_H222Capability_vcCapability(PH222Capability_vcCapability *val)
  9081. {
  9082. if (val) {
  9083. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_H222Capability_vcCapability_ElmFn);
  9084. }
  9085. }
  9086. static void ASN1CALL ASN1Free_H222Capability_vcCapability_ElmFn(PH222Capability_vcCapability val)
  9087. {
  9088. if (val) {
  9089. }
  9090. }
  9091. static int ASN1CALL ASN1Enc_CapabilityDescriptor_simultaneousCapabilities(ASN1encoding_t enc, PCapabilityDescriptor_simultaneousCapabilities *val)
  9092. {
  9093. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CapabilityDescriptor_simultaneousCapabilities_ElmFn, 1, 256, 8);
  9094. }
  9095. static int ASN1CALL ASN1Enc_CapabilityDescriptor_simultaneousCapabilities_ElmFn(ASN1encoding_t enc, PCapabilityDescriptor_simultaneousCapabilities val)
  9096. {
  9097. if (!ASN1Enc_AlternativeCapabilitySet(enc, &val->value))
  9098. return 0;
  9099. return 1;
  9100. }
  9101. static int ASN1CALL ASN1Dec_CapabilityDescriptor_simultaneousCapabilities(ASN1decoding_t dec, PCapabilityDescriptor_simultaneousCapabilities *val)
  9102. {
  9103. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CapabilityDescriptor_simultaneousCapabilities_ElmFn, sizeof(**val), 1, 256, 8);
  9104. }
  9105. static int ASN1CALL ASN1Dec_CapabilityDescriptor_simultaneousCapabilities_ElmFn(ASN1decoding_t dec, PCapabilityDescriptor_simultaneousCapabilities val)
  9106. {
  9107. if (!ASN1Dec_AlternativeCapabilitySet(dec, &val->value))
  9108. return 0;
  9109. return 1;
  9110. }
  9111. static void ASN1CALL ASN1Free_CapabilityDescriptor_simultaneousCapabilities(PCapabilityDescriptor_simultaneousCapabilities *val)
  9112. {
  9113. if (val) {
  9114. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CapabilityDescriptor_simultaneousCapabilities_ElmFn);
  9115. }
  9116. }
  9117. static void ASN1CALL ASN1Free_CapabilityDescriptor_simultaneousCapabilities_ElmFn(PCapabilityDescriptor_simultaneousCapabilities val)
  9118. {
  9119. if (val) {
  9120. ASN1Free_AlternativeCapabilitySet(&val->value);
  9121. }
  9122. }
  9123. static int ASN1CALL ASN1Enc_TerminalCapabilitySet_capabilityDescriptors(ASN1encoding_t enc, TerminalCapabilitySet_capabilityDescriptors *val)
  9124. {
  9125. ASN1uint32_t i;
  9126. ASN1PEREncAlignment(enc);
  9127. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  9128. return 0;
  9129. for (i = 0; i < (val)->count; i++) {
  9130. if (!ASN1Enc_CapabilityDescriptor(enc, &((val)->value)[i]))
  9131. return 0;
  9132. }
  9133. return 1;
  9134. }
  9135. static int ASN1CALL ASN1Dec_TerminalCapabilitySet_capabilityDescriptors(ASN1decoding_t dec, TerminalCapabilitySet_capabilityDescriptors *val)
  9136. {
  9137. ASN1uint32_t i;
  9138. ASN1PERDecAlignment(dec);
  9139. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  9140. return 0;
  9141. (val)->count += 1;
  9142. for (i = 0; i < (val)->count; i++) {
  9143. if (!ASN1Dec_CapabilityDescriptor(dec, &((val)->value)[i]))
  9144. return 0;
  9145. }
  9146. return 1;
  9147. }
  9148. static void ASN1CALL ASN1Free_TerminalCapabilitySet_capabilityDescriptors(TerminalCapabilitySet_capabilityDescriptors *val)
  9149. {
  9150. ASN1uint32_t i;
  9151. if (val) {
  9152. for (i = 0; i < (val)->count; i++) {
  9153. ASN1Free_CapabilityDescriptor(&(val)->value[i]);
  9154. }
  9155. }
  9156. }
  9157. static int ASN1CALL ASN1Enc_NonStandardParameter(ASN1encoding_t enc, NonStandardParameter *val)
  9158. {
  9159. if (!ASN1Enc_NonStandardIdentifier(enc, &(val)->nonStandardIdentifier))
  9160. return 0;
  9161. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->data))
  9162. return 0;
  9163. return 1;
  9164. }
  9165. static int ASN1CALL ASN1Dec_NonStandardParameter(ASN1decoding_t dec, NonStandardParameter *val)
  9166. {
  9167. if (!ASN1Dec_NonStandardIdentifier(dec, &(val)->nonStandardIdentifier))
  9168. return 0;
  9169. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->data))
  9170. return 0;
  9171. return 1;
  9172. }
  9173. static void ASN1CALL ASN1Free_NonStandardParameter(NonStandardParameter *val)
  9174. {
  9175. if (val) {
  9176. ASN1Free_NonStandardIdentifier(&(val)->nonStandardIdentifier);
  9177. ASN1octetstring_free(&(val)->data);
  9178. }
  9179. }
  9180. static int ASN1CALL ASN1Enc_H223Capability(ASN1encoding_t enc, H223Capability *val)
  9181. {
  9182. ASN1octet_t o[1];
  9183. ASN1uint32_t y;
  9184. ASN1encoding_t ee;
  9185. CopyMemory(o, (val)->o, 1);
  9186. o[0] |= 0x80;
  9187. o[0] |= 0x40;
  9188. y = ASN1PEREncCheckExtensions(4, (val)->o + 0);
  9189. if (!ASN1PEREncBitVal(enc, 1, y))
  9190. return 0;
  9191. if (!ASN1PEREncBoolean(enc, (val)->transportWithI_frames))
  9192. return 0;
  9193. if (!ASN1PEREncBoolean(enc, (val)->videoWithAL1))
  9194. return 0;
  9195. if (!ASN1PEREncBoolean(enc, (val)->videoWithAL2))
  9196. return 0;
  9197. if (!ASN1PEREncBoolean(enc, (val)->videoWithAL3))
  9198. return 0;
  9199. if (!ASN1PEREncBoolean(enc, (val)->audioWithAL1))
  9200. return 0;
  9201. if (!ASN1PEREncBoolean(enc, (val)->audioWithAL2))
  9202. return 0;
  9203. if (!ASN1PEREncBoolean(enc, (val)->audioWithAL3))
  9204. return 0;
  9205. if (!ASN1PEREncBoolean(enc, (val)->dataWithAL1))
  9206. return 0;
  9207. if (!ASN1PEREncBoolean(enc, (val)->dataWithAL2))
  9208. return 0;
  9209. if (!ASN1PEREncBoolean(enc, (val)->dataWithAL3))
  9210. return 0;
  9211. if (!ASN1PEREncUnsignedShort(enc, (val)->maximumAl2SDUSize))
  9212. return 0;
  9213. if (!ASN1PEREncUnsignedShort(enc, (val)->maximumAl3SDUSize))
  9214. return 0;
  9215. if (!ASN1PEREncUnsignedShort(enc, (val)->maximumDelayJitter))
  9216. return 0;
  9217. if (!ASN1Enc_H223Capability_h223MultiplexTableCapability(enc, &(val)->h223MultiplexTableCapability))
  9218. return 0;
  9219. if (y) {
  9220. if (!ASN1PEREncNormallySmallBits(enc, 4, o + 0))
  9221. return 0;
  9222. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  9223. return 0;
  9224. if (o[0] & 0x80) {
  9225. if (!ASN1PEREncBoolean(ee, (val)->maxMUXPDUSizeCapability))
  9226. return 0;
  9227. if (!ASN1PEREncFlushFragmentedToParent(ee))
  9228. return 0;
  9229. }
  9230. if (o[0] & 0x40) {
  9231. if (!ASN1PEREncBoolean(ee, (val)->nsrpSupport))
  9232. return 0;
  9233. if (!ASN1PEREncFlushFragmentedToParent(ee))
  9234. return 0;
  9235. }
  9236. if (o[0] & 0x20) {
  9237. if (!ASN1Enc_H223Capability_mobileOperationTransmitCapability(ee, &(val)->mobileOperationTransmitCapability))
  9238. return 0;
  9239. if (!ASN1PEREncFlushFragmentedToParent(ee))
  9240. return 0;
  9241. }
  9242. if (o[0] & 0x10) {
  9243. if (!ASN1Enc_H223AnnexCCapability(ee, &(val)->h223AnnexCCapability))
  9244. return 0;
  9245. if (!ASN1PEREncFlushFragmentedToParent(ee))
  9246. return 0;
  9247. }
  9248. ASN1_CloseEncoder2(ee);
  9249. }
  9250. return 1;
  9251. }
  9252. static int ASN1CALL ASN1Dec_H223Capability(ASN1decoding_t dec, H223Capability *val)
  9253. {
  9254. ASN1uint32_t y;
  9255. ASN1decoding_t dd;
  9256. ASN1octet_t *db;
  9257. ASN1uint32_t ds;
  9258. ASN1uint32_t i;
  9259. ASN1uint32_t e;
  9260. if (!ASN1PERDecExtensionBit(dec, &y))
  9261. return 0;
  9262. if (!ASN1PERDecBoolean(dec, &(val)->transportWithI_frames))
  9263. return 0;
  9264. if (!ASN1PERDecBoolean(dec, &(val)->videoWithAL1))
  9265. return 0;
  9266. if (!ASN1PERDecBoolean(dec, &(val)->videoWithAL2))
  9267. return 0;
  9268. if (!ASN1PERDecBoolean(dec, &(val)->videoWithAL3))
  9269. return 0;
  9270. if (!ASN1PERDecBoolean(dec, &(val)->audioWithAL1))
  9271. return 0;
  9272. if (!ASN1PERDecBoolean(dec, &(val)->audioWithAL2))
  9273. return 0;
  9274. if (!ASN1PERDecBoolean(dec, &(val)->audioWithAL3))
  9275. return 0;
  9276. if (!ASN1PERDecBoolean(dec, &(val)->dataWithAL1))
  9277. return 0;
  9278. if (!ASN1PERDecBoolean(dec, &(val)->dataWithAL2))
  9279. return 0;
  9280. if (!ASN1PERDecBoolean(dec, &(val)->dataWithAL3))
  9281. return 0;
  9282. if (!ASN1PERDecUnsignedShort(dec, &(val)->maximumAl2SDUSize))
  9283. return 0;
  9284. if (!ASN1PERDecUnsignedShort(dec, &(val)->maximumAl3SDUSize))
  9285. return 0;
  9286. if (!ASN1PERDecUnsignedShort(dec, &(val)->maximumDelayJitter))
  9287. return 0;
  9288. if (!ASN1Dec_H223Capability_h223MultiplexTableCapability(dec, &(val)->h223MultiplexTableCapability))
  9289. return 0;
  9290. if (!y) {
  9291. ZeroMemory((val)->o + 0, 1);
  9292. } else {
  9293. if (!ASN1PERDecNormallySmallExtension(dec, &e, 4, (val)->o + 0))
  9294. return 0;
  9295. if ((val)->o[0] & 0x80) {
  9296. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  9297. return 0;
  9298. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  9299. return 0;
  9300. if (!ASN1PERDecBoolean(dd, &(val)->maxMUXPDUSizeCapability))
  9301. return 0;
  9302. ASN1_CloseDecoder(dd);
  9303. ASN1Free(db);
  9304. }
  9305. if ((val)->o[0] & 0x40) {
  9306. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  9307. return 0;
  9308. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  9309. return 0;
  9310. if (!ASN1PERDecBoolean(dd, &(val)->nsrpSupport))
  9311. return 0;
  9312. ASN1_CloseDecoder(dd);
  9313. ASN1Free(db);
  9314. }
  9315. if ((val)->o[0] & 0x20) {
  9316. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  9317. return 0;
  9318. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  9319. return 0;
  9320. if (!ASN1Dec_H223Capability_mobileOperationTransmitCapability(dd, &(val)->mobileOperationTransmitCapability))
  9321. return 0;
  9322. ASN1_CloseDecoder(dd);
  9323. ASN1Free(db);
  9324. }
  9325. if ((val)->o[0] & 0x10) {
  9326. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  9327. return 0;
  9328. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  9329. return 0;
  9330. if (!ASN1Dec_H223AnnexCCapability(dd, &(val)->h223AnnexCCapability))
  9331. return 0;
  9332. ASN1_CloseDecoder(dd);
  9333. ASN1Free(db);
  9334. }
  9335. for (i = 0; i < e; i++) {
  9336. if (!ASN1PERDecSkipFragmented(dec, 8))
  9337. return 0;
  9338. }
  9339. }
  9340. return 1;
  9341. }
  9342. static int ASN1CALL ASN1Enc_V76Capability(ASN1encoding_t enc, V76Capability *val)
  9343. {
  9344. if (!ASN1PEREncExtensionBitClear(enc))
  9345. return 0;
  9346. if (!ASN1PEREncBoolean(enc, (val)->suspendResumeCapabilitywAddress))
  9347. return 0;
  9348. if (!ASN1PEREncBoolean(enc, (val)->suspendResumeCapabilitywoAddress))
  9349. return 0;
  9350. if (!ASN1PEREncBoolean(enc, (val)->rejCapability))
  9351. return 0;
  9352. if (!ASN1PEREncBoolean(enc, (val)->sREJCapability))
  9353. return 0;
  9354. if (!ASN1PEREncBoolean(enc, (val)->mREJCapability))
  9355. return 0;
  9356. if (!ASN1PEREncBoolean(enc, (val)->crc8bitCapability))
  9357. return 0;
  9358. if (!ASN1PEREncBoolean(enc, (val)->crc16bitCapability))
  9359. return 0;
  9360. if (!ASN1PEREncBoolean(enc, (val)->crc32bitCapability))
  9361. return 0;
  9362. if (!ASN1PEREncBoolean(enc, (val)->uihCapability))
  9363. return 0;
  9364. if (!ASN1PEREncUnsignedShort(enc, (val)->numOfDLCS - 2))
  9365. return 0;
  9366. if (!ASN1PEREncBoolean(enc, (val)->twoOctetAddressFieldCapability))
  9367. return 0;
  9368. if (!ASN1PEREncBoolean(enc, (val)->loopBackTestCapability))
  9369. return 0;
  9370. if (!ASN1PEREncUnsignedShort(enc, (val)->n401Capability - 1))
  9371. return 0;
  9372. if (!ASN1PEREncBitVal(enc, 7, (val)->maxWindowSizeCapability - 1))
  9373. return 0;
  9374. if (!ASN1Enc_V75Capability(enc, &(val)->v75Capability))
  9375. return 0;
  9376. return 1;
  9377. }
  9378. static int ASN1CALL ASN1Dec_V76Capability(ASN1decoding_t dec, V76Capability *val)
  9379. {
  9380. ASN1uint32_t y;
  9381. if (!ASN1PERDecExtensionBit(dec, &y))
  9382. return 0;
  9383. if (!ASN1PERDecBoolean(dec, &(val)->suspendResumeCapabilitywAddress))
  9384. return 0;
  9385. if (!ASN1PERDecBoolean(dec, &(val)->suspendResumeCapabilitywoAddress))
  9386. return 0;
  9387. if (!ASN1PERDecBoolean(dec, &(val)->rejCapability))
  9388. return 0;
  9389. if (!ASN1PERDecBoolean(dec, &(val)->sREJCapability))
  9390. return 0;
  9391. if (!ASN1PERDecBoolean(dec, &(val)->mREJCapability))
  9392. return 0;
  9393. if (!ASN1PERDecBoolean(dec, &(val)->crc8bitCapability))
  9394. return 0;
  9395. if (!ASN1PERDecBoolean(dec, &(val)->crc16bitCapability))
  9396. return 0;
  9397. if (!ASN1PERDecBoolean(dec, &(val)->crc32bitCapability))
  9398. return 0;
  9399. if (!ASN1PERDecBoolean(dec, &(val)->uihCapability))
  9400. return 0;
  9401. if (!ASN1PERDecUnsignedShort(dec, &(val)->numOfDLCS))
  9402. return 0;
  9403. (val)->numOfDLCS += 2;
  9404. if (!ASN1PERDecBoolean(dec, &(val)->twoOctetAddressFieldCapability))
  9405. return 0;
  9406. if (!ASN1PERDecBoolean(dec, &(val)->loopBackTestCapability))
  9407. return 0;
  9408. if (!ASN1PERDecUnsignedShort(dec, &(val)->n401Capability))
  9409. return 0;
  9410. (val)->n401Capability += 1;
  9411. if (!ASN1PERDecU16Val(dec, 7, &(val)->maxWindowSizeCapability))
  9412. return 0;
  9413. (val)->maxWindowSizeCapability += 1;
  9414. if (!ASN1Dec_V75Capability(dec, &(val)->v75Capability))
  9415. return 0;
  9416. if (y) {
  9417. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  9418. return 0;
  9419. }
  9420. return 1;
  9421. }
  9422. static int ASN1CALL ASN1Enc_RSVPParameters(ASN1encoding_t enc, RSVPParameters *val)
  9423. {
  9424. ASN1uint32_t l;
  9425. if (!ASN1PEREncExtensionBitClear(enc))
  9426. return 0;
  9427. if (!ASN1PEREncBits(enc, 6, (val)->o))
  9428. return 0;
  9429. if ((val)->o[0] & 0x80) {
  9430. if (!ASN1Enc_QOSMode(enc, &(val)->qosMode))
  9431. return 0;
  9432. }
  9433. if ((val)->o[0] & 0x40) {
  9434. l = ASN1uint32_uoctets((val)->tokenRate - 1);
  9435. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  9436. return 0;
  9437. ASN1PEREncAlignment(enc);
  9438. if (!ASN1PEREncBitVal(enc, l * 8, (val)->tokenRate - 1))
  9439. return 0;
  9440. }
  9441. if ((val)->o[0] & 0x20) {
  9442. l = ASN1uint32_uoctets((val)->bucketSize - 1);
  9443. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  9444. return 0;
  9445. ASN1PEREncAlignment(enc);
  9446. if (!ASN1PEREncBitVal(enc, l * 8, (val)->bucketSize - 1))
  9447. return 0;
  9448. }
  9449. if ((val)->o[0] & 0x10) {
  9450. l = ASN1uint32_uoctets((val)->peakRate - 1);
  9451. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  9452. return 0;
  9453. ASN1PEREncAlignment(enc);
  9454. if (!ASN1PEREncBitVal(enc, l * 8, (val)->peakRate - 1))
  9455. return 0;
  9456. }
  9457. if ((val)->o[0] & 0x8) {
  9458. l = ASN1uint32_uoctets((val)->minPoliced - 1);
  9459. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  9460. return 0;
  9461. ASN1PEREncAlignment(enc);
  9462. if (!ASN1PEREncBitVal(enc, l * 8, (val)->minPoliced - 1))
  9463. return 0;
  9464. }
  9465. if ((val)->o[0] & 0x4) {
  9466. l = ASN1uint32_uoctets((val)->maxPktSize - 1);
  9467. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  9468. return 0;
  9469. ASN1PEREncAlignment(enc);
  9470. if (!ASN1PEREncBitVal(enc, l * 8, (val)->maxPktSize - 1))
  9471. return 0;
  9472. }
  9473. return 1;
  9474. }
  9475. static int ASN1CALL ASN1Dec_RSVPParameters(ASN1decoding_t dec, RSVPParameters *val)
  9476. {
  9477. ASN1uint32_t y;
  9478. ASN1uint32_t l;
  9479. if (!ASN1PERDecExtensionBit(dec, &y))
  9480. return 0;
  9481. if (!ASN1PERDecExtension(dec, 6, (val)->o))
  9482. return 0;
  9483. if ((val)->o[0] & 0x80) {
  9484. if (!ASN1Dec_QOSMode(dec, &(val)->qosMode))
  9485. return 0;
  9486. }
  9487. if ((val)->o[0] & 0x40) {
  9488. if (!ASN1PERDecU32Val(dec, 2, &l))
  9489. return 0;
  9490. l += 1;
  9491. ASN1PERDecAlignment(dec);
  9492. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->tokenRate))
  9493. return 0;
  9494. (val)->tokenRate += 1;
  9495. }
  9496. if ((val)->o[0] & 0x20) {
  9497. if (!ASN1PERDecU32Val(dec, 2, &l))
  9498. return 0;
  9499. l += 1;
  9500. ASN1PERDecAlignment(dec);
  9501. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->bucketSize))
  9502. return 0;
  9503. (val)->bucketSize += 1;
  9504. }
  9505. if ((val)->o[0] & 0x10) {
  9506. if (!ASN1PERDecU32Val(dec, 2, &l))
  9507. return 0;
  9508. l += 1;
  9509. ASN1PERDecAlignment(dec);
  9510. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->peakRate))
  9511. return 0;
  9512. (val)->peakRate += 1;
  9513. }
  9514. if ((val)->o[0] & 0x8) {
  9515. if (!ASN1PERDecU32Val(dec, 2, &l))
  9516. return 0;
  9517. l += 1;
  9518. ASN1PERDecAlignment(dec);
  9519. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->minPoliced))
  9520. return 0;
  9521. (val)->minPoliced += 1;
  9522. }
  9523. if ((val)->o[0] & 0x4) {
  9524. if (!ASN1PERDecU32Val(dec, 2, &l))
  9525. return 0;
  9526. l += 1;
  9527. ASN1PERDecAlignment(dec);
  9528. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->maxPktSize))
  9529. return 0;
  9530. (val)->maxPktSize += 1;
  9531. }
  9532. if (y) {
  9533. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  9534. return 0;
  9535. }
  9536. return 1;
  9537. }
  9538. static int ASN1CALL ASN1Enc_QOSCapability(ASN1encoding_t enc, QOSCapability *val)
  9539. {
  9540. if (!ASN1PEREncExtensionBitClear(enc))
  9541. return 0;
  9542. if (!ASN1PEREncBits(enc, 3, (val)->o))
  9543. return 0;
  9544. if ((val)->o[0] & 0x80) {
  9545. if (!ASN1Enc_NonStandardParameter(enc, &(val)->nonStandardData))
  9546. return 0;
  9547. }
  9548. if ((val)->o[0] & 0x40) {
  9549. if (!ASN1Enc_RSVPParameters(enc, &(val)->rsvpParameters))
  9550. return 0;
  9551. }
  9552. if ((val)->o[0] & 0x20) {
  9553. if (!ASN1Enc_ATMParameters(enc, &(val)->atmParameters))
  9554. return 0;
  9555. }
  9556. return 1;
  9557. }
  9558. static int ASN1CALL ASN1Dec_QOSCapability(ASN1decoding_t dec, QOSCapability *val)
  9559. {
  9560. ASN1uint32_t y;
  9561. if (!ASN1PERDecExtensionBit(dec, &y))
  9562. return 0;
  9563. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  9564. return 0;
  9565. if ((val)->o[0] & 0x80) {
  9566. if (!ASN1Dec_NonStandardParameter(dec, &(val)->nonStandardData))
  9567. return 0;
  9568. }
  9569. if ((val)->o[0] & 0x40) {
  9570. if (!ASN1Dec_RSVPParameters(dec, &(val)->rsvpParameters))
  9571. return 0;
  9572. }
  9573. if ((val)->o[0] & 0x20) {
  9574. if (!ASN1Dec_ATMParameters(dec, &(val)->atmParameters))
  9575. return 0;
  9576. }
  9577. if (y) {
  9578. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  9579. return 0;
  9580. }
  9581. return 1;
  9582. }
  9583. static void ASN1CALL ASN1Free_QOSCapability(QOSCapability *val)
  9584. {
  9585. if (val) {
  9586. if ((val)->o[0] & 0x80) {
  9587. ASN1Free_NonStandardParameter(&(val)->nonStandardData);
  9588. }
  9589. }
  9590. }
  9591. static int ASN1CALL ASN1Enc_TransportCapability(ASN1encoding_t enc, TransportCapability *val)
  9592. {
  9593. if (!ASN1PEREncExtensionBitClear(enc))
  9594. return 0;
  9595. if (!ASN1PEREncBits(enc, 3, (val)->o))
  9596. return 0;
  9597. if ((val)->o[0] & 0x80) {
  9598. if (!ASN1Enc_NonStandardParameter(enc, &(val)->nonStandard))
  9599. return 0;
  9600. }
  9601. if ((val)->o[0] & 0x40) {
  9602. if (!ASN1Enc_TransportCapability_qOSCapabilities(enc, &(val)->qOSCapabilities))
  9603. return 0;
  9604. }
  9605. if ((val)->o[0] & 0x20) {
  9606. if (!ASN1Enc_TransportCapability_mediaChannelCapabilities(enc, &(val)->mediaChannelCapabilities))
  9607. return 0;
  9608. }
  9609. return 1;
  9610. }
  9611. static int ASN1CALL ASN1Dec_TransportCapability(ASN1decoding_t dec, TransportCapability *val)
  9612. {
  9613. ASN1uint32_t y;
  9614. if (!ASN1PERDecExtensionBit(dec, &y))
  9615. return 0;
  9616. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  9617. return 0;
  9618. if ((val)->o[0] & 0x80) {
  9619. if (!ASN1Dec_NonStandardParameter(dec, &(val)->nonStandard))
  9620. return 0;
  9621. }
  9622. if ((val)->o[0] & 0x40) {
  9623. if (!ASN1Dec_TransportCapability_qOSCapabilities(dec, &(val)->qOSCapabilities))
  9624. return 0;
  9625. }
  9626. if ((val)->o[0] & 0x20) {
  9627. if (!ASN1Dec_TransportCapability_mediaChannelCapabilities(dec, &(val)->mediaChannelCapabilities))
  9628. return 0;
  9629. }
  9630. if (y) {
  9631. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  9632. return 0;
  9633. }
  9634. return 1;
  9635. }
  9636. static void ASN1CALL ASN1Free_TransportCapability(TransportCapability *val)
  9637. {
  9638. if (val) {
  9639. if ((val)->o[0] & 0x80) {
  9640. ASN1Free_NonStandardParameter(&(val)->nonStandard);
  9641. }
  9642. if ((val)->o[0] & 0x40) {
  9643. ASN1Free_TransportCapability_qOSCapabilities(&(val)->qOSCapabilities);
  9644. }
  9645. if ((val)->o[0] & 0x20) {
  9646. ASN1Free_TransportCapability_mediaChannelCapabilities(&(val)->mediaChannelCapabilities);
  9647. }
  9648. }
  9649. }
  9650. static int ASN1CALL ASN1Enc_RedundancyEncodingMethod(ASN1encoding_t enc, RedundancyEncodingMethod *val)
  9651. {
  9652. ASN1encoding_t ee;
  9653. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 1, 2))
  9654. return 0;
  9655. switch ((val)->choice) {
  9656. case 1:
  9657. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  9658. return 0;
  9659. break;
  9660. case 2:
  9661. break;
  9662. case 3:
  9663. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  9664. return 0;
  9665. if (!ASN1Enc_RTPH263VideoRedundancyEncoding(ee, &(val)->u.rtpH263VideoRedundancyEncoding))
  9666. return 0;
  9667. if (!ASN1PEREncFlushFragmentedToParent(ee))
  9668. return 0;
  9669. ASN1_CloseEncoder2(ee);
  9670. break;
  9671. default:
  9672. /* impossible */
  9673. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  9674. return 0;
  9675. }
  9676. return 1;
  9677. }
  9678. static int ASN1CALL ASN1Dec_RedundancyEncodingMethod(ASN1decoding_t dec, RedundancyEncodingMethod *val)
  9679. {
  9680. ASN1decoding_t dd;
  9681. ASN1octet_t *db;
  9682. ASN1uint32_t ds;
  9683. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 1, 2))
  9684. return 0;
  9685. switch ((val)->choice) {
  9686. case 1:
  9687. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  9688. return 0;
  9689. break;
  9690. case 2:
  9691. break;
  9692. case 3:
  9693. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  9694. return 0;
  9695. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  9696. return 0;
  9697. if (!ASN1Dec_RTPH263VideoRedundancyEncoding(dd, &(val)->u.rtpH263VideoRedundancyEncoding))
  9698. return 0;
  9699. ASN1_CloseDecoder(dd);
  9700. ASN1Free(db);
  9701. break;
  9702. case 0:
  9703. /* extension case */
  9704. if (!ASN1PERDecSkipFragmented(dec, 8))
  9705. return 0;
  9706. break;
  9707. default:
  9708. /* impossible */
  9709. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  9710. return 0;
  9711. }
  9712. return 1;
  9713. }
  9714. static void ASN1CALL ASN1Free_RedundancyEncodingMethod(RedundancyEncodingMethod *val)
  9715. {
  9716. if (val) {
  9717. switch ((val)->choice) {
  9718. case 1:
  9719. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  9720. break;
  9721. case 3:
  9722. ASN1Free_RTPH263VideoRedundancyEncoding(&(val)->u.rtpH263VideoRedundancyEncoding);
  9723. break;
  9724. }
  9725. }
  9726. }
  9727. static int ASN1CALL ASN1Enc_H263Options(ASN1encoding_t enc, H263Options *val)
  9728. {
  9729. if (!ASN1PEREncExtensionBitClear(enc))
  9730. return 0;
  9731. if (!ASN1PEREncBits(enc, 5, (val)->o))
  9732. return 0;
  9733. if (!ASN1PEREncBoolean(enc, (val)->advancedIntraCodingMode))
  9734. return 0;
  9735. if (!ASN1PEREncBoolean(enc, (val)->deblockingFilterMode))
  9736. return 0;
  9737. if (!ASN1PEREncBoolean(enc, (val)->improvedPBFramesMode))
  9738. return 0;
  9739. if (!ASN1PEREncBoolean(enc, (val)->unlimitedMotionVectors))
  9740. return 0;
  9741. if (!ASN1PEREncBoolean(enc, (val)->fullPictureFreeze))
  9742. return 0;
  9743. if (!ASN1PEREncBoolean(enc, (val)->partialPictureFreezeAndRelease))
  9744. return 0;
  9745. if (!ASN1PEREncBoolean(enc, (val)->resizingPartPicFreezeAndRelease))
  9746. return 0;
  9747. if (!ASN1PEREncBoolean(enc, (val)->fullPictureSnapshot))
  9748. return 0;
  9749. if (!ASN1PEREncBoolean(enc, (val)->partialPictureSnapshot))
  9750. return 0;
  9751. if (!ASN1PEREncBoolean(enc, (val)->videoSegmentTagging))
  9752. return 0;
  9753. if (!ASN1PEREncBoolean(enc, (val)->progressiveRefinement))
  9754. return 0;
  9755. if (!ASN1PEREncBoolean(enc, (val)->dynamicPictureResizingByFour))
  9756. return 0;
  9757. if (!ASN1PEREncBoolean(enc, (val)->dynamicPictureResizingSixteenthPel))
  9758. return 0;
  9759. if (!ASN1PEREncBoolean(enc, (val)->dynamicWarpingHalfPel))
  9760. return 0;
  9761. if (!ASN1PEREncBoolean(enc, (val)->dynamicWarpingSixteenthPel))
  9762. return 0;
  9763. if (!ASN1PEREncBoolean(enc, (val)->independentSegmentDecoding))
  9764. return 0;
  9765. if (!ASN1PEREncBoolean(enc, (val)->slicesInOrder_NonRect))
  9766. return 0;
  9767. if (!ASN1PEREncBoolean(enc, (val)->slicesInOrder_Rect))
  9768. return 0;
  9769. if (!ASN1PEREncBoolean(enc, (val)->slicesNoOrder_NonRect))
  9770. return 0;
  9771. if (!ASN1PEREncBoolean(enc, (val)->slicesNoOrder_Rect))
  9772. return 0;
  9773. if (!ASN1PEREncBoolean(enc, (val)->alternateInterVLCMode))
  9774. return 0;
  9775. if (!ASN1PEREncBoolean(enc, (val)->modifiedQuantizationMode))
  9776. return 0;
  9777. if (!ASN1PEREncBoolean(enc, (val)->reducedResolutionUpdate))
  9778. return 0;
  9779. if ((val)->o[0] & 0x80) {
  9780. if (!ASN1Enc_TransparencyParameters(enc, &(val)->transparencyParameters))
  9781. return 0;
  9782. }
  9783. if (!ASN1PEREncBoolean(enc, (val)->separateVideoBackChannel))
  9784. return 0;
  9785. if ((val)->o[0] & 0x40) {
  9786. if (!ASN1Enc_RefPictureSelection(enc, &(val)->refPictureSelection))
  9787. return 0;
  9788. }
  9789. if ((val)->o[0] & 0x20) {
  9790. if (!ASN1Enc_H263Options_customPictureClockFrequency(enc, &(val)->customPictureClockFrequency))
  9791. return 0;
  9792. }
  9793. if ((val)->o[0] & 0x10) {
  9794. if (!ASN1Enc_H263Options_customPictureFormat(enc, &(val)->customPictureFormat))
  9795. return 0;
  9796. }
  9797. if ((val)->o[0] & 0x8) {
  9798. if (!ASN1Enc_H263Options_modeCombos(enc, &(val)->modeCombos))
  9799. return 0;
  9800. }
  9801. return 1;
  9802. }
  9803. static int ASN1CALL ASN1Dec_H263Options(ASN1decoding_t dec, H263Options *val)
  9804. {
  9805. ASN1uint32_t y;
  9806. if (!ASN1PERDecExtensionBit(dec, &y))
  9807. return 0;
  9808. if (!ASN1PERDecExtension(dec, 5, (val)->o))
  9809. return 0;
  9810. if (!ASN1PERDecBoolean(dec, &(val)->advancedIntraCodingMode))
  9811. return 0;
  9812. if (!ASN1PERDecBoolean(dec, &(val)->deblockingFilterMode))
  9813. return 0;
  9814. if (!ASN1PERDecBoolean(dec, &(val)->improvedPBFramesMode))
  9815. return 0;
  9816. if (!ASN1PERDecBoolean(dec, &(val)->unlimitedMotionVectors))
  9817. return 0;
  9818. if (!ASN1PERDecBoolean(dec, &(val)->fullPictureFreeze))
  9819. return 0;
  9820. if (!ASN1PERDecBoolean(dec, &(val)->partialPictureFreezeAndRelease))
  9821. return 0;
  9822. if (!ASN1PERDecBoolean(dec, &(val)->resizingPartPicFreezeAndRelease))
  9823. return 0;
  9824. if (!ASN1PERDecBoolean(dec, &(val)->fullPictureSnapshot))
  9825. return 0;
  9826. if (!ASN1PERDecBoolean(dec, &(val)->partialPictureSnapshot))
  9827. return 0;
  9828. if (!ASN1PERDecBoolean(dec, &(val)->videoSegmentTagging))
  9829. return 0;
  9830. if (!ASN1PERDecBoolean(dec, &(val)->progressiveRefinement))
  9831. return 0;
  9832. if (!ASN1PERDecBoolean(dec, &(val)->dynamicPictureResizingByFour))
  9833. return 0;
  9834. if (!ASN1PERDecBoolean(dec, &(val)->dynamicPictureResizingSixteenthPel))
  9835. return 0;
  9836. if (!ASN1PERDecBoolean(dec, &(val)->dynamicWarpingHalfPel))
  9837. return 0;
  9838. if (!ASN1PERDecBoolean(dec, &(val)->dynamicWarpingSixteenthPel))
  9839. return 0;
  9840. if (!ASN1PERDecBoolean(dec, &(val)->independentSegmentDecoding))
  9841. return 0;
  9842. if (!ASN1PERDecBoolean(dec, &(val)->slicesInOrder_NonRect))
  9843. return 0;
  9844. if (!ASN1PERDecBoolean(dec, &(val)->slicesInOrder_Rect))
  9845. return 0;
  9846. if (!ASN1PERDecBoolean(dec, &(val)->slicesNoOrder_NonRect))
  9847. return 0;
  9848. if (!ASN1PERDecBoolean(dec, &(val)->slicesNoOrder_Rect))
  9849. return 0;
  9850. if (!ASN1PERDecBoolean(dec, &(val)->alternateInterVLCMode))
  9851. return 0;
  9852. if (!ASN1PERDecBoolean(dec, &(val)->modifiedQuantizationMode))
  9853. return 0;
  9854. if (!ASN1PERDecBoolean(dec, &(val)->reducedResolutionUpdate))
  9855. return 0;
  9856. if ((val)->o[0] & 0x80) {
  9857. if (!ASN1Dec_TransparencyParameters(dec, &(val)->transparencyParameters))
  9858. return 0;
  9859. }
  9860. if (!ASN1PERDecBoolean(dec, &(val)->separateVideoBackChannel))
  9861. return 0;
  9862. if ((val)->o[0] & 0x40) {
  9863. if (!ASN1Dec_RefPictureSelection(dec, &(val)->refPictureSelection))
  9864. return 0;
  9865. }
  9866. if ((val)->o[0] & 0x20) {
  9867. if (!ASN1Dec_H263Options_customPictureClockFrequency(dec, &(val)->customPictureClockFrequency))
  9868. return 0;
  9869. }
  9870. if ((val)->o[0] & 0x10) {
  9871. if (!ASN1Dec_H263Options_customPictureFormat(dec, &(val)->customPictureFormat))
  9872. return 0;
  9873. }
  9874. if ((val)->o[0] & 0x8) {
  9875. if (!ASN1Dec_H263Options_modeCombos(dec, &(val)->modeCombos))
  9876. return 0;
  9877. }
  9878. if (y) {
  9879. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  9880. return 0;
  9881. }
  9882. return 1;
  9883. }
  9884. static void ASN1CALL ASN1Free_H263Options(H263Options *val)
  9885. {
  9886. if (val) {
  9887. if ((val)->o[0] & 0x20) {
  9888. ASN1Free_H263Options_customPictureClockFrequency(&(val)->customPictureClockFrequency);
  9889. }
  9890. if ((val)->o[0] & 0x10) {
  9891. ASN1Free_H263Options_customPictureFormat(&(val)->customPictureFormat);
  9892. }
  9893. if ((val)->o[0] & 0x8) {
  9894. ASN1Free_H263Options_modeCombos(&(val)->modeCombos);
  9895. }
  9896. }
  9897. }
  9898. static int ASN1CALL ASN1Enc_H263VideoModeCombos(ASN1encoding_t enc, H263VideoModeCombos *val)
  9899. {
  9900. if (!ASN1PEREncExtensionBitClear(enc))
  9901. return 0;
  9902. if (!ASN1Enc_H263ModeComboFlags(enc, &(val)->h263VideoUncoupledModes))
  9903. return 0;
  9904. if (!ASN1Enc_H263VideoModeCombos_h263VideoCoupledModes(enc, &(val)->h263VideoCoupledModes))
  9905. return 0;
  9906. return 1;
  9907. }
  9908. static int ASN1CALL ASN1Dec_H263VideoModeCombos(ASN1decoding_t dec, H263VideoModeCombos *val)
  9909. {
  9910. ASN1uint32_t y;
  9911. if (!ASN1PERDecExtensionBit(dec, &y))
  9912. return 0;
  9913. if (!ASN1Dec_H263ModeComboFlags(dec, &(val)->h263VideoUncoupledModes))
  9914. return 0;
  9915. if (!ASN1Dec_H263VideoModeCombos_h263VideoCoupledModes(dec, &(val)->h263VideoCoupledModes))
  9916. return 0;
  9917. if (y) {
  9918. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  9919. return 0;
  9920. }
  9921. return 1;
  9922. }
  9923. static void ASN1CALL ASN1Free_H263VideoModeCombos(H263VideoModeCombos *val)
  9924. {
  9925. if (val) {
  9926. ASN1Free_H263VideoModeCombos_h263VideoCoupledModes(&(val)->h263VideoCoupledModes);
  9927. }
  9928. }
  9929. static int ASN1CALL ASN1Enc_AudioCapability(ASN1encoding_t enc, AudioCapability *val)
  9930. {
  9931. ASN1encoding_t ee;
  9932. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 14))
  9933. return 0;
  9934. switch ((val)->choice) {
  9935. case 1:
  9936. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  9937. return 0;
  9938. break;
  9939. case 2:
  9940. ASN1PEREncAlignment(enc);
  9941. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g711Alaw64k - 1))
  9942. return 0;
  9943. break;
  9944. case 3:
  9945. ASN1PEREncAlignment(enc);
  9946. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g711Alaw56k - 1))
  9947. return 0;
  9948. break;
  9949. case 4:
  9950. ASN1PEREncAlignment(enc);
  9951. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g711Ulaw64k - 1))
  9952. return 0;
  9953. break;
  9954. case 5:
  9955. ASN1PEREncAlignment(enc);
  9956. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g711Ulaw56k - 1))
  9957. return 0;
  9958. break;
  9959. case 6:
  9960. ASN1PEREncAlignment(enc);
  9961. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g722_64k - 1))
  9962. return 0;
  9963. break;
  9964. case 7:
  9965. ASN1PEREncAlignment(enc);
  9966. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g722_56k - 1))
  9967. return 0;
  9968. break;
  9969. case 8:
  9970. ASN1PEREncAlignment(enc);
  9971. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g722_48k - 1))
  9972. return 0;
  9973. break;
  9974. case 9:
  9975. if (!ASN1Enc_AudioCapability_g7231(enc, &(val)->u.g7231))
  9976. return 0;
  9977. break;
  9978. case 10:
  9979. ASN1PEREncAlignment(enc);
  9980. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g728 - 1))
  9981. return 0;
  9982. break;
  9983. case 11:
  9984. ASN1PEREncAlignment(enc);
  9985. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g729 - 1))
  9986. return 0;
  9987. break;
  9988. case 12:
  9989. ASN1PEREncAlignment(enc);
  9990. if (!ASN1PEREncBitVal(enc, 8, (val)->u.g729AnnexA - 1))
  9991. return 0;
  9992. break;
  9993. case 13:
  9994. if (!ASN1Enc_IS11172AudioCapability(enc, &(val)->u.is11172AudioCapability))
  9995. return 0;
  9996. break;
  9997. case 14:
  9998. if (!ASN1Enc_IS13818AudioCapability(enc, &(val)->u.is13818AudioCapability))
  9999. return 0;
  10000. break;
  10001. case 15:
  10002. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10003. return 0;
  10004. ASN1PEREncAlignment(ee);
  10005. if (!ASN1PEREncBitVal(ee, 8, (val)->u.g729wAnnexB - 1))
  10006. return 0;
  10007. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10008. return 0;
  10009. ASN1_CloseEncoder2(ee);
  10010. break;
  10011. case 16:
  10012. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10013. return 0;
  10014. ASN1PEREncAlignment(ee);
  10015. if (!ASN1PEREncBitVal(ee, 8, (val)->u.g729AnnexAwAnnexB - 1))
  10016. return 0;
  10017. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10018. return 0;
  10019. ASN1_CloseEncoder2(ee);
  10020. break;
  10021. case 17:
  10022. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10023. return 0;
  10024. if (!ASN1Enc_G7231AnnexCCapability(ee, &(val)->u.g7231AnnexCCapability))
  10025. return 0;
  10026. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10027. return 0;
  10028. ASN1_CloseEncoder2(ee);
  10029. break;
  10030. case 18:
  10031. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10032. return 0;
  10033. if (!ASN1Enc_GSMAudioCapability(ee, &(val)->u.gsmFullRate))
  10034. return 0;
  10035. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10036. return 0;
  10037. ASN1_CloseEncoder2(ee);
  10038. break;
  10039. case 19:
  10040. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10041. return 0;
  10042. if (!ASN1Enc_GSMAudioCapability(ee, &(val)->u.gsmHalfRate))
  10043. return 0;
  10044. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10045. return 0;
  10046. ASN1_CloseEncoder2(ee);
  10047. break;
  10048. case 20:
  10049. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10050. return 0;
  10051. if (!ASN1Enc_GSMAudioCapability(ee, &(val)->u.gsmEnhancedFullRate))
  10052. return 0;
  10053. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10054. return 0;
  10055. ASN1_CloseEncoder2(ee);
  10056. break;
  10057. default:
  10058. /* impossible */
  10059. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  10060. return 0;
  10061. }
  10062. return 1;
  10063. }
  10064. static int ASN1CALL ASN1Dec_AudioCapability(ASN1decoding_t dec, AudioCapability *val)
  10065. {
  10066. ASN1decoding_t dd;
  10067. ASN1octet_t *db;
  10068. ASN1uint32_t ds;
  10069. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 14))
  10070. return 0;
  10071. switch ((val)->choice) {
  10072. case 1:
  10073. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  10074. return 0;
  10075. break;
  10076. case 2:
  10077. ASN1PERDecAlignment(dec);
  10078. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g711Alaw64k))
  10079. return 0;
  10080. (val)->u.g711Alaw64k += 1;
  10081. break;
  10082. case 3:
  10083. ASN1PERDecAlignment(dec);
  10084. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g711Alaw56k))
  10085. return 0;
  10086. (val)->u.g711Alaw56k += 1;
  10087. break;
  10088. case 4:
  10089. ASN1PERDecAlignment(dec);
  10090. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g711Ulaw64k))
  10091. return 0;
  10092. (val)->u.g711Ulaw64k += 1;
  10093. break;
  10094. case 5:
  10095. ASN1PERDecAlignment(dec);
  10096. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g711Ulaw56k))
  10097. return 0;
  10098. (val)->u.g711Ulaw56k += 1;
  10099. break;
  10100. case 6:
  10101. ASN1PERDecAlignment(dec);
  10102. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g722_64k))
  10103. return 0;
  10104. (val)->u.g722_64k += 1;
  10105. break;
  10106. case 7:
  10107. ASN1PERDecAlignment(dec);
  10108. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g722_56k))
  10109. return 0;
  10110. (val)->u.g722_56k += 1;
  10111. break;
  10112. case 8:
  10113. ASN1PERDecAlignment(dec);
  10114. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g722_48k))
  10115. return 0;
  10116. (val)->u.g722_48k += 1;
  10117. break;
  10118. case 9:
  10119. if (!ASN1Dec_AudioCapability_g7231(dec, &(val)->u.g7231))
  10120. return 0;
  10121. break;
  10122. case 10:
  10123. ASN1PERDecAlignment(dec);
  10124. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g728))
  10125. return 0;
  10126. (val)->u.g728 += 1;
  10127. break;
  10128. case 11:
  10129. ASN1PERDecAlignment(dec);
  10130. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g729))
  10131. return 0;
  10132. (val)->u.g729 += 1;
  10133. break;
  10134. case 12:
  10135. ASN1PERDecAlignment(dec);
  10136. if (!ASN1PERDecU16Val(dec, 8, &(val)->u.g729AnnexA))
  10137. return 0;
  10138. (val)->u.g729AnnexA += 1;
  10139. break;
  10140. case 13:
  10141. if (!ASN1Dec_IS11172AudioCapability(dec, &(val)->u.is11172AudioCapability))
  10142. return 0;
  10143. break;
  10144. case 14:
  10145. if (!ASN1Dec_IS13818AudioCapability(dec, &(val)->u.is13818AudioCapability))
  10146. return 0;
  10147. break;
  10148. case 15:
  10149. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10150. return 0;
  10151. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10152. return 0;
  10153. ASN1PERDecAlignment(dd);
  10154. if (!ASN1PERDecU16Val(dd, 8, &(val)->u.g729wAnnexB))
  10155. return 0;
  10156. (val)->u.g729wAnnexB += 1;
  10157. ASN1_CloseDecoder(dd);
  10158. ASN1Free(db);
  10159. break;
  10160. case 16:
  10161. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10162. return 0;
  10163. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10164. return 0;
  10165. ASN1PERDecAlignment(dd);
  10166. if (!ASN1PERDecU16Val(dd, 8, &(val)->u.g729AnnexAwAnnexB))
  10167. return 0;
  10168. (val)->u.g729AnnexAwAnnexB += 1;
  10169. ASN1_CloseDecoder(dd);
  10170. ASN1Free(db);
  10171. break;
  10172. case 17:
  10173. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10174. return 0;
  10175. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10176. return 0;
  10177. if (!ASN1Dec_G7231AnnexCCapability(dd, &(val)->u.g7231AnnexCCapability))
  10178. return 0;
  10179. ASN1_CloseDecoder(dd);
  10180. ASN1Free(db);
  10181. break;
  10182. case 18:
  10183. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10184. return 0;
  10185. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10186. return 0;
  10187. if (!ASN1Dec_GSMAudioCapability(dd, &(val)->u.gsmFullRate))
  10188. return 0;
  10189. ASN1_CloseDecoder(dd);
  10190. ASN1Free(db);
  10191. break;
  10192. case 19:
  10193. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10194. return 0;
  10195. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10196. return 0;
  10197. if (!ASN1Dec_GSMAudioCapability(dd, &(val)->u.gsmHalfRate))
  10198. return 0;
  10199. ASN1_CloseDecoder(dd);
  10200. ASN1Free(db);
  10201. break;
  10202. case 20:
  10203. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10204. return 0;
  10205. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10206. return 0;
  10207. if (!ASN1Dec_GSMAudioCapability(dd, &(val)->u.gsmEnhancedFullRate))
  10208. return 0;
  10209. ASN1_CloseDecoder(dd);
  10210. ASN1Free(db);
  10211. break;
  10212. case 0:
  10213. /* extension case */
  10214. if (!ASN1PERDecSkipFragmented(dec, 8))
  10215. return 0;
  10216. break;
  10217. default:
  10218. /* impossible */
  10219. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  10220. return 0;
  10221. }
  10222. return 1;
  10223. }
  10224. static void ASN1CALL ASN1Free_AudioCapability(AudioCapability *val)
  10225. {
  10226. if (val) {
  10227. switch ((val)->choice) {
  10228. case 1:
  10229. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  10230. break;
  10231. }
  10232. }
  10233. }
  10234. static int ASN1CALL ASN1Enc_CompressionType(ASN1encoding_t enc, CompressionType *val)
  10235. {
  10236. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 0))
  10237. return 0;
  10238. switch ((val)->choice) {
  10239. case 1:
  10240. if (!ASN1Enc_V42bis(enc, &(val)->u.v42bis))
  10241. return 0;
  10242. break;
  10243. default:
  10244. /* impossible */
  10245. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  10246. return 0;
  10247. }
  10248. return 1;
  10249. }
  10250. static int ASN1CALL ASN1Dec_CompressionType(ASN1decoding_t dec, CompressionType *val)
  10251. {
  10252. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 0))
  10253. return 0;
  10254. switch ((val)->choice) {
  10255. case 1:
  10256. if (!ASN1Dec_V42bis(dec, &(val)->u.v42bis))
  10257. return 0;
  10258. break;
  10259. case 0:
  10260. /* extension case */
  10261. if (!ASN1PERDecSkipFragmented(dec, 8))
  10262. return 0;
  10263. break;
  10264. default:
  10265. /* impossible */
  10266. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  10267. return 0;
  10268. }
  10269. return 1;
  10270. }
  10271. static int ASN1CALL ASN1Enc_MediaEncryptionAlgorithm(ASN1encoding_t enc, MediaEncryptionAlgorithm *val)
  10272. {
  10273. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  10274. return 0;
  10275. switch ((val)->choice) {
  10276. case 1:
  10277. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  10278. return 0;
  10279. break;
  10280. case 2:
  10281. if (!ASN1PEREncObjectIdentifier(enc, &(val)->u.algorithm))
  10282. return 0;
  10283. break;
  10284. default:
  10285. /* impossible */
  10286. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  10287. return 0;
  10288. }
  10289. return 1;
  10290. }
  10291. static int ASN1CALL ASN1Dec_MediaEncryptionAlgorithm(ASN1decoding_t dec, MediaEncryptionAlgorithm *val)
  10292. {
  10293. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  10294. return 0;
  10295. switch ((val)->choice) {
  10296. case 1:
  10297. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  10298. return 0;
  10299. break;
  10300. case 2:
  10301. if (!ASN1PERDecObjectIdentifier(dec, &(val)->u.algorithm))
  10302. return 0;
  10303. break;
  10304. case 0:
  10305. /* extension case */
  10306. if (!ASN1PERDecSkipFragmented(dec, 8))
  10307. return 0;
  10308. break;
  10309. default:
  10310. /* impossible */
  10311. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  10312. return 0;
  10313. }
  10314. return 1;
  10315. }
  10316. static void ASN1CALL ASN1Free_MediaEncryptionAlgorithm(MediaEncryptionAlgorithm *val)
  10317. {
  10318. if (val) {
  10319. switch ((val)->choice) {
  10320. case 1:
  10321. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  10322. break;
  10323. case 2:
  10324. ASN1objectidentifier_free(&(val)->u.algorithm);
  10325. break;
  10326. }
  10327. }
  10328. }
  10329. static int ASN1CALL ASN1Enc_AuthenticationCapability(ASN1encoding_t enc, AuthenticationCapability *val)
  10330. {
  10331. if (!ASN1PEREncExtensionBitClear(enc))
  10332. return 0;
  10333. if (!ASN1PEREncBits(enc, 1, (val)->o))
  10334. return 0;
  10335. if ((val)->o[0] & 0x80) {
  10336. if (!ASN1Enc_NonStandardParameter(enc, &(val)->nonStandard))
  10337. return 0;
  10338. }
  10339. return 1;
  10340. }
  10341. static int ASN1CALL ASN1Dec_AuthenticationCapability(ASN1decoding_t dec, AuthenticationCapability *val)
  10342. {
  10343. ASN1uint32_t y;
  10344. if (!ASN1PERDecExtensionBit(dec, &y))
  10345. return 0;
  10346. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  10347. return 0;
  10348. if ((val)->o[0] & 0x80) {
  10349. if (!ASN1Dec_NonStandardParameter(dec, &(val)->nonStandard))
  10350. return 0;
  10351. }
  10352. if (y) {
  10353. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  10354. return 0;
  10355. }
  10356. return 1;
  10357. }
  10358. static void ASN1CALL ASN1Free_AuthenticationCapability(AuthenticationCapability *val)
  10359. {
  10360. if (val) {
  10361. if ((val)->o[0] & 0x80) {
  10362. ASN1Free_NonStandardParameter(&(val)->nonStandard);
  10363. }
  10364. }
  10365. }
  10366. static int ASN1CALL ASN1Enc_IntegrityCapability(ASN1encoding_t enc, IntegrityCapability *val)
  10367. {
  10368. if (!ASN1PEREncExtensionBitClear(enc))
  10369. return 0;
  10370. if (!ASN1PEREncBits(enc, 1, (val)->o))
  10371. return 0;
  10372. if ((val)->o[0] & 0x80) {
  10373. if (!ASN1Enc_NonStandardParameter(enc, &(val)->nonStandard))
  10374. return 0;
  10375. }
  10376. return 1;
  10377. }
  10378. static int ASN1CALL ASN1Dec_IntegrityCapability(ASN1decoding_t dec, IntegrityCapability *val)
  10379. {
  10380. ASN1uint32_t y;
  10381. if (!ASN1PERDecExtensionBit(dec, &y))
  10382. return 0;
  10383. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  10384. return 0;
  10385. if ((val)->o[0] & 0x80) {
  10386. if (!ASN1Dec_NonStandardParameter(dec, &(val)->nonStandard))
  10387. return 0;
  10388. }
  10389. if (y) {
  10390. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  10391. return 0;
  10392. }
  10393. return 1;
  10394. }
  10395. static void ASN1CALL ASN1Free_IntegrityCapability(IntegrityCapability *val)
  10396. {
  10397. if (val) {
  10398. if ((val)->o[0] & 0x80) {
  10399. ASN1Free_NonStandardParameter(&(val)->nonStandard);
  10400. }
  10401. }
  10402. }
  10403. static int ASN1CALL ASN1Enc_H223AL1MParameters(ASN1encoding_t enc, H223AL1MParameters *val)
  10404. {
  10405. if (!ASN1PEREncExtensionBitClear(enc))
  10406. return 0;
  10407. if (!ASN1Enc_H223AL1MParameters_transferMode(enc, &(val)->transferMode))
  10408. return 0;
  10409. if (!ASN1Enc_H223AL1MParameters_headerFEC(enc, &(val)->headerFEC))
  10410. return 0;
  10411. if (!ASN1Enc_H223AL1MParameters_crcLength(enc, &(val)->crcLength))
  10412. return 0;
  10413. if (!ASN1PEREncBitVal(enc, 5, (val)->rcpcCodeRate - 8))
  10414. return 0;
  10415. if (!ASN1Enc_H223AL1MParameters_arqType(enc, &(val)->arqType))
  10416. return 0;
  10417. if (!ASN1PEREncBoolean(enc, (val)->alpduInterleaving))
  10418. return 0;
  10419. if (!ASN1PEREncBoolean(enc, (val)->alsduSplitting))
  10420. return 0;
  10421. return 1;
  10422. }
  10423. static int ASN1CALL ASN1Dec_H223AL1MParameters(ASN1decoding_t dec, H223AL1MParameters *val)
  10424. {
  10425. ASN1uint32_t y;
  10426. if (!ASN1PERDecExtensionBit(dec, &y))
  10427. return 0;
  10428. if (!ASN1Dec_H223AL1MParameters_transferMode(dec, &(val)->transferMode))
  10429. return 0;
  10430. if (!ASN1Dec_H223AL1MParameters_headerFEC(dec, &(val)->headerFEC))
  10431. return 0;
  10432. if (!ASN1Dec_H223AL1MParameters_crcLength(dec, &(val)->crcLength))
  10433. return 0;
  10434. if (!ASN1PERDecU16Val(dec, 5, &(val)->rcpcCodeRate))
  10435. return 0;
  10436. (val)->rcpcCodeRate += 8;
  10437. if (!ASN1Dec_H223AL1MParameters_arqType(dec, &(val)->arqType))
  10438. return 0;
  10439. if (!ASN1PERDecBoolean(dec, &(val)->alpduInterleaving))
  10440. return 0;
  10441. if (!ASN1PERDecBoolean(dec, &(val)->alsduSplitting))
  10442. return 0;
  10443. if (y) {
  10444. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  10445. return 0;
  10446. }
  10447. return 1;
  10448. }
  10449. static int ASN1CALL ASN1Enc_H223AL3MParameters(ASN1encoding_t enc, H223AL3MParameters *val)
  10450. {
  10451. if (!ASN1PEREncExtensionBitClear(enc))
  10452. return 0;
  10453. if (!ASN1Enc_H223AL3MParameters_headerFormat(enc, &(val)->headerFormat))
  10454. return 0;
  10455. if (!ASN1Enc_H223AL3MParameters_crcLength(enc, &(val)->crcLength))
  10456. return 0;
  10457. if (!ASN1PEREncBitVal(enc, 5, (val)->rcpcCodeRate - 8))
  10458. return 0;
  10459. if (!ASN1Enc_H223AL3MParameters_arqType(enc, &(val)->arqType))
  10460. return 0;
  10461. if (!ASN1PEREncBoolean(enc, (val)->alpduInterleaving))
  10462. return 0;
  10463. return 1;
  10464. }
  10465. static int ASN1CALL ASN1Dec_H223AL3MParameters(ASN1decoding_t dec, H223AL3MParameters *val)
  10466. {
  10467. ASN1uint32_t y;
  10468. if (!ASN1PERDecExtensionBit(dec, &y))
  10469. return 0;
  10470. if (!ASN1Dec_H223AL3MParameters_headerFormat(dec, &(val)->headerFormat))
  10471. return 0;
  10472. if (!ASN1Dec_H223AL3MParameters_crcLength(dec, &(val)->crcLength))
  10473. return 0;
  10474. if (!ASN1PERDecU16Val(dec, 5, &(val)->rcpcCodeRate))
  10475. return 0;
  10476. (val)->rcpcCodeRate += 8;
  10477. if (!ASN1Dec_H223AL3MParameters_arqType(dec, &(val)->arqType))
  10478. return 0;
  10479. if (!ASN1PERDecBoolean(dec, &(val)->alpduInterleaving))
  10480. return 0;
  10481. if (y) {
  10482. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  10483. return 0;
  10484. }
  10485. return 1;
  10486. }
  10487. static int ASN1CALL ASN1Enc_V76HDLCParameters(ASN1encoding_t enc, V76HDLCParameters *val)
  10488. {
  10489. if (!ASN1PEREncExtensionBitClear(enc))
  10490. return 0;
  10491. if (!ASN1Enc_CRCLength(enc, &(val)->crcLength))
  10492. return 0;
  10493. if (!ASN1PEREncUnsignedShort(enc, (val)->n401 - 1))
  10494. return 0;
  10495. if (!ASN1PEREncBoolean(enc, (val)->loopbackTestProcedure))
  10496. return 0;
  10497. return 1;
  10498. }
  10499. static int ASN1CALL ASN1Dec_V76HDLCParameters(ASN1decoding_t dec, V76HDLCParameters *val)
  10500. {
  10501. ASN1uint32_t y;
  10502. if (!ASN1PERDecExtensionBit(dec, &y))
  10503. return 0;
  10504. if (!ASN1Dec_CRCLength(dec, &(val)->crcLength))
  10505. return 0;
  10506. if (!ASN1PERDecUnsignedShort(dec, &(val)->n401))
  10507. return 0;
  10508. (val)->n401 += 1;
  10509. if (!ASN1PERDecBoolean(dec, &(val)->loopbackTestProcedure))
  10510. return 0;
  10511. if (y) {
  10512. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  10513. return 0;
  10514. }
  10515. return 1;
  10516. }
  10517. static int ASN1CALL ASN1Enc_UnicastAddress(ASN1encoding_t enc, UnicastAddress *val)
  10518. {
  10519. ASN1encoding_t ee;
  10520. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 5))
  10521. return 0;
  10522. switch ((val)->choice) {
  10523. case 1:
  10524. if (!ASN1Enc_UnicastAddress_iPAddress(enc, &(val)->u.iPAddress))
  10525. return 0;
  10526. break;
  10527. case 2:
  10528. if (!ASN1Enc_UnicastAddress_iPXAddress(enc, &(val)->u.iPXAddress))
  10529. return 0;
  10530. break;
  10531. case 3:
  10532. if (!ASN1Enc_UnicastAddress_iP6Address(enc, &(val)->u.iP6Address))
  10533. return 0;
  10534. break;
  10535. case 4:
  10536. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->u.netBios, 16))
  10537. return 0;
  10538. break;
  10539. case 5:
  10540. if (!ASN1Enc_UnicastAddress_iPSourceRouteAddress(enc, &(val)->u.iPSourceRouteAddress))
  10541. return 0;
  10542. break;
  10543. case 6:
  10544. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10545. return 0;
  10546. if (!ASN1PEREncOctetString_VarSize(ee, (ASN1octetstring2_t *) &(val)->u.nsap, 1, 20, 5))
  10547. return 0;
  10548. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10549. return 0;
  10550. ASN1_CloseEncoder2(ee);
  10551. break;
  10552. case 7:
  10553. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10554. return 0;
  10555. if (!ASN1Enc_NonStandardParameter(ee, &(val)->u.nonStandardAddress))
  10556. return 0;
  10557. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10558. return 0;
  10559. ASN1_CloseEncoder2(ee);
  10560. break;
  10561. default:
  10562. /* impossible */
  10563. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  10564. return 0;
  10565. }
  10566. return 1;
  10567. }
  10568. static int ASN1CALL ASN1Dec_UnicastAddress(ASN1decoding_t dec, UnicastAddress *val)
  10569. {
  10570. ASN1decoding_t dd;
  10571. ASN1octet_t *db;
  10572. ASN1uint32_t ds;
  10573. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 5))
  10574. return 0;
  10575. switch ((val)->choice) {
  10576. case 1:
  10577. if (!ASN1Dec_UnicastAddress_iPAddress(dec, &(val)->u.iPAddress))
  10578. return 0;
  10579. break;
  10580. case 2:
  10581. if (!ASN1Dec_UnicastAddress_iPXAddress(dec, &(val)->u.iPXAddress))
  10582. return 0;
  10583. break;
  10584. case 3:
  10585. if (!ASN1Dec_UnicastAddress_iP6Address(dec, &(val)->u.iP6Address))
  10586. return 0;
  10587. break;
  10588. case 4:
  10589. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->u.netBios, 16))
  10590. return 0;
  10591. break;
  10592. case 5:
  10593. if (!ASN1Dec_UnicastAddress_iPSourceRouteAddress(dec, &(val)->u.iPSourceRouteAddress))
  10594. return 0;
  10595. break;
  10596. case 6:
  10597. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10598. return 0;
  10599. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10600. return 0;
  10601. if (!ASN1PERDecOctetString_VarSize(dd, (ASN1octetstring2_t *) &(val)->u.nsap, 1, 20, 5))
  10602. return 0;
  10603. ASN1_CloseDecoder(dd);
  10604. ASN1Free(db);
  10605. break;
  10606. case 7:
  10607. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10608. return 0;
  10609. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10610. return 0;
  10611. if (!ASN1Dec_NonStandardParameter(dd, &(val)->u.nonStandardAddress))
  10612. return 0;
  10613. ASN1_CloseDecoder(dd);
  10614. ASN1Free(db);
  10615. break;
  10616. case 0:
  10617. /* extension case */
  10618. if (!ASN1PERDecSkipFragmented(dec, 8))
  10619. return 0;
  10620. break;
  10621. default:
  10622. /* impossible */
  10623. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  10624. return 0;
  10625. }
  10626. return 1;
  10627. }
  10628. static void ASN1CALL ASN1Free_UnicastAddress(UnicastAddress *val)
  10629. {
  10630. if (val) {
  10631. switch ((val)->choice) {
  10632. case 1:
  10633. ASN1Free_UnicastAddress_iPAddress(&(val)->u.iPAddress);
  10634. break;
  10635. case 2:
  10636. ASN1Free_UnicastAddress_iPXAddress(&(val)->u.iPXAddress);
  10637. break;
  10638. case 3:
  10639. ASN1Free_UnicastAddress_iP6Address(&(val)->u.iP6Address);
  10640. break;
  10641. case 4:
  10642. break;
  10643. case 5:
  10644. ASN1Free_UnicastAddress_iPSourceRouteAddress(&(val)->u.iPSourceRouteAddress);
  10645. break;
  10646. case 6:
  10647. break;
  10648. case 7:
  10649. ASN1Free_NonStandardParameter(&(val)->u.nonStandardAddress);
  10650. break;
  10651. }
  10652. }
  10653. }
  10654. static int ASN1CALL ASN1Enc_MulticastAddress(ASN1encoding_t enc, MulticastAddress *val)
  10655. {
  10656. ASN1encoding_t ee;
  10657. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 1, 2))
  10658. return 0;
  10659. switch ((val)->choice) {
  10660. case 1:
  10661. if (!ASN1Enc_MulticastAddress_iPAddress(enc, &(val)->u.iPAddress))
  10662. return 0;
  10663. break;
  10664. case 2:
  10665. if (!ASN1Enc_MulticastAddress_iP6Address(enc, &(val)->u.iP6Address))
  10666. return 0;
  10667. break;
  10668. case 3:
  10669. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10670. return 0;
  10671. if (!ASN1PEREncOctetString_VarSize(ee, (ASN1octetstring2_t *) &(val)->u.nsap, 1, 20, 5))
  10672. return 0;
  10673. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10674. return 0;
  10675. ASN1_CloseEncoder2(ee);
  10676. break;
  10677. case 4:
  10678. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10679. return 0;
  10680. if (!ASN1Enc_NonStandardParameter(ee, &(val)->u.nonStandardAddress))
  10681. return 0;
  10682. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10683. return 0;
  10684. ASN1_CloseEncoder2(ee);
  10685. break;
  10686. default:
  10687. /* impossible */
  10688. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  10689. return 0;
  10690. }
  10691. return 1;
  10692. }
  10693. static int ASN1CALL ASN1Dec_MulticastAddress(ASN1decoding_t dec, MulticastAddress *val)
  10694. {
  10695. ASN1decoding_t dd;
  10696. ASN1octet_t *db;
  10697. ASN1uint32_t ds;
  10698. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 1, 2))
  10699. return 0;
  10700. switch ((val)->choice) {
  10701. case 1:
  10702. if (!ASN1Dec_MulticastAddress_iPAddress(dec, &(val)->u.iPAddress))
  10703. return 0;
  10704. break;
  10705. case 2:
  10706. if (!ASN1Dec_MulticastAddress_iP6Address(dec, &(val)->u.iP6Address))
  10707. return 0;
  10708. break;
  10709. case 3:
  10710. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10711. return 0;
  10712. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10713. return 0;
  10714. if (!ASN1PERDecOctetString_VarSize(dd, (ASN1octetstring2_t *) &(val)->u.nsap, 1, 20, 5))
  10715. return 0;
  10716. ASN1_CloseDecoder(dd);
  10717. ASN1Free(db);
  10718. break;
  10719. case 4:
  10720. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10721. return 0;
  10722. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10723. return 0;
  10724. if (!ASN1Dec_NonStandardParameter(dd, &(val)->u.nonStandardAddress))
  10725. return 0;
  10726. ASN1_CloseDecoder(dd);
  10727. ASN1Free(db);
  10728. break;
  10729. case 0:
  10730. /* extension case */
  10731. if (!ASN1PERDecSkipFragmented(dec, 8))
  10732. return 0;
  10733. break;
  10734. default:
  10735. /* impossible */
  10736. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  10737. return 0;
  10738. }
  10739. return 1;
  10740. }
  10741. static void ASN1CALL ASN1Free_MulticastAddress(MulticastAddress *val)
  10742. {
  10743. if (val) {
  10744. switch ((val)->choice) {
  10745. case 1:
  10746. ASN1Free_MulticastAddress_iPAddress(&(val)->u.iPAddress);
  10747. break;
  10748. case 2:
  10749. ASN1Free_MulticastAddress_iP6Address(&(val)->u.iP6Address);
  10750. break;
  10751. case 3:
  10752. break;
  10753. case 4:
  10754. ASN1Free_NonStandardParameter(&(val)->u.nonStandardAddress);
  10755. break;
  10756. }
  10757. }
  10758. }
  10759. static int ASN1CALL ASN1Enc_EncryptionSync(ASN1encoding_t enc, EncryptionSync *val)
  10760. {
  10761. if (!ASN1PEREncExtensionBitClear(enc))
  10762. return 0;
  10763. if (!ASN1PEREncBits(enc, 2, (val)->o))
  10764. return 0;
  10765. if ((val)->o[0] & 0x80) {
  10766. if (!ASN1Enc_NonStandardParameter(enc, &(val)->nonStandard))
  10767. return 0;
  10768. }
  10769. ASN1PEREncAlignment(enc);
  10770. if (!ASN1PEREncBitVal(enc, 8, (val)->synchFlag))
  10771. return 0;
  10772. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->h235Key, 1, 65535, 16))
  10773. return 0;
  10774. if ((val)->o[0] & 0x40) {
  10775. if (!ASN1Enc_EncryptionSync_escrowentry(enc, &(val)->escrowentry))
  10776. return 0;
  10777. }
  10778. return 1;
  10779. }
  10780. static int ASN1CALL ASN1Dec_EncryptionSync(ASN1decoding_t dec, EncryptionSync *val)
  10781. {
  10782. ASN1uint32_t y;
  10783. if (!ASN1PERDecExtensionBit(dec, &y))
  10784. return 0;
  10785. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  10786. return 0;
  10787. if ((val)->o[0] & 0x80) {
  10788. if (!ASN1Dec_NonStandardParameter(dec, &(val)->nonStandard))
  10789. return 0;
  10790. }
  10791. ASN1PERDecAlignment(dec);
  10792. if (!ASN1PERDecU16Val(dec, 8, &(val)->synchFlag))
  10793. return 0;
  10794. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->h235Key, 1, 65535, 16))
  10795. return 0;
  10796. if ((val)->o[0] & 0x40) {
  10797. if (!ASN1Dec_EncryptionSync_escrowentry(dec, &(val)->escrowentry))
  10798. return 0;
  10799. }
  10800. if (y) {
  10801. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  10802. return 0;
  10803. }
  10804. return 1;
  10805. }
  10806. static void ASN1CALL ASN1Free_EncryptionSync(EncryptionSync *val)
  10807. {
  10808. if (val) {
  10809. if ((val)->o[0] & 0x80) {
  10810. ASN1Free_NonStandardParameter(&(val)->nonStandard);
  10811. }
  10812. if ((val)->o[0] & 0x40) {
  10813. ASN1Free_EncryptionSync_escrowentry(&(val)->escrowentry);
  10814. }
  10815. }
  10816. }
  10817. static int ASN1CALL ASN1Enc_RequestChannelClose(ASN1encoding_t enc, RequestChannelClose *val)
  10818. {
  10819. ASN1octet_t o[1];
  10820. ASN1uint32_t y;
  10821. ASN1encoding_t ee;
  10822. CopyMemory(o, (val)->o, 1);
  10823. o[0] |= 0x40;
  10824. y = ASN1PEREncCheckExtensions(2, (val)->o + 0);
  10825. if (!ASN1PEREncBitVal(enc, 1, y))
  10826. return 0;
  10827. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  10828. return 0;
  10829. if (y) {
  10830. if (!ASN1PEREncNormallySmallBits(enc, 2, o + 0))
  10831. return 0;
  10832. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  10833. return 0;
  10834. if (o[0] & 0x80) {
  10835. if (!ASN1Enc_QOSCapability(ee, &(val)->qosCapability))
  10836. return 0;
  10837. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10838. return 0;
  10839. }
  10840. if (o[0] & 0x40) {
  10841. if (!ASN1Enc_RequestChannelClose_reason(ee, &(val)->reason))
  10842. return 0;
  10843. if (!ASN1PEREncFlushFragmentedToParent(ee))
  10844. return 0;
  10845. }
  10846. ASN1_CloseEncoder2(ee);
  10847. }
  10848. return 1;
  10849. }
  10850. static int ASN1CALL ASN1Dec_RequestChannelClose(ASN1decoding_t dec, RequestChannelClose *val)
  10851. {
  10852. ASN1uint32_t y;
  10853. ASN1decoding_t dd;
  10854. ASN1octet_t *db;
  10855. ASN1uint32_t ds;
  10856. ASN1uint32_t i;
  10857. ASN1uint32_t e;
  10858. if (!ASN1PERDecExtensionBit(dec, &y))
  10859. return 0;
  10860. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  10861. return 0;
  10862. (val)->forwardLogicalChannelNumber += 1;
  10863. if (!y) {
  10864. ZeroMemory((val)->o + 0, 1);
  10865. } else {
  10866. if (!ASN1PERDecNormallySmallExtension(dec, &e, 2, (val)->o + 0))
  10867. return 0;
  10868. if ((val)->o[0] & 0x80) {
  10869. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10870. return 0;
  10871. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10872. return 0;
  10873. if (!ASN1Dec_QOSCapability(dd, &(val)->qosCapability))
  10874. return 0;
  10875. ASN1_CloseDecoder(dd);
  10876. ASN1Free(db);
  10877. }
  10878. if ((val)->o[0] & 0x40) {
  10879. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  10880. return 0;
  10881. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  10882. return 0;
  10883. if (!ASN1Dec_RequestChannelClose_reason(dd, &(val)->reason))
  10884. return 0;
  10885. ASN1_CloseDecoder(dd);
  10886. ASN1Free(db);
  10887. }
  10888. for (i = 0; i < e; i++) {
  10889. if (!ASN1PERDecSkipFragmented(dec, 8))
  10890. return 0;
  10891. }
  10892. }
  10893. return 1;
  10894. }
  10895. static void ASN1CALL ASN1Free_RequestChannelClose(RequestChannelClose *val)
  10896. {
  10897. if (val) {
  10898. if ((val)->o[0] & 0x80) {
  10899. ASN1Free_QOSCapability(&(val)->qosCapability);
  10900. }
  10901. }
  10902. }
  10903. static int ASN1CALL ASN1Enc_MultiplexEntryDescriptor(ASN1encoding_t enc, MultiplexEntryDescriptor *val)
  10904. {
  10905. if (!ASN1PEREncBits(enc, 1, (val)->o))
  10906. return 0;
  10907. if (!ASN1PEREncBitVal(enc, 4, (val)->multiplexTableEntryNumber - 1))
  10908. return 0;
  10909. if ((val)->o[0] & 0x80) {
  10910. if (!ASN1Enc_MultiplexEntryDescriptor_elementList(enc, &(val)->elementList))
  10911. return 0;
  10912. }
  10913. return 1;
  10914. }
  10915. static int ASN1CALL ASN1Dec_MultiplexEntryDescriptor(ASN1decoding_t dec, MultiplexEntryDescriptor *val)
  10916. {
  10917. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  10918. return 0;
  10919. if (!ASN1PERDecU16Val(dec, 4, &(val)->multiplexTableEntryNumber))
  10920. return 0;
  10921. (val)->multiplexTableEntryNumber += 1;
  10922. if ((val)->o[0] & 0x80) {
  10923. if (!ASN1Dec_MultiplexEntryDescriptor_elementList(dec, &(val)->elementList))
  10924. return 0;
  10925. }
  10926. return 1;
  10927. }
  10928. static void ASN1CALL ASN1Free_MultiplexEntryDescriptor(MultiplexEntryDescriptor *val)
  10929. {
  10930. if (val) {
  10931. if ((val)->o[0] & 0x80) {
  10932. ASN1Free_MultiplexEntryDescriptor_elementList(&(val)->elementList);
  10933. }
  10934. }
  10935. }
  10936. static int ASN1CALL ASN1Enc_MultiplexEntrySendReject(ASN1encoding_t enc, MultiplexEntrySendReject *val)
  10937. {
  10938. if (!ASN1PEREncExtensionBitClear(enc))
  10939. return 0;
  10940. ASN1PEREncAlignment(enc);
  10941. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  10942. return 0;
  10943. if (!ASN1Enc_MultiplexEntrySendReject_rejectionDescriptions(enc, &(val)->rejectionDescriptions))
  10944. return 0;
  10945. return 1;
  10946. }
  10947. static int ASN1CALL ASN1Dec_MultiplexEntrySendReject(ASN1decoding_t dec, MultiplexEntrySendReject *val)
  10948. {
  10949. ASN1uint32_t y;
  10950. if (!ASN1PERDecExtensionBit(dec, &y))
  10951. return 0;
  10952. ASN1PERDecAlignment(dec);
  10953. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  10954. return 0;
  10955. if (!ASN1Dec_MultiplexEntrySendReject_rejectionDescriptions(dec, &(val)->rejectionDescriptions))
  10956. return 0;
  10957. if (y) {
  10958. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  10959. return 0;
  10960. }
  10961. return 1;
  10962. }
  10963. static void ASN1CALL ASN1Free_MultiplexEntrySendReject(MultiplexEntrySendReject *val)
  10964. {
  10965. if (val) {
  10966. ASN1Free_MultiplexEntrySendReject_rejectionDescriptions(&(val)->rejectionDescriptions);
  10967. }
  10968. }
  10969. static int ASN1CALL ASN1Enc_RequestMultiplexEntryReject(ASN1encoding_t enc, RequestMultiplexEntryReject *val)
  10970. {
  10971. if (!ASN1PEREncExtensionBitClear(enc))
  10972. return 0;
  10973. if (!ASN1Enc_RequestMultiplexEntryReject_entryNumbers(enc, &(val)->entryNumbers))
  10974. return 0;
  10975. if (!ASN1Enc_RequestMultiplexEntryReject_rejectionDescriptions(enc, &(val)->rejectionDescriptions))
  10976. return 0;
  10977. return 1;
  10978. }
  10979. static int ASN1CALL ASN1Dec_RequestMultiplexEntryReject(ASN1decoding_t dec, RequestMultiplexEntryReject *val)
  10980. {
  10981. ASN1uint32_t y;
  10982. if (!ASN1PERDecExtensionBit(dec, &y))
  10983. return 0;
  10984. if (!ASN1Dec_RequestMultiplexEntryReject_entryNumbers(dec, &(val)->entryNumbers))
  10985. return 0;
  10986. if (!ASN1Dec_RequestMultiplexEntryReject_rejectionDescriptions(dec, &(val)->rejectionDescriptions))
  10987. return 0;
  10988. if (y) {
  10989. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  10990. return 0;
  10991. }
  10992. return 1;
  10993. }
  10994. static void ASN1CALL ASN1Free_RequestMultiplexEntryReject(RequestMultiplexEntryReject *val)
  10995. {
  10996. if (val) {
  10997. ASN1Free_RequestMultiplexEntryReject_entryNumbers(&(val)->entryNumbers);
  10998. ASN1Free_RequestMultiplexEntryReject_rejectionDescriptions(&(val)->rejectionDescriptions);
  10999. }
  11000. }
  11001. static int ASN1CALL ASN1Enc_H263VideoMode(ASN1encoding_t enc, H263VideoMode *val)
  11002. {
  11003. ASN1octet_t o[1];
  11004. ASN1uint32_t y;
  11005. ASN1encoding_t ee;
  11006. CopyMemory(o, (val)->o, 1);
  11007. o[0] |= 0x80;
  11008. y = ASN1PEREncCheckExtensions(3, (val)->o + 0);
  11009. if (!ASN1PEREncBitVal(enc, 1, y))
  11010. return 0;
  11011. if (!ASN1Enc_H263VideoMode_resolution(enc, &(val)->resolution))
  11012. return 0;
  11013. if (!ASN1PEREncUnsignedShort(enc, (val)->bitRate - 1))
  11014. return 0;
  11015. if (!ASN1PEREncBoolean(enc, (val)->unrestrictedVector))
  11016. return 0;
  11017. if (!ASN1PEREncBoolean(enc, (val)->arithmeticCoding))
  11018. return 0;
  11019. if (!ASN1PEREncBoolean(enc, (val)->advancedPrediction))
  11020. return 0;
  11021. if (!ASN1PEREncBoolean(enc, (val)->pbFrames))
  11022. return 0;
  11023. if (y) {
  11024. if (!ASN1PEREncNormallySmallBits(enc, 3, o + 0))
  11025. return 0;
  11026. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11027. return 0;
  11028. if (o[0] & 0x80) {
  11029. if (!ASN1PEREncBoolean(ee, (val)->errorCompensation))
  11030. return 0;
  11031. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11032. return 0;
  11033. }
  11034. if (o[0] & 0x40) {
  11035. if (!ASN1Enc_EnhancementLayerInfo(ee, &(val)->enhancementLayerInfo))
  11036. return 0;
  11037. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11038. return 0;
  11039. }
  11040. if (o[0] & 0x20) {
  11041. if (!ASN1Enc_H263Options(ee, &(val)->h263Options))
  11042. return 0;
  11043. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11044. return 0;
  11045. }
  11046. ASN1_CloseEncoder2(ee);
  11047. }
  11048. return 1;
  11049. }
  11050. static int ASN1CALL ASN1Dec_H263VideoMode(ASN1decoding_t dec, H263VideoMode *val)
  11051. {
  11052. ASN1uint32_t y;
  11053. ASN1decoding_t dd;
  11054. ASN1octet_t *db;
  11055. ASN1uint32_t ds;
  11056. ASN1uint32_t i;
  11057. ASN1uint32_t e;
  11058. if (!ASN1PERDecExtensionBit(dec, &y))
  11059. return 0;
  11060. if (!ASN1Dec_H263VideoMode_resolution(dec, &(val)->resolution))
  11061. return 0;
  11062. if (!ASN1PERDecUnsignedShort(dec, &(val)->bitRate))
  11063. return 0;
  11064. (val)->bitRate += 1;
  11065. if (!ASN1PERDecBoolean(dec, &(val)->unrestrictedVector))
  11066. return 0;
  11067. if (!ASN1PERDecBoolean(dec, &(val)->arithmeticCoding))
  11068. return 0;
  11069. if (!ASN1PERDecBoolean(dec, &(val)->advancedPrediction))
  11070. return 0;
  11071. if (!ASN1PERDecBoolean(dec, &(val)->pbFrames))
  11072. return 0;
  11073. if (!y) {
  11074. ZeroMemory((val)->o + 0, 1);
  11075. } else {
  11076. if (!ASN1PERDecNormallySmallExtension(dec, &e, 3, (val)->o + 0))
  11077. return 0;
  11078. if ((val)->o[0] & 0x80) {
  11079. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11080. return 0;
  11081. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11082. return 0;
  11083. if (!ASN1PERDecBoolean(dd, &(val)->errorCompensation))
  11084. return 0;
  11085. ASN1_CloseDecoder(dd);
  11086. ASN1Free(db);
  11087. }
  11088. if ((val)->o[0] & 0x40) {
  11089. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11090. return 0;
  11091. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11092. return 0;
  11093. if (!ASN1Dec_EnhancementLayerInfo(dd, &(val)->enhancementLayerInfo))
  11094. return 0;
  11095. ASN1_CloseDecoder(dd);
  11096. ASN1Free(db);
  11097. }
  11098. if ((val)->o[0] & 0x20) {
  11099. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11100. return 0;
  11101. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11102. return 0;
  11103. if (!ASN1Dec_H263Options(dd, &(val)->h263Options))
  11104. return 0;
  11105. ASN1_CloseDecoder(dd);
  11106. ASN1Free(db);
  11107. }
  11108. for (i = 0; i < e; i++) {
  11109. if (!ASN1PERDecSkipFragmented(dec, 8))
  11110. return 0;
  11111. }
  11112. }
  11113. return 1;
  11114. }
  11115. static void ASN1CALL ASN1Free_H263VideoMode(H263VideoMode *val)
  11116. {
  11117. if (val) {
  11118. if ((val)->o[0] & 0x40) {
  11119. ASN1Free_EnhancementLayerInfo(&(val)->enhancementLayerInfo);
  11120. }
  11121. if ((val)->o[0] & 0x20) {
  11122. ASN1Free_H263Options(&(val)->h263Options);
  11123. }
  11124. }
  11125. }
  11126. static int ASN1CALL ASN1Enc_AudioMode(ASN1encoding_t enc, AudioMode *val)
  11127. {
  11128. ASN1encoding_t ee;
  11129. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 14))
  11130. return 0;
  11131. switch ((val)->choice) {
  11132. case 1:
  11133. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  11134. return 0;
  11135. break;
  11136. case 2:
  11137. break;
  11138. case 3:
  11139. break;
  11140. case 4:
  11141. break;
  11142. case 5:
  11143. break;
  11144. case 6:
  11145. break;
  11146. case 7:
  11147. break;
  11148. case 8:
  11149. break;
  11150. case 9:
  11151. break;
  11152. case 10:
  11153. break;
  11154. case 11:
  11155. break;
  11156. case 12:
  11157. if (!ASN1Enc_AudioMode_g7231(enc, &(val)->u.g7231))
  11158. return 0;
  11159. break;
  11160. case 13:
  11161. if (!ASN1Enc_IS11172AudioMode(enc, &(val)->u.is11172AudioMode))
  11162. return 0;
  11163. break;
  11164. case 14:
  11165. if (!ASN1Enc_IS13818AudioMode(enc, &(val)->u.is13818AudioMode))
  11166. return 0;
  11167. break;
  11168. case 15:
  11169. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11170. return 0;
  11171. ASN1PEREncAlignment(ee);
  11172. if (!ASN1PEREncBitVal(ee, 8, (val)->u.g729wAnnexB - 1))
  11173. return 0;
  11174. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11175. return 0;
  11176. ASN1_CloseEncoder2(ee);
  11177. break;
  11178. case 16:
  11179. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11180. return 0;
  11181. ASN1PEREncAlignment(ee);
  11182. if (!ASN1PEREncBitVal(ee, 8, (val)->u.g729AnnexAwAnnexB - 1))
  11183. return 0;
  11184. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11185. return 0;
  11186. ASN1_CloseEncoder2(ee);
  11187. break;
  11188. case 17:
  11189. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11190. return 0;
  11191. if (!ASN1Enc_G7231AnnexCMode(ee, &(val)->u.g7231AnnexCMode))
  11192. return 0;
  11193. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11194. return 0;
  11195. ASN1_CloseEncoder2(ee);
  11196. break;
  11197. case 18:
  11198. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11199. return 0;
  11200. if (!ASN1Enc_GSMAudioCapability(ee, &(val)->u.gsmFullRate))
  11201. return 0;
  11202. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11203. return 0;
  11204. ASN1_CloseEncoder2(ee);
  11205. break;
  11206. case 19:
  11207. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11208. return 0;
  11209. if (!ASN1Enc_GSMAudioCapability(ee, &(val)->u.gsmHalfRate))
  11210. return 0;
  11211. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11212. return 0;
  11213. ASN1_CloseEncoder2(ee);
  11214. break;
  11215. case 20:
  11216. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11217. return 0;
  11218. if (!ASN1Enc_GSMAudioCapability(ee, &(val)->u.gsmEnhancedFullRate))
  11219. return 0;
  11220. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11221. return 0;
  11222. ASN1_CloseEncoder2(ee);
  11223. break;
  11224. default:
  11225. /* impossible */
  11226. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  11227. return 0;
  11228. }
  11229. return 1;
  11230. }
  11231. static int ASN1CALL ASN1Dec_AudioMode(ASN1decoding_t dec, AudioMode *val)
  11232. {
  11233. ASN1decoding_t dd;
  11234. ASN1octet_t *db;
  11235. ASN1uint32_t ds;
  11236. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 14))
  11237. return 0;
  11238. switch ((val)->choice) {
  11239. case 1:
  11240. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  11241. return 0;
  11242. break;
  11243. case 2:
  11244. break;
  11245. case 3:
  11246. break;
  11247. case 4:
  11248. break;
  11249. case 5:
  11250. break;
  11251. case 6:
  11252. break;
  11253. case 7:
  11254. break;
  11255. case 8:
  11256. break;
  11257. case 9:
  11258. break;
  11259. case 10:
  11260. break;
  11261. case 11:
  11262. break;
  11263. case 12:
  11264. if (!ASN1Dec_AudioMode_g7231(dec, &(val)->u.g7231))
  11265. return 0;
  11266. break;
  11267. case 13:
  11268. if (!ASN1Dec_IS11172AudioMode(dec, &(val)->u.is11172AudioMode))
  11269. return 0;
  11270. break;
  11271. case 14:
  11272. if (!ASN1Dec_IS13818AudioMode(dec, &(val)->u.is13818AudioMode))
  11273. return 0;
  11274. break;
  11275. case 15:
  11276. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11277. return 0;
  11278. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11279. return 0;
  11280. ASN1PERDecAlignment(dd);
  11281. if (!ASN1PERDecU16Val(dd, 8, &(val)->u.g729wAnnexB))
  11282. return 0;
  11283. (val)->u.g729wAnnexB += 1;
  11284. ASN1_CloseDecoder(dd);
  11285. ASN1Free(db);
  11286. break;
  11287. case 16:
  11288. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11289. return 0;
  11290. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11291. return 0;
  11292. ASN1PERDecAlignment(dd);
  11293. if (!ASN1PERDecU16Val(dd, 8, &(val)->u.g729AnnexAwAnnexB))
  11294. return 0;
  11295. (val)->u.g729AnnexAwAnnexB += 1;
  11296. ASN1_CloseDecoder(dd);
  11297. ASN1Free(db);
  11298. break;
  11299. case 17:
  11300. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11301. return 0;
  11302. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11303. return 0;
  11304. if (!ASN1Dec_G7231AnnexCMode(dd, &(val)->u.g7231AnnexCMode))
  11305. return 0;
  11306. ASN1_CloseDecoder(dd);
  11307. ASN1Free(db);
  11308. break;
  11309. case 18:
  11310. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11311. return 0;
  11312. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11313. return 0;
  11314. if (!ASN1Dec_GSMAudioCapability(dd, &(val)->u.gsmFullRate))
  11315. return 0;
  11316. ASN1_CloseDecoder(dd);
  11317. ASN1Free(db);
  11318. break;
  11319. case 19:
  11320. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11321. return 0;
  11322. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11323. return 0;
  11324. if (!ASN1Dec_GSMAudioCapability(dd, &(val)->u.gsmHalfRate))
  11325. return 0;
  11326. ASN1_CloseDecoder(dd);
  11327. ASN1Free(db);
  11328. break;
  11329. case 20:
  11330. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11331. return 0;
  11332. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11333. return 0;
  11334. if (!ASN1Dec_GSMAudioCapability(dd, &(val)->u.gsmEnhancedFullRate))
  11335. return 0;
  11336. ASN1_CloseDecoder(dd);
  11337. ASN1Free(db);
  11338. break;
  11339. case 0:
  11340. /* extension case */
  11341. if (!ASN1PERDecSkipFragmented(dec, 8))
  11342. return 0;
  11343. break;
  11344. default:
  11345. /* impossible */
  11346. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  11347. return 0;
  11348. }
  11349. return 1;
  11350. }
  11351. static void ASN1CALL ASN1Free_AudioMode(AudioMode *val)
  11352. {
  11353. if (val) {
  11354. switch ((val)->choice) {
  11355. case 1:
  11356. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  11357. break;
  11358. }
  11359. }
  11360. }
  11361. static int ASN1CALL ASN1Enc_EncryptionMode(ASN1encoding_t enc, EncryptionMode *val)
  11362. {
  11363. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  11364. return 0;
  11365. switch ((val)->choice) {
  11366. case 1:
  11367. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  11368. return 0;
  11369. break;
  11370. case 2:
  11371. break;
  11372. default:
  11373. /* impossible */
  11374. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  11375. return 0;
  11376. }
  11377. return 1;
  11378. }
  11379. static int ASN1CALL ASN1Dec_EncryptionMode(ASN1decoding_t dec, EncryptionMode *val)
  11380. {
  11381. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  11382. return 0;
  11383. switch ((val)->choice) {
  11384. case 1:
  11385. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  11386. return 0;
  11387. break;
  11388. case 2:
  11389. break;
  11390. case 0:
  11391. /* extension case */
  11392. if (!ASN1PERDecSkipFragmented(dec, 8))
  11393. return 0;
  11394. break;
  11395. default:
  11396. /* impossible */
  11397. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  11398. return 0;
  11399. }
  11400. return 1;
  11401. }
  11402. static void ASN1CALL ASN1Free_EncryptionMode(EncryptionMode *val)
  11403. {
  11404. if (val) {
  11405. switch ((val)->choice) {
  11406. case 1:
  11407. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  11408. break;
  11409. }
  11410. }
  11411. }
  11412. static int ASN1CALL ASN1Enc_ConferenceRequest(ASN1encoding_t enc, ConferenceRequest *val)
  11413. {
  11414. ASN1encoding_t ee;
  11415. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 8))
  11416. return 0;
  11417. switch ((val)->choice) {
  11418. case 1:
  11419. break;
  11420. case 2:
  11421. break;
  11422. case 3:
  11423. break;
  11424. case 4:
  11425. if (!ASN1Enc_TerminalLabel(enc, &(val)->u.dropTerminal))
  11426. return 0;
  11427. break;
  11428. case 5:
  11429. if (!ASN1Enc_TerminalLabel(enc, &(val)->u.requestTerminalID))
  11430. return 0;
  11431. break;
  11432. case 6:
  11433. break;
  11434. case 7:
  11435. break;
  11436. case 8:
  11437. break;
  11438. case 9:
  11439. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11440. return 0;
  11441. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11442. return 0;
  11443. ASN1_CloseEncoder2(ee);
  11444. break;
  11445. case 10:
  11446. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11447. return 0;
  11448. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11449. return 0;
  11450. ASN1_CloseEncoder2(ee);
  11451. break;
  11452. case 11:
  11453. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11454. return 0;
  11455. if (!ASN1Enc_ConferenceRequest_requestTerminalCertificate(ee, &(val)->u.requestTerminalCertificate))
  11456. return 0;
  11457. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11458. return 0;
  11459. ASN1_CloseEncoder2(ee);
  11460. break;
  11461. case 12:
  11462. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11463. return 0;
  11464. if (!ASN1PEREncUnsignedShort(ee, (val)->u.broadcastMyLogicalChannel - 1))
  11465. return 0;
  11466. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11467. return 0;
  11468. ASN1_CloseEncoder2(ee);
  11469. break;
  11470. case 13:
  11471. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11472. return 0;
  11473. if (!ASN1Enc_TerminalLabel(ee, &(val)->u.makeTerminalBroadcaster))
  11474. return 0;
  11475. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11476. return 0;
  11477. ASN1_CloseEncoder2(ee);
  11478. break;
  11479. case 14:
  11480. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11481. return 0;
  11482. if (!ASN1Enc_TerminalLabel(ee, &(val)->u.sendThisSource))
  11483. return 0;
  11484. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11485. return 0;
  11486. ASN1_CloseEncoder2(ee);
  11487. break;
  11488. case 15:
  11489. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11490. return 0;
  11491. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11492. return 0;
  11493. ASN1_CloseEncoder2(ee);
  11494. break;
  11495. case 16:
  11496. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11497. return 0;
  11498. if (!ASN1Enc_RemoteMCRequest(ee, &(val)->u.remoteMCRequest))
  11499. return 0;
  11500. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11501. return 0;
  11502. ASN1_CloseEncoder2(ee);
  11503. break;
  11504. default:
  11505. /* impossible */
  11506. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  11507. return 0;
  11508. }
  11509. return 1;
  11510. }
  11511. static int ASN1CALL ASN1Dec_ConferenceRequest(ASN1decoding_t dec, ConferenceRequest *val)
  11512. {
  11513. ASN1decoding_t dd;
  11514. ASN1octet_t *db;
  11515. ASN1uint32_t ds;
  11516. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 8))
  11517. return 0;
  11518. switch ((val)->choice) {
  11519. case 1:
  11520. break;
  11521. case 2:
  11522. break;
  11523. case 3:
  11524. break;
  11525. case 4:
  11526. if (!ASN1Dec_TerminalLabel(dec, &(val)->u.dropTerminal))
  11527. return 0;
  11528. break;
  11529. case 5:
  11530. if (!ASN1Dec_TerminalLabel(dec, &(val)->u.requestTerminalID))
  11531. return 0;
  11532. break;
  11533. case 6:
  11534. break;
  11535. case 7:
  11536. break;
  11537. case 8:
  11538. break;
  11539. case 9:
  11540. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11541. return 0;
  11542. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11543. return 0;
  11544. ASN1_CloseDecoder(dd);
  11545. ASN1Free(db);
  11546. break;
  11547. case 10:
  11548. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11549. return 0;
  11550. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11551. return 0;
  11552. ASN1_CloseDecoder(dd);
  11553. ASN1Free(db);
  11554. break;
  11555. case 11:
  11556. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11557. return 0;
  11558. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11559. return 0;
  11560. if (!ASN1Dec_ConferenceRequest_requestTerminalCertificate(dd, &(val)->u.requestTerminalCertificate))
  11561. return 0;
  11562. ASN1_CloseDecoder(dd);
  11563. ASN1Free(db);
  11564. break;
  11565. case 12:
  11566. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11567. return 0;
  11568. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11569. return 0;
  11570. if (!ASN1PERDecUnsignedShort(dd, &(val)->u.broadcastMyLogicalChannel))
  11571. return 0;
  11572. (val)->u.broadcastMyLogicalChannel += 1;
  11573. ASN1_CloseDecoder(dd);
  11574. ASN1Free(db);
  11575. break;
  11576. case 13:
  11577. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11578. return 0;
  11579. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11580. return 0;
  11581. if (!ASN1Dec_TerminalLabel(dd, &(val)->u.makeTerminalBroadcaster))
  11582. return 0;
  11583. ASN1_CloseDecoder(dd);
  11584. ASN1Free(db);
  11585. break;
  11586. case 14:
  11587. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11588. return 0;
  11589. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11590. return 0;
  11591. if (!ASN1Dec_TerminalLabel(dd, &(val)->u.sendThisSource))
  11592. return 0;
  11593. ASN1_CloseDecoder(dd);
  11594. ASN1Free(db);
  11595. break;
  11596. case 15:
  11597. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11598. return 0;
  11599. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11600. return 0;
  11601. ASN1_CloseDecoder(dd);
  11602. ASN1Free(db);
  11603. break;
  11604. case 16:
  11605. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11606. return 0;
  11607. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11608. return 0;
  11609. if (!ASN1Dec_RemoteMCRequest(dd, &(val)->u.remoteMCRequest))
  11610. return 0;
  11611. ASN1_CloseDecoder(dd);
  11612. ASN1Free(db);
  11613. break;
  11614. case 0:
  11615. /* extension case */
  11616. if (!ASN1PERDecSkipFragmented(dec, 8))
  11617. return 0;
  11618. break;
  11619. default:
  11620. /* impossible */
  11621. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  11622. return 0;
  11623. }
  11624. return 1;
  11625. }
  11626. static void ASN1CALL ASN1Free_ConferenceRequest(ConferenceRequest *val)
  11627. {
  11628. if (val) {
  11629. switch ((val)->choice) {
  11630. case 11:
  11631. ASN1Free_ConferenceRequest_requestTerminalCertificate(&(val)->u.requestTerminalCertificate);
  11632. break;
  11633. }
  11634. }
  11635. }
  11636. static int ASN1CALL ASN1Enc_CertSelectionCriteria(ASN1encoding_t enc, PCertSelectionCriteria *val)
  11637. {
  11638. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CertSelectionCriteria_ElmFn, 1, 16, 4);
  11639. }
  11640. static int ASN1CALL ASN1Enc_CertSelectionCriteria_ElmFn(ASN1encoding_t enc, PCertSelectionCriteria val)
  11641. {
  11642. if (!ASN1Enc_Criteria(enc, &val->value))
  11643. return 0;
  11644. return 1;
  11645. }
  11646. static int ASN1CALL ASN1Dec_CertSelectionCriteria(ASN1decoding_t dec, PCertSelectionCriteria *val)
  11647. {
  11648. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CertSelectionCriteria_ElmFn, sizeof(**val), 1, 16, 4);
  11649. }
  11650. static int ASN1CALL ASN1Dec_CertSelectionCriteria_ElmFn(ASN1decoding_t dec, PCertSelectionCriteria val)
  11651. {
  11652. if (!ASN1Dec_Criteria(dec, &val->value))
  11653. return 0;
  11654. return 1;
  11655. }
  11656. static void ASN1CALL ASN1Free_CertSelectionCriteria(PCertSelectionCriteria *val)
  11657. {
  11658. if (val) {
  11659. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CertSelectionCriteria_ElmFn);
  11660. }
  11661. }
  11662. static void ASN1CALL ASN1Free_CertSelectionCriteria_ElmFn(PCertSelectionCriteria val)
  11663. {
  11664. if (val) {
  11665. ASN1Free_Criteria(&val->value);
  11666. }
  11667. }
  11668. static int ASN1CALL ASN1Enc_ConferenceResponse(ASN1encoding_t enc, ConferenceResponse *val)
  11669. {
  11670. ASN1encoding_t ee;
  11671. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 8))
  11672. return 0;
  11673. switch ((val)->choice) {
  11674. case 1:
  11675. if (!ASN1Enc_ConferenceResponse_mCTerminalIDResponse(enc, &(val)->u.mCTerminalIDResponse))
  11676. return 0;
  11677. break;
  11678. case 2:
  11679. if (!ASN1Enc_ConferenceResponse_terminalIDResponse(enc, &(val)->u.terminalIDResponse))
  11680. return 0;
  11681. break;
  11682. case 3:
  11683. if (!ASN1Enc_ConferenceResponse_conferenceIDResponse(enc, &(val)->u.conferenceIDResponse))
  11684. return 0;
  11685. break;
  11686. case 4:
  11687. if (!ASN1Enc_ConferenceResponse_passwordResponse(enc, &(val)->u.passwordResponse))
  11688. return 0;
  11689. break;
  11690. case 5:
  11691. if (!ASN1Enc_ConferenceResponse_terminalListResponse(enc, &(val)->u.terminalListResponse))
  11692. return 0;
  11693. break;
  11694. case 6:
  11695. break;
  11696. case 7:
  11697. break;
  11698. case 8:
  11699. if (!ASN1Enc_ConferenceResponse_makeMeChairResponse(enc, &(val)->u.makeMeChairResponse))
  11700. return 0;
  11701. break;
  11702. case 9:
  11703. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11704. return 0;
  11705. if (!ASN1Enc_ConferenceResponse_extensionAddressResponse(ee, &(val)->u.extensionAddressResponse))
  11706. return 0;
  11707. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11708. return 0;
  11709. ASN1_CloseEncoder2(ee);
  11710. break;
  11711. case 10:
  11712. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11713. return 0;
  11714. if (!ASN1Enc_ConferenceResponse_chairTokenOwnerResponse(ee, &(val)->u.chairTokenOwnerResponse))
  11715. return 0;
  11716. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11717. return 0;
  11718. ASN1_CloseEncoder2(ee);
  11719. break;
  11720. case 11:
  11721. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11722. return 0;
  11723. if (!ASN1Enc_ConferenceResponse_terminalCertificateResponse(ee, &(val)->u.terminalCertificateResponse))
  11724. return 0;
  11725. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11726. return 0;
  11727. ASN1_CloseEncoder2(ee);
  11728. break;
  11729. case 12:
  11730. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11731. return 0;
  11732. if (!ASN1Enc_ConferenceResponse_broadcastMyLogicalChannelResponse(ee, &(val)->u.broadcastMyLogicalChannelResponse))
  11733. return 0;
  11734. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11735. return 0;
  11736. ASN1_CloseEncoder2(ee);
  11737. break;
  11738. case 13:
  11739. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11740. return 0;
  11741. if (!ASN1Enc_ConferenceResponse_makeTerminalBroadcasterResponse(ee, &(val)->u.makeTerminalBroadcasterResponse))
  11742. return 0;
  11743. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11744. return 0;
  11745. ASN1_CloseEncoder2(ee);
  11746. break;
  11747. case 14:
  11748. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11749. return 0;
  11750. if (!ASN1Enc_ConferenceResponse_sendThisSourceResponse(ee, &(val)->u.sendThisSourceResponse))
  11751. return 0;
  11752. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11753. return 0;
  11754. ASN1_CloseEncoder2(ee);
  11755. break;
  11756. case 15:
  11757. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11758. return 0;
  11759. if (!ASN1Enc_RequestAllTerminalIDsResponse(ee, &(val)->u.requestAllTerminalIDsResponse))
  11760. return 0;
  11761. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11762. return 0;
  11763. ASN1_CloseEncoder2(ee);
  11764. break;
  11765. case 16:
  11766. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11767. return 0;
  11768. if (!ASN1Enc_RemoteMCResponse(ee, &(val)->u.remoteMCResponse))
  11769. return 0;
  11770. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11771. return 0;
  11772. ASN1_CloseEncoder2(ee);
  11773. break;
  11774. default:
  11775. /* impossible */
  11776. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  11777. return 0;
  11778. }
  11779. return 1;
  11780. }
  11781. static int ASN1CALL ASN1Dec_ConferenceResponse(ASN1decoding_t dec, ConferenceResponse *val)
  11782. {
  11783. ASN1decoding_t dd;
  11784. ASN1octet_t *db;
  11785. ASN1uint32_t ds;
  11786. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 8))
  11787. return 0;
  11788. switch ((val)->choice) {
  11789. case 1:
  11790. if (!ASN1Dec_ConferenceResponse_mCTerminalIDResponse(dec, &(val)->u.mCTerminalIDResponse))
  11791. return 0;
  11792. break;
  11793. case 2:
  11794. if (!ASN1Dec_ConferenceResponse_terminalIDResponse(dec, &(val)->u.terminalIDResponse))
  11795. return 0;
  11796. break;
  11797. case 3:
  11798. if (!ASN1Dec_ConferenceResponse_conferenceIDResponse(dec, &(val)->u.conferenceIDResponse))
  11799. return 0;
  11800. break;
  11801. case 4:
  11802. if (!ASN1Dec_ConferenceResponse_passwordResponse(dec, &(val)->u.passwordResponse))
  11803. return 0;
  11804. break;
  11805. case 5:
  11806. if (!ASN1Dec_ConferenceResponse_terminalListResponse(dec, &(val)->u.terminalListResponse))
  11807. return 0;
  11808. break;
  11809. case 6:
  11810. break;
  11811. case 7:
  11812. break;
  11813. case 8:
  11814. if (!ASN1Dec_ConferenceResponse_makeMeChairResponse(dec, &(val)->u.makeMeChairResponse))
  11815. return 0;
  11816. break;
  11817. case 9:
  11818. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11819. return 0;
  11820. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11821. return 0;
  11822. if (!ASN1Dec_ConferenceResponse_extensionAddressResponse(dd, &(val)->u.extensionAddressResponse))
  11823. return 0;
  11824. ASN1_CloseDecoder(dd);
  11825. ASN1Free(db);
  11826. break;
  11827. case 10:
  11828. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11829. return 0;
  11830. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11831. return 0;
  11832. if (!ASN1Dec_ConferenceResponse_chairTokenOwnerResponse(dd, &(val)->u.chairTokenOwnerResponse))
  11833. return 0;
  11834. ASN1_CloseDecoder(dd);
  11835. ASN1Free(db);
  11836. break;
  11837. case 11:
  11838. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11839. return 0;
  11840. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11841. return 0;
  11842. if (!ASN1Dec_ConferenceResponse_terminalCertificateResponse(dd, &(val)->u.terminalCertificateResponse))
  11843. return 0;
  11844. ASN1_CloseDecoder(dd);
  11845. ASN1Free(db);
  11846. break;
  11847. case 12:
  11848. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11849. return 0;
  11850. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11851. return 0;
  11852. if (!ASN1Dec_ConferenceResponse_broadcastMyLogicalChannelResponse(dd, &(val)->u.broadcastMyLogicalChannelResponse))
  11853. return 0;
  11854. ASN1_CloseDecoder(dd);
  11855. ASN1Free(db);
  11856. break;
  11857. case 13:
  11858. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11859. return 0;
  11860. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11861. return 0;
  11862. if (!ASN1Dec_ConferenceResponse_makeTerminalBroadcasterResponse(dd, &(val)->u.makeTerminalBroadcasterResponse))
  11863. return 0;
  11864. ASN1_CloseDecoder(dd);
  11865. ASN1Free(db);
  11866. break;
  11867. case 14:
  11868. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11869. return 0;
  11870. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11871. return 0;
  11872. if (!ASN1Dec_ConferenceResponse_sendThisSourceResponse(dd, &(val)->u.sendThisSourceResponse))
  11873. return 0;
  11874. ASN1_CloseDecoder(dd);
  11875. ASN1Free(db);
  11876. break;
  11877. case 15:
  11878. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11879. return 0;
  11880. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11881. return 0;
  11882. if (!ASN1Dec_RequestAllTerminalIDsResponse(dd, &(val)->u.requestAllTerminalIDsResponse))
  11883. return 0;
  11884. ASN1_CloseDecoder(dd);
  11885. ASN1Free(db);
  11886. break;
  11887. case 16:
  11888. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11889. return 0;
  11890. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11891. return 0;
  11892. if (!ASN1Dec_RemoteMCResponse(dd, &(val)->u.remoteMCResponse))
  11893. return 0;
  11894. ASN1_CloseDecoder(dd);
  11895. ASN1Free(db);
  11896. break;
  11897. case 0:
  11898. /* extension case */
  11899. if (!ASN1PERDecSkipFragmented(dec, 8))
  11900. return 0;
  11901. break;
  11902. default:
  11903. /* impossible */
  11904. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  11905. return 0;
  11906. }
  11907. return 1;
  11908. }
  11909. static void ASN1CALL ASN1Free_ConferenceResponse(ConferenceResponse *val)
  11910. {
  11911. if (val) {
  11912. switch ((val)->choice) {
  11913. case 1:
  11914. ASN1Free_ConferenceResponse_mCTerminalIDResponse(&(val)->u.mCTerminalIDResponse);
  11915. break;
  11916. case 2:
  11917. ASN1Free_ConferenceResponse_terminalIDResponse(&(val)->u.terminalIDResponse);
  11918. break;
  11919. case 3:
  11920. ASN1Free_ConferenceResponse_conferenceIDResponse(&(val)->u.conferenceIDResponse);
  11921. break;
  11922. case 4:
  11923. ASN1Free_ConferenceResponse_passwordResponse(&(val)->u.passwordResponse);
  11924. break;
  11925. case 5:
  11926. ASN1Free_ConferenceResponse_terminalListResponse(&(val)->u.terminalListResponse);
  11927. break;
  11928. case 9:
  11929. ASN1Free_ConferenceResponse_extensionAddressResponse(&(val)->u.extensionAddressResponse);
  11930. break;
  11931. case 10:
  11932. ASN1Free_ConferenceResponse_chairTokenOwnerResponse(&(val)->u.chairTokenOwnerResponse);
  11933. break;
  11934. case 11:
  11935. ASN1Free_ConferenceResponse_terminalCertificateResponse(&(val)->u.terminalCertificateResponse);
  11936. break;
  11937. case 15:
  11938. ASN1Free_RequestAllTerminalIDsResponse(&(val)->u.requestAllTerminalIDsResponse);
  11939. break;
  11940. }
  11941. }
  11942. }
  11943. static int ASN1CALL ASN1Enc_EndSessionCommand(ASN1encoding_t enc, EndSessionCommand *val)
  11944. {
  11945. ASN1encoding_t ee;
  11946. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 2, 3))
  11947. return 0;
  11948. switch ((val)->choice) {
  11949. case 1:
  11950. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  11951. return 0;
  11952. break;
  11953. case 2:
  11954. break;
  11955. case 3:
  11956. if (!ASN1Enc_EndSessionCommand_gstnOptions(enc, &(val)->u.gstnOptions))
  11957. return 0;
  11958. break;
  11959. case 4:
  11960. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  11961. return 0;
  11962. if (!ASN1Enc_EndSessionCommand_isdnOptions(ee, &(val)->u.isdnOptions))
  11963. return 0;
  11964. if (!ASN1PEREncFlushFragmentedToParent(ee))
  11965. return 0;
  11966. ASN1_CloseEncoder2(ee);
  11967. break;
  11968. default:
  11969. /* impossible */
  11970. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  11971. return 0;
  11972. }
  11973. return 1;
  11974. }
  11975. static int ASN1CALL ASN1Dec_EndSessionCommand(ASN1decoding_t dec, EndSessionCommand *val)
  11976. {
  11977. ASN1decoding_t dd;
  11978. ASN1octet_t *db;
  11979. ASN1uint32_t ds;
  11980. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 2, 3))
  11981. return 0;
  11982. switch ((val)->choice) {
  11983. case 1:
  11984. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  11985. return 0;
  11986. break;
  11987. case 2:
  11988. break;
  11989. case 3:
  11990. if (!ASN1Dec_EndSessionCommand_gstnOptions(dec, &(val)->u.gstnOptions))
  11991. return 0;
  11992. break;
  11993. case 4:
  11994. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  11995. return 0;
  11996. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  11997. return 0;
  11998. if (!ASN1Dec_EndSessionCommand_isdnOptions(dd, &(val)->u.isdnOptions))
  11999. return 0;
  12000. ASN1_CloseDecoder(dd);
  12001. ASN1Free(db);
  12002. break;
  12003. case 0:
  12004. /* extension case */
  12005. if (!ASN1PERDecSkipFragmented(dec, 8))
  12006. return 0;
  12007. break;
  12008. default:
  12009. /* impossible */
  12010. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  12011. return 0;
  12012. }
  12013. return 1;
  12014. }
  12015. static void ASN1CALL ASN1Free_EndSessionCommand(EndSessionCommand *val)
  12016. {
  12017. if (val) {
  12018. switch ((val)->choice) {
  12019. case 1:
  12020. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  12021. break;
  12022. }
  12023. }
  12024. }
  12025. static int ASN1CALL ASN1Enc_ConferenceCommand(ASN1encoding_t enc, ConferenceCommand *val)
  12026. {
  12027. ASN1encoding_t ee;
  12028. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 7))
  12029. return 0;
  12030. switch ((val)->choice) {
  12031. case 1:
  12032. if (!ASN1PEREncUnsignedShort(enc, (val)->u.broadcastMyLogicalChannel - 1))
  12033. return 0;
  12034. break;
  12035. case 2:
  12036. if (!ASN1PEREncUnsignedShort(enc, (val)->u.cancelBroadcastMyLogicalChannel - 1))
  12037. return 0;
  12038. break;
  12039. case 3:
  12040. if (!ASN1Enc_TerminalLabel(enc, &(val)->u.makeTerminalBroadcaster))
  12041. return 0;
  12042. break;
  12043. case 4:
  12044. break;
  12045. case 5:
  12046. if (!ASN1Enc_TerminalLabel(enc, &(val)->u.sendThisSource))
  12047. return 0;
  12048. break;
  12049. case 6:
  12050. break;
  12051. case 7:
  12052. break;
  12053. case 8:
  12054. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12055. return 0;
  12056. if (!ASN1Enc_SubstituteConferenceIDCommand(ee, &(val)->u.substituteConferenceIDCommand))
  12057. return 0;
  12058. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12059. return 0;
  12060. ASN1_CloseEncoder2(ee);
  12061. break;
  12062. default:
  12063. /* impossible */
  12064. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  12065. return 0;
  12066. }
  12067. return 1;
  12068. }
  12069. static int ASN1CALL ASN1Dec_ConferenceCommand(ASN1decoding_t dec, ConferenceCommand *val)
  12070. {
  12071. ASN1decoding_t dd;
  12072. ASN1octet_t *db;
  12073. ASN1uint32_t ds;
  12074. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 7))
  12075. return 0;
  12076. switch ((val)->choice) {
  12077. case 1:
  12078. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.broadcastMyLogicalChannel))
  12079. return 0;
  12080. (val)->u.broadcastMyLogicalChannel += 1;
  12081. break;
  12082. case 2:
  12083. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.cancelBroadcastMyLogicalChannel))
  12084. return 0;
  12085. (val)->u.cancelBroadcastMyLogicalChannel += 1;
  12086. break;
  12087. case 3:
  12088. if (!ASN1Dec_TerminalLabel(dec, &(val)->u.makeTerminalBroadcaster))
  12089. return 0;
  12090. break;
  12091. case 4:
  12092. break;
  12093. case 5:
  12094. if (!ASN1Dec_TerminalLabel(dec, &(val)->u.sendThisSource))
  12095. return 0;
  12096. break;
  12097. case 6:
  12098. break;
  12099. case 7:
  12100. break;
  12101. case 8:
  12102. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12103. return 0;
  12104. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12105. return 0;
  12106. if (!ASN1Dec_SubstituteConferenceIDCommand(dd, &(val)->u.substituteConferenceIDCommand))
  12107. return 0;
  12108. ASN1_CloseDecoder(dd);
  12109. ASN1Free(db);
  12110. break;
  12111. case 0:
  12112. /* extension case */
  12113. if (!ASN1PERDecSkipFragmented(dec, 8))
  12114. return 0;
  12115. break;
  12116. default:
  12117. /* impossible */
  12118. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  12119. return 0;
  12120. }
  12121. return 1;
  12122. }
  12123. static void ASN1CALL ASN1Free_ConferenceCommand(ConferenceCommand *val)
  12124. {
  12125. if (val) {
  12126. switch ((val)->choice) {
  12127. case 8:
  12128. ASN1Free_SubstituteConferenceIDCommand(&(val)->u.substituteConferenceIDCommand);
  12129. break;
  12130. }
  12131. }
  12132. }
  12133. static int ASN1CALL ASN1Enc_UserInputIndication_userInputSupportIndication(ASN1encoding_t enc, UserInputIndication_userInputSupportIndication *val)
  12134. {
  12135. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  12136. return 0;
  12137. switch ((val)->choice) {
  12138. case 1:
  12139. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  12140. return 0;
  12141. break;
  12142. case 2:
  12143. break;
  12144. case 3:
  12145. break;
  12146. case 4:
  12147. break;
  12148. default:
  12149. /* impossible */
  12150. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  12151. return 0;
  12152. }
  12153. return 1;
  12154. }
  12155. static int ASN1CALL ASN1Dec_UserInputIndication_userInputSupportIndication(ASN1decoding_t dec, UserInputIndication_userInputSupportIndication *val)
  12156. {
  12157. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  12158. return 0;
  12159. switch ((val)->choice) {
  12160. case 1:
  12161. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  12162. return 0;
  12163. break;
  12164. case 2:
  12165. break;
  12166. case 3:
  12167. break;
  12168. case 4:
  12169. break;
  12170. case 0:
  12171. /* extension case */
  12172. if (!ASN1PERDecSkipFragmented(dec, 8))
  12173. return 0;
  12174. break;
  12175. default:
  12176. /* impossible */
  12177. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  12178. return 0;
  12179. }
  12180. return 1;
  12181. }
  12182. static void ASN1CALL ASN1Free_UserInputIndication_userInputSupportIndication(UserInputIndication_userInputSupportIndication *val)
  12183. {
  12184. if (val) {
  12185. switch ((val)->choice) {
  12186. case 1:
  12187. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  12188. break;
  12189. }
  12190. }
  12191. }
  12192. static int ASN1CALL ASN1Enc_MiscellaneousIndication_type(ASN1encoding_t enc, MiscellaneousIndication_type *val)
  12193. {
  12194. ASN1encoding_t ee;
  12195. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 10))
  12196. return 0;
  12197. switch ((val)->choice) {
  12198. case 1:
  12199. break;
  12200. case 2:
  12201. break;
  12202. case 3:
  12203. break;
  12204. case 4:
  12205. break;
  12206. case 5:
  12207. break;
  12208. case 6:
  12209. break;
  12210. case 7:
  12211. break;
  12212. case 8:
  12213. break;
  12214. case 9:
  12215. break;
  12216. case 10:
  12217. if (!ASN1PEREncBitVal(enc, 5, (val)->u.videoTemporalSpatialTradeOff))
  12218. return 0;
  12219. break;
  12220. case 11:
  12221. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12222. return 0;
  12223. if (!ASN1Enc_MiscellaneousIndication_type_videoNotDecodedMBs(ee, &(val)->u.videoNotDecodedMBs))
  12224. return 0;
  12225. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12226. return 0;
  12227. ASN1_CloseEncoder2(ee);
  12228. break;
  12229. case 12:
  12230. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12231. return 0;
  12232. if (!ASN1Enc_TransportCapability(ee, &(val)->u.transportCapability))
  12233. return 0;
  12234. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12235. return 0;
  12236. ASN1_CloseEncoder2(ee);
  12237. break;
  12238. default:
  12239. /* impossible */
  12240. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  12241. return 0;
  12242. }
  12243. return 1;
  12244. }
  12245. static int ASN1CALL ASN1Dec_MiscellaneousIndication_type(ASN1decoding_t dec, MiscellaneousIndication_type *val)
  12246. {
  12247. ASN1decoding_t dd;
  12248. ASN1octet_t *db;
  12249. ASN1uint32_t ds;
  12250. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 10))
  12251. return 0;
  12252. switch ((val)->choice) {
  12253. case 1:
  12254. break;
  12255. case 2:
  12256. break;
  12257. case 3:
  12258. break;
  12259. case 4:
  12260. break;
  12261. case 5:
  12262. break;
  12263. case 6:
  12264. break;
  12265. case 7:
  12266. break;
  12267. case 8:
  12268. break;
  12269. case 9:
  12270. break;
  12271. case 10:
  12272. if (!ASN1PERDecU16Val(dec, 5, &(val)->u.videoTemporalSpatialTradeOff))
  12273. return 0;
  12274. break;
  12275. case 11:
  12276. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12277. return 0;
  12278. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12279. return 0;
  12280. if (!ASN1Dec_MiscellaneousIndication_type_videoNotDecodedMBs(dd, &(val)->u.videoNotDecodedMBs))
  12281. return 0;
  12282. ASN1_CloseDecoder(dd);
  12283. ASN1Free(db);
  12284. break;
  12285. case 12:
  12286. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12287. return 0;
  12288. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12289. return 0;
  12290. if (!ASN1Dec_TransportCapability(dd, &(val)->u.transportCapability))
  12291. return 0;
  12292. ASN1_CloseDecoder(dd);
  12293. ASN1Free(db);
  12294. break;
  12295. case 0:
  12296. /* extension case */
  12297. if (!ASN1PERDecSkipFragmented(dec, 8))
  12298. return 0;
  12299. break;
  12300. default:
  12301. /* impossible */
  12302. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  12303. return 0;
  12304. }
  12305. return 1;
  12306. }
  12307. static void ASN1CALL ASN1Free_MiscellaneousIndication_type(MiscellaneousIndication_type *val)
  12308. {
  12309. if (val) {
  12310. switch ((val)->choice) {
  12311. case 12:
  12312. ASN1Free_TransportCapability(&(val)->u.transportCapability);
  12313. break;
  12314. }
  12315. }
  12316. }
  12317. static int ASN1CALL ASN1Enc_MiscellaneousCommand_type(ASN1encoding_t enc, MiscellaneousCommand_type *val)
  12318. {
  12319. ASN1encoding_t ee;
  12320. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 10))
  12321. return 0;
  12322. switch ((val)->choice) {
  12323. case 1:
  12324. break;
  12325. case 2:
  12326. break;
  12327. case 3:
  12328. break;
  12329. case 4:
  12330. break;
  12331. case 5:
  12332. break;
  12333. case 6:
  12334. break;
  12335. case 7:
  12336. if (!ASN1Enc_MiscellaneousCommand_type_videoFastUpdateGOB(enc, &(val)->u.videoFastUpdateGOB))
  12337. return 0;
  12338. break;
  12339. case 8:
  12340. if (!ASN1PEREncBitVal(enc, 5, (val)->u.videoTemporalSpatialTradeOff))
  12341. return 0;
  12342. break;
  12343. case 9:
  12344. break;
  12345. case 10:
  12346. break;
  12347. case 11:
  12348. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12349. return 0;
  12350. if (!ASN1Enc_MiscellaneousCommand_type_videoFastUpdateMB(ee, &(val)->u.videoFastUpdateMB))
  12351. return 0;
  12352. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12353. return 0;
  12354. ASN1_CloseEncoder2(ee);
  12355. break;
  12356. case 12:
  12357. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12358. return 0;
  12359. if (!ASN1PEREncUnsignedShort(ee, (val)->u.maxH223MUXPDUsize - 1))
  12360. return 0;
  12361. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12362. return 0;
  12363. ASN1_CloseEncoder2(ee);
  12364. break;
  12365. case 13:
  12366. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12367. return 0;
  12368. if (!ASN1Enc_EncryptionSync(ee, &(val)->u.encryptionUpdate))
  12369. return 0;
  12370. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12371. return 0;
  12372. ASN1_CloseEncoder2(ee);
  12373. break;
  12374. case 14:
  12375. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12376. return 0;
  12377. if (!ASN1Enc_EncryptionUpdateRequest(ee, &(val)->u.encryptionUpdateRequest))
  12378. return 0;
  12379. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12380. return 0;
  12381. ASN1_CloseEncoder2(ee);
  12382. break;
  12383. case 15:
  12384. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12385. return 0;
  12386. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12387. return 0;
  12388. ASN1_CloseEncoder2(ee);
  12389. break;
  12390. case 16:
  12391. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12392. return 0;
  12393. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12394. return 0;
  12395. ASN1_CloseEncoder2(ee);
  12396. break;
  12397. case 17:
  12398. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12399. return 0;
  12400. if (!ASN1Enc_MiscellaneousCommand_type_progressiveRefinementStart(ee, &(val)->u.progressiveRefinementStart))
  12401. return 0;
  12402. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12403. return 0;
  12404. ASN1_CloseEncoder2(ee);
  12405. break;
  12406. case 18:
  12407. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12408. return 0;
  12409. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12410. return 0;
  12411. ASN1_CloseEncoder2(ee);
  12412. break;
  12413. case 19:
  12414. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12415. return 0;
  12416. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12417. return 0;
  12418. ASN1_CloseEncoder2(ee);
  12419. break;
  12420. default:
  12421. /* impossible */
  12422. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  12423. return 0;
  12424. }
  12425. return 1;
  12426. }
  12427. static int ASN1CALL ASN1Dec_MiscellaneousCommand_type(ASN1decoding_t dec, MiscellaneousCommand_type *val)
  12428. {
  12429. ASN1decoding_t dd;
  12430. ASN1octet_t *db;
  12431. ASN1uint32_t ds;
  12432. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 10))
  12433. return 0;
  12434. switch ((val)->choice) {
  12435. case 1:
  12436. break;
  12437. case 2:
  12438. break;
  12439. case 3:
  12440. break;
  12441. case 4:
  12442. break;
  12443. case 5:
  12444. break;
  12445. case 6:
  12446. break;
  12447. case 7:
  12448. if (!ASN1Dec_MiscellaneousCommand_type_videoFastUpdateGOB(dec, &(val)->u.videoFastUpdateGOB))
  12449. return 0;
  12450. break;
  12451. case 8:
  12452. if (!ASN1PERDecU16Val(dec, 5, &(val)->u.videoTemporalSpatialTradeOff))
  12453. return 0;
  12454. break;
  12455. case 9:
  12456. break;
  12457. case 10:
  12458. break;
  12459. case 11:
  12460. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12461. return 0;
  12462. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12463. return 0;
  12464. if (!ASN1Dec_MiscellaneousCommand_type_videoFastUpdateMB(dd, &(val)->u.videoFastUpdateMB))
  12465. return 0;
  12466. ASN1_CloseDecoder(dd);
  12467. ASN1Free(db);
  12468. break;
  12469. case 12:
  12470. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12471. return 0;
  12472. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12473. return 0;
  12474. if (!ASN1PERDecUnsignedShort(dd, &(val)->u.maxH223MUXPDUsize))
  12475. return 0;
  12476. (val)->u.maxH223MUXPDUsize += 1;
  12477. ASN1_CloseDecoder(dd);
  12478. ASN1Free(db);
  12479. break;
  12480. case 13:
  12481. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12482. return 0;
  12483. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12484. return 0;
  12485. if (!ASN1Dec_EncryptionSync(dd, &(val)->u.encryptionUpdate))
  12486. return 0;
  12487. ASN1_CloseDecoder(dd);
  12488. ASN1Free(db);
  12489. break;
  12490. case 14:
  12491. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12492. return 0;
  12493. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12494. return 0;
  12495. if (!ASN1Dec_EncryptionUpdateRequest(dd, &(val)->u.encryptionUpdateRequest))
  12496. return 0;
  12497. ASN1_CloseDecoder(dd);
  12498. ASN1Free(db);
  12499. break;
  12500. case 15:
  12501. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12502. return 0;
  12503. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12504. return 0;
  12505. ASN1_CloseDecoder(dd);
  12506. ASN1Free(db);
  12507. break;
  12508. case 16:
  12509. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12510. return 0;
  12511. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12512. return 0;
  12513. ASN1_CloseDecoder(dd);
  12514. ASN1Free(db);
  12515. break;
  12516. case 17:
  12517. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12518. return 0;
  12519. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12520. return 0;
  12521. if (!ASN1Dec_MiscellaneousCommand_type_progressiveRefinementStart(dd, &(val)->u.progressiveRefinementStart))
  12522. return 0;
  12523. ASN1_CloseDecoder(dd);
  12524. ASN1Free(db);
  12525. break;
  12526. case 18:
  12527. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12528. return 0;
  12529. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12530. return 0;
  12531. ASN1_CloseDecoder(dd);
  12532. ASN1Free(db);
  12533. break;
  12534. case 19:
  12535. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12536. return 0;
  12537. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12538. return 0;
  12539. ASN1_CloseDecoder(dd);
  12540. ASN1Free(db);
  12541. break;
  12542. case 0:
  12543. /* extension case */
  12544. if (!ASN1PERDecSkipFragmented(dec, 8))
  12545. return 0;
  12546. break;
  12547. default:
  12548. /* impossible */
  12549. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  12550. return 0;
  12551. }
  12552. return 1;
  12553. }
  12554. static void ASN1CALL ASN1Free_MiscellaneousCommand_type(MiscellaneousCommand_type *val)
  12555. {
  12556. if (val) {
  12557. switch ((val)->choice) {
  12558. case 13:
  12559. ASN1Free_EncryptionSync(&(val)->u.encryptionUpdate);
  12560. break;
  12561. }
  12562. }
  12563. }
  12564. static int ASN1CALL ASN1Enc_EncryptionCommand_encryptionAlgorithmID(ASN1encoding_t enc, EncryptionCommand_encryptionAlgorithmID *val)
  12565. {
  12566. ASN1PEREncAlignment(enc);
  12567. if (!ASN1PEREncBitVal(enc, 8, (val)->h233AlgorithmIdentifier))
  12568. return 0;
  12569. if (!ASN1Enc_NonStandardParameter(enc, &(val)->associatedAlgorithm))
  12570. return 0;
  12571. return 1;
  12572. }
  12573. static int ASN1CALL ASN1Dec_EncryptionCommand_encryptionAlgorithmID(ASN1decoding_t dec, EncryptionCommand_encryptionAlgorithmID *val)
  12574. {
  12575. ASN1PERDecAlignment(dec);
  12576. if (!ASN1PERDecU16Val(dec, 8, &(val)->h233AlgorithmIdentifier))
  12577. return 0;
  12578. if (!ASN1Dec_NonStandardParameter(dec, &(val)->associatedAlgorithm))
  12579. return 0;
  12580. return 1;
  12581. }
  12582. static void ASN1CALL ASN1Free_EncryptionCommand_encryptionAlgorithmID(EncryptionCommand_encryptionAlgorithmID *val)
  12583. {
  12584. if (val) {
  12585. ASN1Free_NonStandardParameter(&(val)->associatedAlgorithm);
  12586. }
  12587. }
  12588. static int ASN1CALL ASN1Enc_CommunicationModeTableEntry_nonStandard(ASN1encoding_t enc, PCommunicationModeTableEntry_nonStandard *val)
  12589. {
  12590. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CommunicationModeTableEntry_nonStandard_ElmFn);
  12591. }
  12592. static int ASN1CALL ASN1Enc_CommunicationModeTableEntry_nonStandard_ElmFn(ASN1encoding_t enc, PCommunicationModeTableEntry_nonStandard val)
  12593. {
  12594. if (!ASN1Enc_NonStandardParameter(enc, &val->value))
  12595. return 0;
  12596. return 1;
  12597. }
  12598. static int ASN1CALL ASN1Dec_CommunicationModeTableEntry_nonStandard(ASN1decoding_t dec, PCommunicationModeTableEntry_nonStandard *val)
  12599. {
  12600. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CommunicationModeTableEntry_nonStandard_ElmFn, sizeof(**val));
  12601. }
  12602. static int ASN1CALL ASN1Dec_CommunicationModeTableEntry_nonStandard_ElmFn(ASN1decoding_t dec, PCommunicationModeTableEntry_nonStandard val)
  12603. {
  12604. if (!ASN1Dec_NonStandardParameter(dec, &val->value))
  12605. return 0;
  12606. return 1;
  12607. }
  12608. static void ASN1CALL ASN1Free_CommunicationModeTableEntry_nonStandard(PCommunicationModeTableEntry_nonStandard *val)
  12609. {
  12610. if (val) {
  12611. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CommunicationModeTableEntry_nonStandard_ElmFn);
  12612. }
  12613. }
  12614. static void ASN1CALL ASN1Free_CommunicationModeTableEntry_nonStandard_ElmFn(PCommunicationModeTableEntry_nonStandard val)
  12615. {
  12616. if (val) {
  12617. ASN1Free_NonStandardParameter(&val->value);
  12618. }
  12619. }
  12620. static int ASN1CALL ASN1Enc_RedundancyEncodingMode_secondaryEncoding(ASN1encoding_t enc, RedundancyEncodingMode_secondaryEncoding *val)
  12621. {
  12622. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  12623. return 0;
  12624. switch ((val)->choice) {
  12625. case 1:
  12626. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  12627. return 0;
  12628. break;
  12629. case 2:
  12630. if (!ASN1Enc_AudioMode(enc, &(val)->u.audioData))
  12631. return 0;
  12632. break;
  12633. default:
  12634. /* impossible */
  12635. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  12636. return 0;
  12637. }
  12638. return 1;
  12639. }
  12640. static int ASN1CALL ASN1Dec_RedundancyEncodingMode_secondaryEncoding(ASN1decoding_t dec, RedundancyEncodingMode_secondaryEncoding *val)
  12641. {
  12642. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  12643. return 0;
  12644. switch ((val)->choice) {
  12645. case 1:
  12646. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  12647. return 0;
  12648. break;
  12649. case 2:
  12650. if (!ASN1Dec_AudioMode(dec, &(val)->u.audioData))
  12651. return 0;
  12652. break;
  12653. case 0:
  12654. /* extension case */
  12655. if (!ASN1PERDecSkipFragmented(dec, 8))
  12656. return 0;
  12657. break;
  12658. default:
  12659. /* impossible */
  12660. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  12661. return 0;
  12662. }
  12663. return 1;
  12664. }
  12665. static void ASN1CALL ASN1Free_RedundancyEncodingMode_secondaryEncoding(RedundancyEncodingMode_secondaryEncoding *val)
  12666. {
  12667. if (val) {
  12668. switch ((val)->choice) {
  12669. case 1:
  12670. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  12671. break;
  12672. case 2:
  12673. ASN1Free_AudioMode(&(val)->u.audioData);
  12674. break;
  12675. }
  12676. }
  12677. }
  12678. static int ASN1CALL ASN1Enc_H223ModeParameters_adaptationLayerType(ASN1encoding_t enc, H223ModeParameters_adaptationLayerType *val)
  12679. {
  12680. ASN1encoding_t ee;
  12681. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 6))
  12682. return 0;
  12683. switch ((val)->choice) {
  12684. case 1:
  12685. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  12686. return 0;
  12687. break;
  12688. case 2:
  12689. break;
  12690. case 3:
  12691. break;
  12692. case 4:
  12693. break;
  12694. case 5:
  12695. break;
  12696. case 6:
  12697. if (!ASN1Enc_H223ModeParameters_adaptationLayerType_al3(enc, &(val)->u.al3))
  12698. return 0;
  12699. break;
  12700. case 7:
  12701. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12702. return 0;
  12703. if (!ASN1Enc_H223AL1MParameters(ee, &(val)->u.al1M))
  12704. return 0;
  12705. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12706. return 0;
  12707. ASN1_CloseEncoder2(ee);
  12708. break;
  12709. case 8:
  12710. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12711. return 0;
  12712. if (!ASN1Enc_H223AL2MParameters(ee, &(val)->u.al2M))
  12713. return 0;
  12714. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12715. return 0;
  12716. ASN1_CloseEncoder2(ee);
  12717. break;
  12718. case 9:
  12719. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  12720. return 0;
  12721. if (!ASN1Enc_H223AL3MParameters(ee, &(val)->u.al3M))
  12722. return 0;
  12723. if (!ASN1PEREncFlushFragmentedToParent(ee))
  12724. return 0;
  12725. ASN1_CloseEncoder2(ee);
  12726. break;
  12727. default:
  12728. /* impossible */
  12729. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  12730. return 0;
  12731. }
  12732. return 1;
  12733. }
  12734. static int ASN1CALL ASN1Dec_H223ModeParameters_adaptationLayerType(ASN1decoding_t dec, H223ModeParameters_adaptationLayerType *val)
  12735. {
  12736. ASN1decoding_t dd;
  12737. ASN1octet_t *db;
  12738. ASN1uint32_t ds;
  12739. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 6))
  12740. return 0;
  12741. switch ((val)->choice) {
  12742. case 1:
  12743. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  12744. return 0;
  12745. break;
  12746. case 2:
  12747. break;
  12748. case 3:
  12749. break;
  12750. case 4:
  12751. break;
  12752. case 5:
  12753. break;
  12754. case 6:
  12755. if (!ASN1Dec_H223ModeParameters_adaptationLayerType_al3(dec, &(val)->u.al3))
  12756. return 0;
  12757. break;
  12758. case 7:
  12759. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12760. return 0;
  12761. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12762. return 0;
  12763. if (!ASN1Dec_H223AL1MParameters(dd, &(val)->u.al1M))
  12764. return 0;
  12765. ASN1_CloseDecoder(dd);
  12766. ASN1Free(db);
  12767. break;
  12768. case 8:
  12769. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12770. return 0;
  12771. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12772. return 0;
  12773. if (!ASN1Dec_H223AL2MParameters(dd, &(val)->u.al2M))
  12774. return 0;
  12775. ASN1_CloseDecoder(dd);
  12776. ASN1Free(db);
  12777. break;
  12778. case 9:
  12779. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  12780. return 0;
  12781. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  12782. return 0;
  12783. if (!ASN1Dec_H223AL3MParameters(dd, &(val)->u.al3M))
  12784. return 0;
  12785. ASN1_CloseDecoder(dd);
  12786. ASN1Free(db);
  12787. break;
  12788. case 0:
  12789. /* extension case */
  12790. if (!ASN1PERDecSkipFragmented(dec, 8))
  12791. return 0;
  12792. break;
  12793. default:
  12794. /* impossible */
  12795. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  12796. return 0;
  12797. }
  12798. return 1;
  12799. }
  12800. static void ASN1CALL ASN1Free_H223ModeParameters_adaptationLayerType(H223ModeParameters_adaptationLayerType *val)
  12801. {
  12802. if (val) {
  12803. switch ((val)->choice) {
  12804. case 1:
  12805. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  12806. break;
  12807. }
  12808. }
  12809. }
  12810. static int ASN1CALL ASN1Enc_MultiplexEntrySend_multiplexEntryDescriptors(ASN1encoding_t enc, PMultiplexEntrySend_multiplexEntryDescriptors *val)
  12811. {
  12812. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_MultiplexEntrySend_multiplexEntryDescriptors_ElmFn, 1, 15, 4);
  12813. }
  12814. static int ASN1CALL ASN1Enc_MultiplexEntrySend_multiplexEntryDescriptors_ElmFn(ASN1encoding_t enc, PMultiplexEntrySend_multiplexEntryDescriptors val)
  12815. {
  12816. if (!ASN1Enc_MultiplexEntryDescriptor(enc, &val->value))
  12817. return 0;
  12818. return 1;
  12819. }
  12820. static int ASN1CALL ASN1Dec_MultiplexEntrySend_multiplexEntryDescriptors(ASN1decoding_t dec, PMultiplexEntrySend_multiplexEntryDescriptors *val)
  12821. {
  12822. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_MultiplexEntrySend_multiplexEntryDescriptors_ElmFn, sizeof(**val), 1, 15, 4);
  12823. }
  12824. static int ASN1CALL ASN1Dec_MultiplexEntrySend_multiplexEntryDescriptors_ElmFn(ASN1decoding_t dec, PMultiplexEntrySend_multiplexEntryDescriptors val)
  12825. {
  12826. if (!ASN1Dec_MultiplexEntryDescriptor(dec, &val->value))
  12827. return 0;
  12828. return 1;
  12829. }
  12830. static void ASN1CALL ASN1Free_MultiplexEntrySend_multiplexEntryDescriptors(PMultiplexEntrySend_multiplexEntryDescriptors *val)
  12831. {
  12832. if (val) {
  12833. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_MultiplexEntrySend_multiplexEntryDescriptors_ElmFn);
  12834. }
  12835. }
  12836. static void ASN1CALL ASN1Free_MultiplexEntrySend_multiplexEntryDescriptors_ElmFn(PMultiplexEntrySend_multiplexEntryDescriptors val)
  12837. {
  12838. if (val) {
  12839. ASN1Free_MultiplexEntryDescriptor(&val->value);
  12840. }
  12841. }
  12842. static int ASN1CALL ASN1Enc_H2250LogicalChannelAckParameters_nonStandard(ASN1encoding_t enc, PH2250LogicalChannelAckParameters_nonStandard *val)
  12843. {
  12844. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_H2250LogicalChannelAckParameters_nonStandard_ElmFn);
  12845. }
  12846. static int ASN1CALL ASN1Enc_H2250LogicalChannelAckParameters_nonStandard_ElmFn(ASN1encoding_t enc, PH2250LogicalChannelAckParameters_nonStandard val)
  12847. {
  12848. if (!ASN1Enc_NonStandardParameter(enc, &val->value))
  12849. return 0;
  12850. return 1;
  12851. }
  12852. static int ASN1CALL ASN1Dec_H2250LogicalChannelAckParameters_nonStandard(ASN1decoding_t dec, PH2250LogicalChannelAckParameters_nonStandard *val)
  12853. {
  12854. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_H2250LogicalChannelAckParameters_nonStandard_ElmFn, sizeof(**val));
  12855. }
  12856. static int ASN1CALL ASN1Dec_H2250LogicalChannelAckParameters_nonStandard_ElmFn(ASN1decoding_t dec, PH2250LogicalChannelAckParameters_nonStandard val)
  12857. {
  12858. if (!ASN1Dec_NonStandardParameter(dec, &val->value))
  12859. return 0;
  12860. return 1;
  12861. }
  12862. static void ASN1CALL ASN1Free_H2250LogicalChannelAckParameters_nonStandard(PH2250LogicalChannelAckParameters_nonStandard *val)
  12863. {
  12864. if (val) {
  12865. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_H2250LogicalChannelAckParameters_nonStandard_ElmFn);
  12866. }
  12867. }
  12868. static void ASN1CALL ASN1Free_H2250LogicalChannelAckParameters_nonStandard_ElmFn(PH2250LogicalChannelAckParameters_nonStandard val)
  12869. {
  12870. if (val) {
  12871. ASN1Free_NonStandardParameter(&val->value);
  12872. }
  12873. }
  12874. static int ASN1CALL ASN1Enc_RTPPayloadType_payloadDescriptor(ASN1encoding_t enc, RTPPayloadType_payloadDescriptor *val)
  12875. {
  12876. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  12877. return 0;
  12878. switch ((val)->choice) {
  12879. case 1:
  12880. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandardIdentifier))
  12881. return 0;
  12882. break;
  12883. case 2:
  12884. if (!ASN1PEREncExtensionBitClear(enc))
  12885. return 0;
  12886. if (!ASN1PEREncUnsignedShort(enc, (val)->u.rfc_number - 1))
  12887. return 0;
  12888. break;
  12889. case 3:
  12890. if (!ASN1PEREncObjectIdentifier(enc, &(val)->u.oid))
  12891. return 0;
  12892. break;
  12893. default:
  12894. /* impossible */
  12895. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  12896. return 0;
  12897. }
  12898. return 1;
  12899. }
  12900. static int ASN1CALL ASN1Dec_RTPPayloadType_payloadDescriptor(ASN1decoding_t dec, RTPPayloadType_payloadDescriptor *val)
  12901. {
  12902. ASN1uint32_t x;
  12903. ASN1uint32_t l;
  12904. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  12905. return 0;
  12906. switch ((val)->choice) {
  12907. case 1:
  12908. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandardIdentifier))
  12909. return 0;
  12910. break;
  12911. case 2:
  12912. if (!ASN1PERDecExtensionBit(dec, &x))
  12913. return 0;
  12914. if (!x) {
  12915. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.rfc_number))
  12916. return 0;
  12917. (val)->u.rfc_number += 1;
  12918. } else {
  12919. ASN1PERDecAlignment(dec);
  12920. if (!ASN1PERDecFragmentedLength(dec, &l))
  12921. return 0;
  12922. if (!ASN1PERDecSkipBits(dec, l * 8))
  12923. return 0;
  12924. }
  12925. break;
  12926. case 3:
  12927. if (!ASN1PERDecObjectIdentifier(dec, &(val)->u.oid))
  12928. return 0;
  12929. break;
  12930. case 0:
  12931. /* extension case */
  12932. if (!ASN1PERDecSkipFragmented(dec, 8))
  12933. return 0;
  12934. break;
  12935. default:
  12936. /* impossible */
  12937. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  12938. return 0;
  12939. }
  12940. return 1;
  12941. }
  12942. static void ASN1CALL ASN1Free_RTPPayloadType_payloadDescriptor(RTPPayloadType_payloadDescriptor *val)
  12943. {
  12944. if (val) {
  12945. switch ((val)->choice) {
  12946. case 1:
  12947. ASN1Free_NonStandardParameter(&(val)->u.nonStandardIdentifier);
  12948. break;
  12949. case 3:
  12950. ASN1objectidentifier_free(&(val)->u.oid);
  12951. break;
  12952. }
  12953. }
  12954. }
  12955. static int ASN1CALL ASN1Enc_H2250LogicalChannelParameters_nonStandard(ASN1encoding_t enc, PH2250LogicalChannelParameters_nonStandard *val)
  12956. {
  12957. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_H2250LogicalChannelParameters_nonStandard_ElmFn);
  12958. }
  12959. static int ASN1CALL ASN1Enc_H2250LogicalChannelParameters_nonStandard_ElmFn(ASN1encoding_t enc, PH2250LogicalChannelParameters_nonStandard val)
  12960. {
  12961. if (!ASN1Enc_NonStandardParameter(enc, &val->value))
  12962. return 0;
  12963. return 1;
  12964. }
  12965. static int ASN1CALL ASN1Dec_H2250LogicalChannelParameters_nonStandard(ASN1decoding_t dec, PH2250LogicalChannelParameters_nonStandard *val)
  12966. {
  12967. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_H2250LogicalChannelParameters_nonStandard_ElmFn, sizeof(**val));
  12968. }
  12969. static int ASN1CALL ASN1Dec_H2250LogicalChannelParameters_nonStandard_ElmFn(ASN1decoding_t dec, PH2250LogicalChannelParameters_nonStandard val)
  12970. {
  12971. if (!ASN1Dec_NonStandardParameter(dec, &val->value))
  12972. return 0;
  12973. return 1;
  12974. }
  12975. static void ASN1CALL ASN1Free_H2250LogicalChannelParameters_nonStandard(PH2250LogicalChannelParameters_nonStandard *val)
  12976. {
  12977. if (val) {
  12978. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_H2250LogicalChannelParameters_nonStandard_ElmFn);
  12979. }
  12980. }
  12981. static void ASN1CALL ASN1Free_H2250LogicalChannelParameters_nonStandard_ElmFn(PH2250LogicalChannelParameters_nonStandard val)
  12982. {
  12983. if (val) {
  12984. ASN1Free_NonStandardParameter(&val->value);
  12985. }
  12986. }
  12987. static int ASN1CALL ASN1Enc_H223LogicalChannelParameters_adaptationLayerType(ASN1encoding_t enc, H223LogicalChannelParameters_adaptationLayerType *val)
  12988. {
  12989. ASN1encoding_t ee;
  12990. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 6))
  12991. return 0;
  12992. switch ((val)->choice) {
  12993. case 1:
  12994. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  12995. return 0;
  12996. break;
  12997. case 2:
  12998. break;
  12999. case 3:
  13000. break;
  13001. case 4:
  13002. break;
  13003. case 5:
  13004. break;
  13005. case 6:
  13006. if (!ASN1Enc_H223LogicalChannelParameters_adaptationLayerType_al3(enc, &(val)->u.al3))
  13007. return 0;
  13008. break;
  13009. case 7:
  13010. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  13011. return 0;
  13012. if (!ASN1Enc_H223AL1MParameters(ee, &(val)->u.al1M))
  13013. return 0;
  13014. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13015. return 0;
  13016. ASN1_CloseEncoder2(ee);
  13017. break;
  13018. case 8:
  13019. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  13020. return 0;
  13021. if (!ASN1Enc_H223AL2MParameters(ee, &(val)->u.al2M))
  13022. return 0;
  13023. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13024. return 0;
  13025. ASN1_CloseEncoder2(ee);
  13026. break;
  13027. case 9:
  13028. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  13029. return 0;
  13030. if (!ASN1Enc_H223AL3MParameters(ee, &(val)->u.al3M))
  13031. return 0;
  13032. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13033. return 0;
  13034. ASN1_CloseEncoder2(ee);
  13035. break;
  13036. default:
  13037. /* impossible */
  13038. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  13039. return 0;
  13040. }
  13041. return 1;
  13042. }
  13043. static int ASN1CALL ASN1Dec_H223LogicalChannelParameters_adaptationLayerType(ASN1decoding_t dec, H223LogicalChannelParameters_adaptationLayerType *val)
  13044. {
  13045. ASN1decoding_t dd;
  13046. ASN1octet_t *db;
  13047. ASN1uint32_t ds;
  13048. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 6))
  13049. return 0;
  13050. switch ((val)->choice) {
  13051. case 1:
  13052. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  13053. return 0;
  13054. break;
  13055. case 2:
  13056. break;
  13057. case 3:
  13058. break;
  13059. case 4:
  13060. break;
  13061. case 5:
  13062. break;
  13063. case 6:
  13064. if (!ASN1Dec_H223LogicalChannelParameters_adaptationLayerType_al3(dec, &(val)->u.al3))
  13065. return 0;
  13066. break;
  13067. case 7:
  13068. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13069. return 0;
  13070. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13071. return 0;
  13072. if (!ASN1Dec_H223AL1MParameters(dd, &(val)->u.al1M))
  13073. return 0;
  13074. ASN1_CloseDecoder(dd);
  13075. ASN1Free(db);
  13076. break;
  13077. case 8:
  13078. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13079. return 0;
  13080. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13081. return 0;
  13082. if (!ASN1Dec_H223AL2MParameters(dd, &(val)->u.al2M))
  13083. return 0;
  13084. ASN1_CloseDecoder(dd);
  13085. ASN1Free(db);
  13086. break;
  13087. case 9:
  13088. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13089. return 0;
  13090. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13091. return 0;
  13092. if (!ASN1Dec_H223AL3MParameters(dd, &(val)->u.al3M))
  13093. return 0;
  13094. ASN1_CloseDecoder(dd);
  13095. ASN1Free(db);
  13096. break;
  13097. case 0:
  13098. /* extension case */
  13099. if (!ASN1PERDecSkipFragmented(dec, 8))
  13100. return 0;
  13101. break;
  13102. default:
  13103. /* impossible */
  13104. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  13105. return 0;
  13106. }
  13107. return 1;
  13108. }
  13109. static void ASN1CALL ASN1Free_H223LogicalChannelParameters_adaptationLayerType(H223LogicalChannelParameters_adaptationLayerType *val)
  13110. {
  13111. if (val) {
  13112. switch ((val)->choice) {
  13113. case 1:
  13114. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  13115. break;
  13116. }
  13117. }
  13118. }
  13119. static int ASN1CALL ASN1Enc_ConferenceCapability_nonStandardData(ASN1encoding_t enc, PConferenceCapability_nonStandardData *val)
  13120. {
  13121. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_ConferenceCapability_nonStandardData_ElmFn);
  13122. }
  13123. static int ASN1CALL ASN1Enc_ConferenceCapability_nonStandardData_ElmFn(ASN1encoding_t enc, PConferenceCapability_nonStandardData val)
  13124. {
  13125. if (!ASN1Enc_NonStandardParameter(enc, &val->value))
  13126. return 0;
  13127. return 1;
  13128. }
  13129. static int ASN1CALL ASN1Dec_ConferenceCapability_nonStandardData(ASN1decoding_t dec, PConferenceCapability_nonStandardData *val)
  13130. {
  13131. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_ConferenceCapability_nonStandardData_ElmFn, sizeof(**val));
  13132. }
  13133. static int ASN1CALL ASN1Dec_ConferenceCapability_nonStandardData_ElmFn(ASN1decoding_t dec, PConferenceCapability_nonStandardData val)
  13134. {
  13135. if (!ASN1Dec_NonStandardParameter(dec, &val->value))
  13136. return 0;
  13137. return 1;
  13138. }
  13139. static void ASN1CALL ASN1Free_ConferenceCapability_nonStandardData(PConferenceCapability_nonStandardData *val)
  13140. {
  13141. if (val) {
  13142. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_ConferenceCapability_nonStandardData_ElmFn);
  13143. }
  13144. }
  13145. static void ASN1CALL ASN1Free_ConferenceCapability_nonStandardData_ElmFn(PConferenceCapability_nonStandardData val)
  13146. {
  13147. if (val) {
  13148. ASN1Free_NonStandardParameter(&val->value);
  13149. }
  13150. }
  13151. static int ASN1CALL ASN1Enc_UserInputCapability_nonStandard(ASN1encoding_t enc, UserInputCapability_nonStandard *val)
  13152. {
  13153. ASN1uint32_t i;
  13154. if (!ASN1PEREncBitVal(enc, 4, (val)->count - 1))
  13155. return 0;
  13156. for (i = 0; i < (val)->count; i++) {
  13157. if (!ASN1Enc_NonStandardParameter(enc, &((val)->value)[i]))
  13158. return 0;
  13159. }
  13160. return 1;
  13161. }
  13162. static int ASN1CALL ASN1Dec_UserInputCapability_nonStandard(ASN1decoding_t dec, UserInputCapability_nonStandard *val)
  13163. {
  13164. ASN1uint32_t i;
  13165. if (!ASN1PERDecU32Val(dec, 4, &(val)->count))
  13166. return 0;
  13167. (val)->count += 1;
  13168. for (i = 0; i < (val)->count; i++) {
  13169. if (!ASN1Dec_NonStandardParameter(dec, &((val)->value)[i]))
  13170. return 0;
  13171. }
  13172. return 1;
  13173. }
  13174. static void ASN1CALL ASN1Free_UserInputCapability_nonStandard(UserInputCapability_nonStandard *val)
  13175. {
  13176. ASN1uint32_t i;
  13177. if (val) {
  13178. for (i = 0; i < (val)->count; i++) {
  13179. ASN1Free_NonStandardParameter(&(val)->value[i]);
  13180. }
  13181. }
  13182. }
  13183. static int ASN1CALL ASN1Enc_DataProtocolCapability_v76wCompression(ASN1encoding_t enc, DataProtocolCapability_v76wCompression *val)
  13184. {
  13185. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  13186. return 0;
  13187. switch ((val)->choice) {
  13188. case 1:
  13189. if (!ASN1Enc_CompressionType(enc, &(val)->u.transmitCompression))
  13190. return 0;
  13191. break;
  13192. case 2:
  13193. if (!ASN1Enc_CompressionType(enc, &(val)->u.receiveCompression))
  13194. return 0;
  13195. break;
  13196. case 3:
  13197. if (!ASN1Enc_CompressionType(enc, &(val)->u.transmitAndReceiveCompression))
  13198. return 0;
  13199. break;
  13200. default:
  13201. /* impossible */
  13202. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  13203. return 0;
  13204. }
  13205. return 1;
  13206. }
  13207. static int ASN1CALL ASN1Dec_DataProtocolCapability_v76wCompression(ASN1decoding_t dec, DataProtocolCapability_v76wCompression *val)
  13208. {
  13209. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  13210. return 0;
  13211. switch ((val)->choice) {
  13212. case 1:
  13213. if (!ASN1Dec_CompressionType(dec, &(val)->u.transmitCompression))
  13214. return 0;
  13215. break;
  13216. case 2:
  13217. if (!ASN1Dec_CompressionType(dec, &(val)->u.receiveCompression))
  13218. return 0;
  13219. break;
  13220. case 3:
  13221. if (!ASN1Dec_CompressionType(dec, &(val)->u.transmitAndReceiveCompression))
  13222. return 0;
  13223. break;
  13224. case 0:
  13225. /* extension case */
  13226. if (!ASN1PERDecSkipFragmented(dec, 8))
  13227. return 0;
  13228. break;
  13229. default:
  13230. /* impossible */
  13231. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  13232. return 0;
  13233. }
  13234. return 1;
  13235. }
  13236. static int ASN1CALL ASN1Enc_H263Options_modeCombos(ASN1encoding_t enc, PH263Options_modeCombos *val)
  13237. {
  13238. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_H263Options_modeCombos_ElmFn, 1, 16, 4);
  13239. }
  13240. static int ASN1CALL ASN1Enc_H263Options_modeCombos_ElmFn(ASN1encoding_t enc, PH263Options_modeCombos val)
  13241. {
  13242. if (!ASN1Enc_H263VideoModeCombos(enc, &val->value))
  13243. return 0;
  13244. return 1;
  13245. }
  13246. static int ASN1CALL ASN1Dec_H263Options_modeCombos(ASN1decoding_t dec, PH263Options_modeCombos *val)
  13247. {
  13248. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_H263Options_modeCombos_ElmFn, sizeof(**val), 1, 16, 4);
  13249. }
  13250. static int ASN1CALL ASN1Dec_H263Options_modeCombos_ElmFn(ASN1decoding_t dec, PH263Options_modeCombos val)
  13251. {
  13252. if (!ASN1Dec_H263VideoModeCombos(dec, &val->value))
  13253. return 0;
  13254. return 1;
  13255. }
  13256. static void ASN1CALL ASN1Free_H263Options_modeCombos(PH263Options_modeCombos *val)
  13257. {
  13258. if (val) {
  13259. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_H263Options_modeCombos_ElmFn);
  13260. }
  13261. }
  13262. static void ASN1CALL ASN1Free_H263Options_modeCombos_ElmFn(PH263Options_modeCombos val)
  13263. {
  13264. if (val) {
  13265. ASN1Free_H263VideoModeCombos(&val->value);
  13266. }
  13267. }
  13268. static int ASN1CALL ASN1Enc_TransportCapability_qOSCapabilities(ASN1encoding_t enc, PTransportCapability_qOSCapabilities *val)
  13269. {
  13270. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_TransportCapability_qOSCapabilities_ElmFn, 1, 256, 8);
  13271. }
  13272. static int ASN1CALL ASN1Enc_TransportCapability_qOSCapabilities_ElmFn(ASN1encoding_t enc, PTransportCapability_qOSCapabilities val)
  13273. {
  13274. if (!ASN1Enc_QOSCapability(enc, &val->value))
  13275. return 0;
  13276. return 1;
  13277. }
  13278. static int ASN1CALL ASN1Dec_TransportCapability_qOSCapabilities(ASN1decoding_t dec, PTransportCapability_qOSCapabilities *val)
  13279. {
  13280. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_TransportCapability_qOSCapabilities_ElmFn, sizeof(**val), 1, 256, 8);
  13281. }
  13282. static int ASN1CALL ASN1Dec_TransportCapability_qOSCapabilities_ElmFn(ASN1decoding_t dec, PTransportCapability_qOSCapabilities val)
  13283. {
  13284. if (!ASN1Dec_QOSCapability(dec, &val->value))
  13285. return 0;
  13286. return 1;
  13287. }
  13288. static void ASN1CALL ASN1Free_TransportCapability_qOSCapabilities(PTransportCapability_qOSCapabilities *val)
  13289. {
  13290. if (val) {
  13291. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_TransportCapability_qOSCapabilities_ElmFn);
  13292. }
  13293. }
  13294. static void ASN1CALL ASN1Free_TransportCapability_qOSCapabilities_ElmFn(PTransportCapability_qOSCapabilities val)
  13295. {
  13296. if (val) {
  13297. ASN1Free_QOSCapability(&val->value);
  13298. }
  13299. }
  13300. static int ASN1CALL ASN1Enc_NonStandardMessage(ASN1encoding_t enc, NonStandardMessage *val)
  13301. {
  13302. if (!ASN1PEREncExtensionBitClear(enc))
  13303. return 0;
  13304. if (!ASN1Enc_NonStandardParameter(enc, &(val)->nonStandardData))
  13305. return 0;
  13306. return 1;
  13307. }
  13308. static int ASN1CALL ASN1Dec_NonStandardMessage(ASN1decoding_t dec, NonStandardMessage *val)
  13309. {
  13310. ASN1uint32_t y;
  13311. if (!ASN1PERDecExtensionBit(dec, &y))
  13312. return 0;
  13313. if (!ASN1Dec_NonStandardParameter(dec, &(val)->nonStandardData))
  13314. return 0;
  13315. if (y) {
  13316. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  13317. return 0;
  13318. }
  13319. return 1;
  13320. }
  13321. static void ASN1CALL ASN1Free_NonStandardMessage(NonStandardMessage *val)
  13322. {
  13323. if (val) {
  13324. ASN1Free_NonStandardParameter(&(val)->nonStandardData);
  13325. }
  13326. }
  13327. static int ASN1CALL ASN1Enc_RedundancyEncodingCapability(ASN1encoding_t enc, RedundancyEncodingCapability *val)
  13328. {
  13329. if (!ASN1PEREncExtensionBitClear(enc))
  13330. return 0;
  13331. if (!ASN1PEREncBits(enc, 1, (val)->o))
  13332. return 0;
  13333. if (!ASN1Enc_RedundancyEncodingMethod(enc, &(val)->redundancyEncodingMethod))
  13334. return 0;
  13335. if (!ASN1PEREncUnsignedShort(enc, (val)->primaryEncoding - 1))
  13336. return 0;
  13337. if ((val)->o[0] & 0x80) {
  13338. if (!ASN1Enc_RedundancyEncodingCapability_secondaryEncoding(enc, &(val)->secondaryEncoding))
  13339. return 0;
  13340. }
  13341. return 1;
  13342. }
  13343. static int ASN1CALL ASN1Dec_RedundancyEncodingCapability(ASN1decoding_t dec, RedundancyEncodingCapability *val)
  13344. {
  13345. ASN1uint32_t y;
  13346. if (!ASN1PERDecExtensionBit(dec, &y))
  13347. return 0;
  13348. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  13349. return 0;
  13350. if (!ASN1Dec_RedundancyEncodingMethod(dec, &(val)->redundancyEncodingMethod))
  13351. return 0;
  13352. if (!ASN1PERDecUnsignedShort(dec, &(val)->primaryEncoding))
  13353. return 0;
  13354. (val)->primaryEncoding += 1;
  13355. if ((val)->o[0] & 0x80) {
  13356. if (!ASN1Dec_RedundancyEncodingCapability_secondaryEncoding(dec, &(val)->secondaryEncoding))
  13357. return 0;
  13358. }
  13359. if (y) {
  13360. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  13361. return 0;
  13362. }
  13363. return 1;
  13364. }
  13365. static void ASN1CALL ASN1Free_RedundancyEncodingCapability(RedundancyEncodingCapability *val)
  13366. {
  13367. if (val) {
  13368. ASN1Free_RedundancyEncodingMethod(&(val)->redundancyEncodingMethod);
  13369. if ((val)->o[0] & 0x80) {
  13370. ASN1Free_RedundancyEncodingCapability_secondaryEncoding(&(val)->secondaryEncoding);
  13371. }
  13372. }
  13373. }
  13374. static int ASN1CALL ASN1Enc_H263VideoCapability(ASN1encoding_t enc, H263VideoCapability *val)
  13375. {
  13376. ASN1octet_t o[2];
  13377. ASN1uint32_t y;
  13378. ASN1uint32_t l;
  13379. ASN1encoding_t ee;
  13380. CopyMemory(o, (val)->o, 2);
  13381. o[1] |= 0x4;
  13382. y = ASN1PEREncCheckExtensions(8, (val)->o + 1);
  13383. if (!ASN1PEREncBitVal(enc, 1, y))
  13384. return 0;
  13385. if (!ASN1PEREncBits(enc, 7, o))
  13386. return 0;
  13387. if (o[0] & 0x80) {
  13388. if (!ASN1PEREncBitVal(enc, 5, (val)->sqcifMPI - 1))
  13389. return 0;
  13390. }
  13391. if (o[0] & 0x40) {
  13392. if (!ASN1PEREncBitVal(enc, 5, (val)->qcifMPI - 1))
  13393. return 0;
  13394. }
  13395. if (o[0] & 0x20) {
  13396. if (!ASN1PEREncBitVal(enc, 5, (val)->cifMPI - 1))
  13397. return 0;
  13398. }
  13399. if (o[0] & 0x10) {
  13400. if (!ASN1PEREncBitVal(enc, 5, (val)->cif4MPI - 1))
  13401. return 0;
  13402. }
  13403. if (o[0] & 0x8) {
  13404. if (!ASN1PEREncBitVal(enc, 5, (val)->cif16MPI - 1))
  13405. return 0;
  13406. }
  13407. l = ASN1uint32_uoctets((val)->maxBitRate - 1);
  13408. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  13409. return 0;
  13410. ASN1PEREncAlignment(enc);
  13411. if (!ASN1PEREncBitVal(enc, l * 8, (val)->maxBitRate - 1))
  13412. return 0;
  13413. if (!ASN1PEREncBoolean(enc, (val)->unrestrictedVector))
  13414. return 0;
  13415. if (!ASN1PEREncBoolean(enc, (val)->arithmeticCoding))
  13416. return 0;
  13417. if (!ASN1PEREncBoolean(enc, (val)->advancedPrediction))
  13418. return 0;
  13419. if (!ASN1PEREncBoolean(enc, (val)->pbFrames))
  13420. return 0;
  13421. if (!ASN1PEREncBoolean(enc, (val)->temporalSpatialTradeOffCapability))
  13422. return 0;
  13423. if (o[0] & 0x4) {
  13424. l = ASN1uint32_uoctets((val)->hrd_B);
  13425. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  13426. return 0;
  13427. ASN1PEREncAlignment(enc);
  13428. if (!ASN1PEREncBitVal(enc, l * 8, (val)->hrd_B))
  13429. return 0;
  13430. }
  13431. if (o[0] & 0x2) {
  13432. if (!ASN1PEREncUnsignedShort(enc, (val)->bppMaxKb))
  13433. return 0;
  13434. }
  13435. if (y) {
  13436. if (!ASN1PEREncNormallySmallBits(enc, 8, o + 1))
  13437. return 0;
  13438. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  13439. return 0;
  13440. if (o[1] & 0x80) {
  13441. if (!ASN1PEREncUnsignedShort(ee, (val)->slowSqcifMPI - 1))
  13442. return 0;
  13443. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13444. return 0;
  13445. }
  13446. if (o[1] & 0x40) {
  13447. if (!ASN1PEREncUnsignedShort(ee, (val)->slowQcifMPI - 1))
  13448. return 0;
  13449. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13450. return 0;
  13451. }
  13452. if (o[1] & 0x20) {
  13453. if (!ASN1PEREncUnsignedShort(ee, (val)->slowCifMPI - 1))
  13454. return 0;
  13455. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13456. return 0;
  13457. }
  13458. if (o[1] & 0x10) {
  13459. if (!ASN1PEREncUnsignedShort(ee, (val)->slowCif4MPI - 1))
  13460. return 0;
  13461. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13462. return 0;
  13463. }
  13464. if (o[1] & 0x8) {
  13465. if (!ASN1PEREncUnsignedShort(ee, (val)->slowCif16MPI - 1))
  13466. return 0;
  13467. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13468. return 0;
  13469. }
  13470. if (o[1] & 0x4) {
  13471. if (!ASN1PEREncBoolean(ee, (val)->errorCompensation))
  13472. return 0;
  13473. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13474. return 0;
  13475. }
  13476. if (o[1] & 0x2) {
  13477. if (!ASN1Enc_EnhancementLayerInfo(ee, &(val)->enhancementLayerInfo))
  13478. return 0;
  13479. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13480. return 0;
  13481. }
  13482. if (o[1] & 0x1) {
  13483. if (!ASN1Enc_H263Options(ee, &(val)->h263Options))
  13484. return 0;
  13485. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13486. return 0;
  13487. }
  13488. ASN1_CloseEncoder2(ee);
  13489. }
  13490. return 1;
  13491. }
  13492. static int ASN1CALL ASN1Dec_H263VideoCapability(ASN1decoding_t dec, H263VideoCapability *val)
  13493. {
  13494. ASN1uint32_t y;
  13495. ASN1uint32_t l;
  13496. ASN1decoding_t dd;
  13497. ASN1octet_t *db;
  13498. ASN1uint32_t ds;
  13499. ASN1uint32_t i;
  13500. ASN1uint32_t e;
  13501. if (!ASN1PERDecExtensionBit(dec, &y))
  13502. return 0;
  13503. if (!ASN1PERDecExtension(dec, 7, (val)->o))
  13504. return 0;
  13505. if ((val)->o[0] & 0x80) {
  13506. if (!ASN1PERDecU16Val(dec, 5, &(val)->sqcifMPI))
  13507. return 0;
  13508. (val)->sqcifMPI += 1;
  13509. }
  13510. if ((val)->o[0] & 0x40) {
  13511. if (!ASN1PERDecU16Val(dec, 5, &(val)->qcifMPI))
  13512. return 0;
  13513. (val)->qcifMPI += 1;
  13514. }
  13515. if ((val)->o[0] & 0x20) {
  13516. if (!ASN1PERDecU16Val(dec, 5, &(val)->cifMPI))
  13517. return 0;
  13518. (val)->cifMPI += 1;
  13519. }
  13520. if ((val)->o[0] & 0x10) {
  13521. if (!ASN1PERDecU16Val(dec, 5, &(val)->cif4MPI))
  13522. return 0;
  13523. (val)->cif4MPI += 1;
  13524. }
  13525. if ((val)->o[0] & 0x8) {
  13526. if (!ASN1PERDecU16Val(dec, 5, &(val)->cif16MPI))
  13527. return 0;
  13528. (val)->cif16MPI += 1;
  13529. }
  13530. if (!ASN1PERDecU32Val(dec, 2, &l))
  13531. return 0;
  13532. l += 1;
  13533. ASN1PERDecAlignment(dec);
  13534. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->maxBitRate))
  13535. return 0;
  13536. (val)->maxBitRate += 1;
  13537. if (!ASN1PERDecBoolean(dec, &(val)->unrestrictedVector))
  13538. return 0;
  13539. if (!ASN1PERDecBoolean(dec, &(val)->arithmeticCoding))
  13540. return 0;
  13541. if (!ASN1PERDecBoolean(dec, &(val)->advancedPrediction))
  13542. return 0;
  13543. if (!ASN1PERDecBoolean(dec, &(val)->pbFrames))
  13544. return 0;
  13545. if (!ASN1PERDecBoolean(dec, &(val)->temporalSpatialTradeOffCapability))
  13546. return 0;
  13547. if ((val)->o[0] & 0x4) {
  13548. if (!ASN1PERDecU32Val(dec, 2, &l))
  13549. return 0;
  13550. l += 1;
  13551. ASN1PERDecAlignment(dec);
  13552. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->hrd_B))
  13553. return 0;
  13554. }
  13555. if ((val)->o[0] & 0x2) {
  13556. if (!ASN1PERDecUnsignedShort(dec, &(val)->bppMaxKb))
  13557. return 0;
  13558. }
  13559. if (!y) {
  13560. ZeroMemory((val)->o + 1, 1);
  13561. } else {
  13562. if (!ASN1PERDecNormallySmallExtension(dec, &e, 8, (val)->o + 1))
  13563. return 0;
  13564. if ((val)->o[1] & 0x80) {
  13565. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13566. return 0;
  13567. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13568. return 0;
  13569. if (!ASN1PERDecUnsignedShort(dd, &(val)->slowSqcifMPI))
  13570. return 0;
  13571. (val)->slowSqcifMPI += 1;
  13572. ASN1_CloseDecoder(dd);
  13573. ASN1Free(db);
  13574. }
  13575. if ((val)->o[1] & 0x40) {
  13576. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13577. return 0;
  13578. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13579. return 0;
  13580. if (!ASN1PERDecUnsignedShort(dd, &(val)->slowQcifMPI))
  13581. return 0;
  13582. (val)->slowQcifMPI += 1;
  13583. ASN1_CloseDecoder(dd);
  13584. ASN1Free(db);
  13585. }
  13586. if ((val)->o[1] & 0x20) {
  13587. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13588. return 0;
  13589. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13590. return 0;
  13591. if (!ASN1PERDecUnsignedShort(dd, &(val)->slowCifMPI))
  13592. return 0;
  13593. (val)->slowCifMPI += 1;
  13594. ASN1_CloseDecoder(dd);
  13595. ASN1Free(db);
  13596. }
  13597. if ((val)->o[1] & 0x10) {
  13598. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13599. return 0;
  13600. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13601. return 0;
  13602. if (!ASN1PERDecUnsignedShort(dd, &(val)->slowCif4MPI))
  13603. return 0;
  13604. (val)->slowCif4MPI += 1;
  13605. ASN1_CloseDecoder(dd);
  13606. ASN1Free(db);
  13607. }
  13608. if ((val)->o[1] & 0x8) {
  13609. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13610. return 0;
  13611. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13612. return 0;
  13613. if (!ASN1PERDecUnsignedShort(dd, &(val)->slowCif16MPI))
  13614. return 0;
  13615. (val)->slowCif16MPI += 1;
  13616. ASN1_CloseDecoder(dd);
  13617. ASN1Free(db);
  13618. }
  13619. if ((val)->o[1] & 0x4) {
  13620. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13621. return 0;
  13622. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13623. return 0;
  13624. if (!ASN1PERDecBoolean(dd, &(val)->errorCompensation))
  13625. return 0;
  13626. ASN1_CloseDecoder(dd);
  13627. ASN1Free(db);
  13628. }
  13629. if ((val)->o[1] & 0x2) {
  13630. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13631. return 0;
  13632. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13633. return 0;
  13634. if (!ASN1Dec_EnhancementLayerInfo(dd, &(val)->enhancementLayerInfo))
  13635. return 0;
  13636. ASN1_CloseDecoder(dd);
  13637. ASN1Free(db);
  13638. }
  13639. if ((val)->o[1] & 0x1) {
  13640. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13641. return 0;
  13642. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13643. return 0;
  13644. if (!ASN1Dec_H263Options(dd, &(val)->h263Options))
  13645. return 0;
  13646. ASN1_CloseDecoder(dd);
  13647. ASN1Free(db);
  13648. }
  13649. for (i = 0; i < e; i++) {
  13650. if (!ASN1PERDecSkipFragmented(dec, 8))
  13651. return 0;
  13652. }
  13653. }
  13654. return 1;
  13655. }
  13656. static void ASN1CALL ASN1Free_H263VideoCapability(H263VideoCapability *val)
  13657. {
  13658. if (val) {
  13659. if ((val)->o[1] & 0x2) {
  13660. ASN1Free_EnhancementLayerInfo(&(val)->enhancementLayerInfo);
  13661. }
  13662. if ((val)->o[1] & 0x1) {
  13663. ASN1Free_H263Options(&(val)->h263Options);
  13664. }
  13665. }
  13666. }
  13667. static int ASN1CALL ASN1Enc_EnhancementOptions(ASN1encoding_t enc, EnhancementOptions *val)
  13668. {
  13669. ASN1uint32_t l;
  13670. if (!ASN1PEREncExtensionBitClear(enc))
  13671. return 0;
  13672. if (!ASN1PEREncBits(enc, 11, (val)->o))
  13673. return 0;
  13674. if ((val)->o[0] & 0x80) {
  13675. if (!ASN1PEREncBitVal(enc, 5, (val)->sqcifMPI - 1))
  13676. return 0;
  13677. }
  13678. if ((val)->o[0] & 0x40) {
  13679. if (!ASN1PEREncBitVal(enc, 5, (val)->qcifMPI - 1))
  13680. return 0;
  13681. }
  13682. if ((val)->o[0] & 0x20) {
  13683. if (!ASN1PEREncBitVal(enc, 5, (val)->cifMPI - 1))
  13684. return 0;
  13685. }
  13686. if ((val)->o[0] & 0x10) {
  13687. if (!ASN1PEREncBitVal(enc, 5, (val)->cif4MPI - 1))
  13688. return 0;
  13689. }
  13690. if ((val)->o[0] & 0x8) {
  13691. if (!ASN1PEREncBitVal(enc, 5, (val)->cif16MPI - 1))
  13692. return 0;
  13693. }
  13694. l = ASN1uint32_uoctets((val)->maxBitRate - 1);
  13695. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  13696. return 0;
  13697. ASN1PEREncAlignment(enc);
  13698. if (!ASN1PEREncBitVal(enc, l * 8, (val)->maxBitRate - 1))
  13699. return 0;
  13700. if (!ASN1PEREncBoolean(enc, (val)->unrestrictedVector))
  13701. return 0;
  13702. if (!ASN1PEREncBoolean(enc, (val)->arithmeticCoding))
  13703. return 0;
  13704. if (!ASN1PEREncBoolean(enc, (val)->temporalSpatialTradeOffCapability))
  13705. return 0;
  13706. if ((val)->o[0] & 0x4) {
  13707. if (!ASN1PEREncUnsignedShort(enc, (val)->slowSqcifMPI - 1))
  13708. return 0;
  13709. }
  13710. if ((val)->o[0] & 0x2) {
  13711. if (!ASN1PEREncUnsignedShort(enc, (val)->slowQcifMPI - 1))
  13712. return 0;
  13713. }
  13714. if ((val)->o[0] & 0x1) {
  13715. if (!ASN1PEREncUnsignedShort(enc, (val)->slowCifMPI - 1))
  13716. return 0;
  13717. }
  13718. if ((val)->o[1] & 0x80) {
  13719. if (!ASN1PEREncUnsignedShort(enc, (val)->slowCif4MPI - 1))
  13720. return 0;
  13721. }
  13722. if ((val)->o[1] & 0x40) {
  13723. if (!ASN1PEREncUnsignedShort(enc, (val)->slowCif16MPI - 1))
  13724. return 0;
  13725. }
  13726. if (!ASN1PEREncBoolean(enc, (val)->errorCompensation))
  13727. return 0;
  13728. if ((val)->o[1] & 0x20) {
  13729. if (!ASN1Enc_H263Options(enc, &(val)->h263Options))
  13730. return 0;
  13731. }
  13732. return 1;
  13733. }
  13734. static int ASN1CALL ASN1Dec_EnhancementOptions(ASN1decoding_t dec, EnhancementOptions *val)
  13735. {
  13736. ASN1uint32_t y;
  13737. ASN1uint32_t l;
  13738. if (!ASN1PERDecExtensionBit(dec, &y))
  13739. return 0;
  13740. if (!ASN1PERDecExtension(dec, 11, (val)->o))
  13741. return 0;
  13742. if ((val)->o[0] & 0x80) {
  13743. if (!ASN1PERDecU16Val(dec, 5, &(val)->sqcifMPI))
  13744. return 0;
  13745. (val)->sqcifMPI += 1;
  13746. }
  13747. if ((val)->o[0] & 0x40) {
  13748. if (!ASN1PERDecU16Val(dec, 5, &(val)->qcifMPI))
  13749. return 0;
  13750. (val)->qcifMPI += 1;
  13751. }
  13752. if ((val)->o[0] & 0x20) {
  13753. if (!ASN1PERDecU16Val(dec, 5, &(val)->cifMPI))
  13754. return 0;
  13755. (val)->cifMPI += 1;
  13756. }
  13757. if ((val)->o[0] & 0x10) {
  13758. if (!ASN1PERDecU16Val(dec, 5, &(val)->cif4MPI))
  13759. return 0;
  13760. (val)->cif4MPI += 1;
  13761. }
  13762. if ((val)->o[0] & 0x8) {
  13763. if (!ASN1PERDecU16Val(dec, 5, &(val)->cif16MPI))
  13764. return 0;
  13765. (val)->cif16MPI += 1;
  13766. }
  13767. if (!ASN1PERDecU32Val(dec, 2, &l))
  13768. return 0;
  13769. l += 1;
  13770. ASN1PERDecAlignment(dec);
  13771. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->maxBitRate))
  13772. return 0;
  13773. (val)->maxBitRate += 1;
  13774. if (!ASN1PERDecBoolean(dec, &(val)->unrestrictedVector))
  13775. return 0;
  13776. if (!ASN1PERDecBoolean(dec, &(val)->arithmeticCoding))
  13777. return 0;
  13778. if (!ASN1PERDecBoolean(dec, &(val)->temporalSpatialTradeOffCapability))
  13779. return 0;
  13780. if ((val)->o[0] & 0x4) {
  13781. if (!ASN1PERDecUnsignedShort(dec, &(val)->slowSqcifMPI))
  13782. return 0;
  13783. (val)->slowSqcifMPI += 1;
  13784. }
  13785. if ((val)->o[0] & 0x2) {
  13786. if (!ASN1PERDecUnsignedShort(dec, &(val)->slowQcifMPI))
  13787. return 0;
  13788. (val)->slowQcifMPI += 1;
  13789. }
  13790. if ((val)->o[0] & 0x1) {
  13791. if (!ASN1PERDecUnsignedShort(dec, &(val)->slowCifMPI))
  13792. return 0;
  13793. (val)->slowCifMPI += 1;
  13794. }
  13795. if ((val)->o[1] & 0x80) {
  13796. if (!ASN1PERDecUnsignedShort(dec, &(val)->slowCif4MPI))
  13797. return 0;
  13798. (val)->slowCif4MPI += 1;
  13799. }
  13800. if ((val)->o[1] & 0x40) {
  13801. if (!ASN1PERDecUnsignedShort(dec, &(val)->slowCif16MPI))
  13802. return 0;
  13803. (val)->slowCif16MPI += 1;
  13804. }
  13805. if (!ASN1PERDecBoolean(dec, &(val)->errorCompensation))
  13806. return 0;
  13807. if ((val)->o[1] & 0x20) {
  13808. if (!ASN1Dec_H263Options(dec, &(val)->h263Options))
  13809. return 0;
  13810. }
  13811. if (y) {
  13812. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  13813. return 0;
  13814. }
  13815. return 1;
  13816. }
  13817. static void ASN1CALL ASN1Free_EnhancementOptions(EnhancementOptions *val)
  13818. {
  13819. if (val) {
  13820. if ((val)->o[1] & 0x20) {
  13821. ASN1Free_H263Options(&(val)->h263Options);
  13822. }
  13823. }
  13824. }
  13825. static int ASN1CALL ASN1Enc_DataProtocolCapability(ASN1encoding_t enc, DataProtocolCapability *val)
  13826. {
  13827. ASN1encoding_t ee;
  13828. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 7))
  13829. return 0;
  13830. switch ((val)->choice) {
  13831. case 1:
  13832. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  13833. return 0;
  13834. break;
  13835. case 2:
  13836. break;
  13837. case 3:
  13838. break;
  13839. case 4:
  13840. break;
  13841. case 5:
  13842. break;
  13843. case 6:
  13844. break;
  13845. case 7:
  13846. break;
  13847. case 8:
  13848. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  13849. return 0;
  13850. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13851. return 0;
  13852. ASN1_CloseEncoder2(ee);
  13853. break;
  13854. case 9:
  13855. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  13856. return 0;
  13857. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13858. return 0;
  13859. ASN1_CloseEncoder2(ee);
  13860. break;
  13861. case 10:
  13862. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  13863. return 0;
  13864. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13865. return 0;
  13866. ASN1_CloseEncoder2(ee);
  13867. break;
  13868. case 11:
  13869. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  13870. return 0;
  13871. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13872. return 0;
  13873. ASN1_CloseEncoder2(ee);
  13874. break;
  13875. case 12:
  13876. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  13877. return 0;
  13878. if (!ASN1Enc_DataProtocolCapability_v76wCompression(ee, &(val)->u.v76wCompression))
  13879. return 0;
  13880. if (!ASN1PEREncFlushFragmentedToParent(ee))
  13881. return 0;
  13882. ASN1_CloseEncoder2(ee);
  13883. break;
  13884. default:
  13885. /* impossible */
  13886. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  13887. return 0;
  13888. }
  13889. return 1;
  13890. }
  13891. static int ASN1CALL ASN1Dec_DataProtocolCapability(ASN1decoding_t dec, DataProtocolCapability *val)
  13892. {
  13893. ASN1decoding_t dd;
  13894. ASN1octet_t *db;
  13895. ASN1uint32_t ds;
  13896. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 7))
  13897. return 0;
  13898. switch ((val)->choice) {
  13899. case 1:
  13900. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  13901. return 0;
  13902. break;
  13903. case 2:
  13904. break;
  13905. case 3:
  13906. break;
  13907. case 4:
  13908. break;
  13909. case 5:
  13910. break;
  13911. case 6:
  13912. break;
  13913. case 7:
  13914. break;
  13915. case 8:
  13916. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13917. return 0;
  13918. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13919. return 0;
  13920. ASN1_CloseDecoder(dd);
  13921. ASN1Free(db);
  13922. break;
  13923. case 9:
  13924. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13925. return 0;
  13926. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13927. return 0;
  13928. ASN1_CloseDecoder(dd);
  13929. ASN1Free(db);
  13930. break;
  13931. case 10:
  13932. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13933. return 0;
  13934. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13935. return 0;
  13936. ASN1_CloseDecoder(dd);
  13937. ASN1Free(db);
  13938. break;
  13939. case 11:
  13940. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13941. return 0;
  13942. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13943. return 0;
  13944. ASN1_CloseDecoder(dd);
  13945. ASN1Free(db);
  13946. break;
  13947. case 12:
  13948. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  13949. return 0;
  13950. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  13951. return 0;
  13952. if (!ASN1Dec_DataProtocolCapability_v76wCompression(dd, &(val)->u.v76wCompression))
  13953. return 0;
  13954. ASN1_CloseDecoder(dd);
  13955. ASN1Free(db);
  13956. break;
  13957. case 0:
  13958. /* extension case */
  13959. if (!ASN1PERDecSkipFragmented(dec, 8))
  13960. return 0;
  13961. break;
  13962. default:
  13963. /* impossible */
  13964. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  13965. return 0;
  13966. }
  13967. return 1;
  13968. }
  13969. static void ASN1CALL ASN1Free_DataProtocolCapability(DataProtocolCapability *val)
  13970. {
  13971. if (val) {
  13972. switch ((val)->choice) {
  13973. case 1:
  13974. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  13975. break;
  13976. }
  13977. }
  13978. }
  13979. static int ASN1CALL ASN1Enc_EncryptionAuthenticationAndIntegrity(ASN1encoding_t enc, EncryptionAuthenticationAndIntegrity *val)
  13980. {
  13981. if (!ASN1PEREncExtensionBitClear(enc))
  13982. return 0;
  13983. if (!ASN1PEREncBits(enc, 3, (val)->o))
  13984. return 0;
  13985. if ((val)->o[0] & 0x80) {
  13986. if (!ASN1Enc_EncryptionCapability(enc, &(val)->encryptionCapability))
  13987. return 0;
  13988. }
  13989. if ((val)->o[0] & 0x40) {
  13990. if (!ASN1Enc_AuthenticationCapability(enc, &(val)->authenticationCapability))
  13991. return 0;
  13992. }
  13993. if ((val)->o[0] & 0x20) {
  13994. if (!ASN1Enc_IntegrityCapability(enc, &(val)->integrityCapability))
  13995. return 0;
  13996. }
  13997. return 1;
  13998. }
  13999. static int ASN1CALL ASN1Dec_EncryptionAuthenticationAndIntegrity(ASN1decoding_t dec, EncryptionAuthenticationAndIntegrity *val)
  14000. {
  14001. ASN1uint32_t y;
  14002. if (!ASN1PERDecExtensionBit(dec, &y))
  14003. return 0;
  14004. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  14005. return 0;
  14006. if ((val)->o[0] & 0x80) {
  14007. if (!ASN1Dec_EncryptionCapability(dec, &(val)->encryptionCapability))
  14008. return 0;
  14009. }
  14010. if ((val)->o[0] & 0x40) {
  14011. if (!ASN1Dec_AuthenticationCapability(dec, &(val)->authenticationCapability))
  14012. return 0;
  14013. }
  14014. if ((val)->o[0] & 0x20) {
  14015. if (!ASN1Dec_IntegrityCapability(dec, &(val)->integrityCapability))
  14016. return 0;
  14017. }
  14018. if (y) {
  14019. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  14020. return 0;
  14021. }
  14022. return 1;
  14023. }
  14024. static void ASN1CALL ASN1Free_EncryptionAuthenticationAndIntegrity(EncryptionAuthenticationAndIntegrity *val)
  14025. {
  14026. if (val) {
  14027. if ((val)->o[0] & 0x80) {
  14028. ASN1Free_EncryptionCapability(&(val)->encryptionCapability);
  14029. }
  14030. if ((val)->o[0] & 0x40) {
  14031. ASN1Free_AuthenticationCapability(&(val)->authenticationCapability);
  14032. }
  14033. if ((val)->o[0] & 0x20) {
  14034. ASN1Free_IntegrityCapability(&(val)->integrityCapability);
  14035. }
  14036. }
  14037. }
  14038. static int ASN1CALL ASN1Enc_EncryptionCapability(ASN1encoding_t enc, PEncryptionCapability *val)
  14039. {
  14040. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_EncryptionCapability_ElmFn, 1, 256, 8);
  14041. }
  14042. static int ASN1CALL ASN1Enc_EncryptionCapability_ElmFn(ASN1encoding_t enc, PEncryptionCapability val)
  14043. {
  14044. if (!ASN1Enc_MediaEncryptionAlgorithm(enc, &val->value))
  14045. return 0;
  14046. return 1;
  14047. }
  14048. static int ASN1CALL ASN1Dec_EncryptionCapability(ASN1decoding_t dec, PEncryptionCapability *val)
  14049. {
  14050. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_EncryptionCapability_ElmFn, sizeof(**val), 1, 256, 8);
  14051. }
  14052. static int ASN1CALL ASN1Dec_EncryptionCapability_ElmFn(ASN1decoding_t dec, PEncryptionCapability val)
  14053. {
  14054. if (!ASN1Dec_MediaEncryptionAlgorithm(dec, &val->value))
  14055. return 0;
  14056. return 1;
  14057. }
  14058. static void ASN1CALL ASN1Free_EncryptionCapability(PEncryptionCapability *val)
  14059. {
  14060. if (val) {
  14061. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_EncryptionCapability_ElmFn);
  14062. }
  14063. }
  14064. static void ASN1CALL ASN1Free_EncryptionCapability_ElmFn(PEncryptionCapability val)
  14065. {
  14066. if (val) {
  14067. ASN1Free_MediaEncryptionAlgorithm(&val->value);
  14068. }
  14069. }
  14070. static int ASN1CALL ASN1Enc_UserInputCapability(ASN1encoding_t enc, UserInputCapability *val)
  14071. {
  14072. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  14073. return 0;
  14074. switch ((val)->choice) {
  14075. case 1:
  14076. if (!ASN1Enc_UserInputCapability_nonStandard(enc, &(val)->u.nonStandard))
  14077. return 0;
  14078. break;
  14079. case 2:
  14080. break;
  14081. case 3:
  14082. break;
  14083. case 4:
  14084. break;
  14085. case 5:
  14086. break;
  14087. case 6:
  14088. break;
  14089. default:
  14090. /* impossible */
  14091. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  14092. return 0;
  14093. }
  14094. return 1;
  14095. }
  14096. static int ASN1CALL ASN1Dec_UserInputCapability(ASN1decoding_t dec, UserInputCapability *val)
  14097. {
  14098. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  14099. return 0;
  14100. switch ((val)->choice) {
  14101. case 1:
  14102. if (!ASN1Dec_UserInputCapability_nonStandard(dec, &(val)->u.nonStandard))
  14103. return 0;
  14104. break;
  14105. case 2:
  14106. break;
  14107. case 3:
  14108. break;
  14109. case 4:
  14110. break;
  14111. case 5:
  14112. break;
  14113. case 6:
  14114. break;
  14115. case 0:
  14116. /* extension case */
  14117. if (!ASN1PERDecSkipFragmented(dec, 8))
  14118. return 0;
  14119. break;
  14120. default:
  14121. /* impossible */
  14122. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  14123. return 0;
  14124. }
  14125. return 1;
  14126. }
  14127. static void ASN1CALL ASN1Free_UserInputCapability(UserInputCapability *val)
  14128. {
  14129. if (val) {
  14130. switch ((val)->choice) {
  14131. case 1:
  14132. ASN1Free_UserInputCapability_nonStandard(&(val)->u.nonStandard);
  14133. break;
  14134. }
  14135. }
  14136. }
  14137. static int ASN1CALL ASN1Enc_H223LogicalChannelParameters(ASN1encoding_t enc, H223LogicalChannelParameters *val)
  14138. {
  14139. if (!ASN1PEREncExtensionBitClear(enc))
  14140. return 0;
  14141. if (!ASN1Enc_H223LogicalChannelParameters_adaptationLayerType(enc, &(val)->adaptationLayerType))
  14142. return 0;
  14143. if (!ASN1PEREncBoolean(enc, (val)->segmentableFlag))
  14144. return 0;
  14145. return 1;
  14146. }
  14147. static int ASN1CALL ASN1Dec_H223LogicalChannelParameters(ASN1decoding_t dec, H223LogicalChannelParameters *val)
  14148. {
  14149. ASN1uint32_t y;
  14150. if (!ASN1PERDecExtensionBit(dec, &y))
  14151. return 0;
  14152. if (!ASN1Dec_H223LogicalChannelParameters_adaptationLayerType(dec, &(val)->adaptationLayerType))
  14153. return 0;
  14154. if (!ASN1PERDecBoolean(dec, &(val)->segmentableFlag))
  14155. return 0;
  14156. if (y) {
  14157. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  14158. return 0;
  14159. }
  14160. return 1;
  14161. }
  14162. static void ASN1CALL ASN1Free_H223LogicalChannelParameters(H223LogicalChannelParameters *val)
  14163. {
  14164. if (val) {
  14165. ASN1Free_H223LogicalChannelParameters_adaptationLayerType(&(val)->adaptationLayerType);
  14166. }
  14167. }
  14168. static int ASN1CALL ASN1Enc_V76LogicalChannelParameters(ASN1encoding_t enc, V76LogicalChannelParameters *val)
  14169. {
  14170. if (!ASN1PEREncExtensionBitClear(enc))
  14171. return 0;
  14172. if (!ASN1Enc_V76HDLCParameters(enc, &(val)->hdlcParameters))
  14173. return 0;
  14174. if (!ASN1Enc_V76LogicalChannelParameters_suspendResume(enc, &(val)->suspendResume))
  14175. return 0;
  14176. if (!ASN1PEREncBoolean(enc, (val)->uIH))
  14177. return 0;
  14178. if (!ASN1Enc_V76LogicalChannelParameters_mode(enc, &(val)->mode))
  14179. return 0;
  14180. if (!ASN1Enc_V75Parameters(enc, &(val)->v75Parameters))
  14181. return 0;
  14182. return 1;
  14183. }
  14184. static int ASN1CALL ASN1Dec_V76LogicalChannelParameters(ASN1decoding_t dec, V76LogicalChannelParameters *val)
  14185. {
  14186. ASN1uint32_t y;
  14187. if (!ASN1PERDecExtensionBit(dec, &y))
  14188. return 0;
  14189. if (!ASN1Dec_V76HDLCParameters(dec, &(val)->hdlcParameters))
  14190. return 0;
  14191. if (!ASN1Dec_V76LogicalChannelParameters_suspendResume(dec, &(val)->suspendResume))
  14192. return 0;
  14193. if (!ASN1PERDecBoolean(dec, &(val)->uIH))
  14194. return 0;
  14195. if (!ASN1Dec_V76LogicalChannelParameters_mode(dec, &(val)->mode))
  14196. return 0;
  14197. if (!ASN1Dec_V75Parameters(dec, &(val)->v75Parameters))
  14198. return 0;
  14199. if (y) {
  14200. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  14201. return 0;
  14202. }
  14203. return 1;
  14204. }
  14205. static int ASN1CALL ASN1Enc_RTPPayloadType(ASN1encoding_t enc, RTPPayloadType *val)
  14206. {
  14207. if (!ASN1PEREncExtensionBitClear(enc))
  14208. return 0;
  14209. if (!ASN1PEREncBits(enc, 1, (val)->o))
  14210. return 0;
  14211. if (!ASN1Enc_RTPPayloadType_payloadDescriptor(enc, &(val)->payloadDescriptor))
  14212. return 0;
  14213. if ((val)->o[0] & 0x80) {
  14214. if (!ASN1PEREncBitVal(enc, 7, (val)->payloadType))
  14215. return 0;
  14216. }
  14217. return 1;
  14218. }
  14219. static int ASN1CALL ASN1Dec_RTPPayloadType(ASN1decoding_t dec, RTPPayloadType *val)
  14220. {
  14221. ASN1uint32_t y;
  14222. if (!ASN1PERDecExtensionBit(dec, &y))
  14223. return 0;
  14224. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  14225. return 0;
  14226. if (!ASN1Dec_RTPPayloadType_payloadDescriptor(dec, &(val)->payloadDescriptor))
  14227. return 0;
  14228. if ((val)->o[0] & 0x80) {
  14229. if (!ASN1PERDecU16Val(dec, 7, &(val)->payloadType))
  14230. return 0;
  14231. }
  14232. if (y) {
  14233. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  14234. return 0;
  14235. }
  14236. return 1;
  14237. }
  14238. static void ASN1CALL ASN1Free_RTPPayloadType(RTPPayloadType *val)
  14239. {
  14240. if (val) {
  14241. ASN1Free_RTPPayloadType_payloadDescriptor(&(val)->payloadDescriptor);
  14242. }
  14243. }
  14244. static int ASN1CALL ASN1Enc_H245TransportAddress(ASN1encoding_t enc, H245TransportAddress *val)
  14245. {
  14246. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  14247. return 0;
  14248. switch ((val)->choice) {
  14249. case 1:
  14250. if (!ASN1Enc_UnicastAddress(enc, &(val)->u.unicastAddress))
  14251. return 0;
  14252. break;
  14253. case 2:
  14254. if (!ASN1Enc_MulticastAddress(enc, &(val)->u.multicastAddress))
  14255. return 0;
  14256. break;
  14257. default:
  14258. /* impossible */
  14259. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  14260. return 0;
  14261. }
  14262. return 1;
  14263. }
  14264. static int ASN1CALL ASN1Dec_H245TransportAddress(ASN1decoding_t dec, H245TransportAddress *val)
  14265. {
  14266. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  14267. return 0;
  14268. switch ((val)->choice) {
  14269. case 1:
  14270. if (!ASN1Dec_UnicastAddress(dec, &(val)->u.unicastAddress))
  14271. return 0;
  14272. break;
  14273. case 2:
  14274. if (!ASN1Dec_MulticastAddress(dec, &(val)->u.multicastAddress))
  14275. return 0;
  14276. break;
  14277. case 0:
  14278. /* extension case */
  14279. if (!ASN1PERDecSkipFragmented(dec, 8))
  14280. return 0;
  14281. break;
  14282. default:
  14283. /* impossible */
  14284. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  14285. return 0;
  14286. }
  14287. return 1;
  14288. }
  14289. static void ASN1CALL ASN1Free_H245TransportAddress(H245TransportAddress *val)
  14290. {
  14291. if (val) {
  14292. switch ((val)->choice) {
  14293. case 1:
  14294. ASN1Free_UnicastAddress(&(val)->u.unicastAddress);
  14295. break;
  14296. case 2:
  14297. ASN1Free_MulticastAddress(&(val)->u.multicastAddress);
  14298. break;
  14299. }
  14300. }
  14301. }
  14302. static int ASN1CALL ASN1Enc_H2250LogicalChannelAckParameters(ASN1encoding_t enc, H2250LogicalChannelAckParameters *val)
  14303. {
  14304. ASN1octet_t o[2];
  14305. ASN1uint32_t y;
  14306. ASN1encoding_t ee;
  14307. CopyMemory(o, (val)->o, 2);
  14308. o[1] |= 0x80;
  14309. y = ASN1PEREncCheckExtensions(2, (val)->o + 1);
  14310. if (!ASN1PEREncBitVal(enc, 1, y))
  14311. return 0;
  14312. if (!ASN1PEREncBits(enc, 5, o))
  14313. return 0;
  14314. if (o[0] & 0x80) {
  14315. if (!ASN1Enc_H2250LogicalChannelAckParameters_nonStandard(enc, &(val)->nonStandard))
  14316. return 0;
  14317. }
  14318. if (o[0] & 0x40) {
  14319. if (!ASN1PEREncBitVal(enc, 8, (val)->sessionID - 1))
  14320. return 0;
  14321. }
  14322. if (o[0] & 0x20) {
  14323. if (!ASN1Enc_H245TransportAddress(enc, &(val)->mediaChannel))
  14324. return 0;
  14325. }
  14326. if (o[0] & 0x10) {
  14327. if (!ASN1Enc_H245TransportAddress(enc, &(val)->mediaControlChannel))
  14328. return 0;
  14329. }
  14330. if (o[0] & 0x8) {
  14331. if (!ASN1PEREncBitVal(enc, 5, (val)->dynamicRTPPayloadType - 96))
  14332. return 0;
  14333. }
  14334. if (y) {
  14335. if (!ASN1PEREncNormallySmallBits(enc, 2, o + 1))
  14336. return 0;
  14337. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  14338. return 0;
  14339. if (o[1] & 0x80) {
  14340. if (!ASN1PEREncBoolean(ee, (val)->flowControlToZero))
  14341. return 0;
  14342. if (!ASN1PEREncFlushFragmentedToParent(ee))
  14343. return 0;
  14344. }
  14345. if (o[1] & 0x40) {
  14346. if (!ASN1PEREncUnsignedShort(ee, (val)->portNumber))
  14347. return 0;
  14348. if (!ASN1PEREncFlushFragmentedToParent(ee))
  14349. return 0;
  14350. }
  14351. ASN1_CloseEncoder2(ee);
  14352. }
  14353. return 1;
  14354. }
  14355. static int ASN1CALL ASN1Dec_H2250LogicalChannelAckParameters(ASN1decoding_t dec, H2250LogicalChannelAckParameters *val)
  14356. {
  14357. ASN1uint32_t y;
  14358. ASN1decoding_t dd;
  14359. ASN1octet_t *db;
  14360. ASN1uint32_t ds;
  14361. ASN1uint32_t i;
  14362. ASN1uint32_t e;
  14363. if (!ASN1PERDecExtensionBit(dec, &y))
  14364. return 0;
  14365. if (!ASN1PERDecExtension(dec, 5, (val)->o))
  14366. return 0;
  14367. if ((val)->o[0] & 0x80) {
  14368. if (!ASN1Dec_H2250LogicalChannelAckParameters_nonStandard(dec, &(val)->nonStandard))
  14369. return 0;
  14370. }
  14371. if ((val)->o[0] & 0x40) {
  14372. if (!ASN1PERDecU16Val(dec, 8, &(val)->sessionID))
  14373. return 0;
  14374. (val)->sessionID += 1;
  14375. }
  14376. if ((val)->o[0] & 0x20) {
  14377. if (!ASN1Dec_H245TransportAddress(dec, &(val)->mediaChannel))
  14378. return 0;
  14379. }
  14380. if ((val)->o[0] & 0x10) {
  14381. if (!ASN1Dec_H245TransportAddress(dec, &(val)->mediaControlChannel))
  14382. return 0;
  14383. }
  14384. if ((val)->o[0] & 0x8) {
  14385. if (!ASN1PERDecU16Val(dec, 5, &(val)->dynamicRTPPayloadType))
  14386. return 0;
  14387. (val)->dynamicRTPPayloadType += 96;
  14388. }
  14389. if (!y) {
  14390. ZeroMemory((val)->o + 1, 1);
  14391. } else {
  14392. if (!ASN1PERDecNormallySmallExtension(dec, &e, 2, (val)->o + 1))
  14393. return 0;
  14394. if ((val)->o[1] & 0x80) {
  14395. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  14396. return 0;
  14397. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  14398. return 0;
  14399. if (!ASN1PERDecBoolean(dd, &(val)->flowControlToZero))
  14400. return 0;
  14401. ASN1_CloseDecoder(dd);
  14402. ASN1Free(db);
  14403. }
  14404. if ((val)->o[1] & 0x40) {
  14405. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  14406. return 0;
  14407. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  14408. return 0;
  14409. if (!ASN1PERDecUnsignedShort(dd, &(val)->portNumber))
  14410. return 0;
  14411. ASN1_CloseDecoder(dd);
  14412. ASN1Free(db);
  14413. }
  14414. for (i = 0; i < e; i++) {
  14415. if (!ASN1PERDecSkipFragmented(dec, 8))
  14416. return 0;
  14417. }
  14418. }
  14419. return 1;
  14420. }
  14421. static void ASN1CALL ASN1Free_H2250LogicalChannelAckParameters(H2250LogicalChannelAckParameters *val)
  14422. {
  14423. if (val) {
  14424. if ((val)->o[0] & 0x80) {
  14425. ASN1Free_H2250LogicalChannelAckParameters_nonStandard(&(val)->nonStandard);
  14426. }
  14427. if ((val)->o[0] & 0x20) {
  14428. ASN1Free_H245TransportAddress(&(val)->mediaChannel);
  14429. }
  14430. if ((val)->o[0] & 0x10) {
  14431. ASN1Free_H245TransportAddress(&(val)->mediaControlChannel);
  14432. }
  14433. }
  14434. }
  14435. static int ASN1CALL ASN1Enc_H223ModeParameters(ASN1encoding_t enc, H223ModeParameters *val)
  14436. {
  14437. if (!ASN1PEREncExtensionBitClear(enc))
  14438. return 0;
  14439. if (!ASN1Enc_H223ModeParameters_adaptationLayerType(enc, &(val)->adaptationLayerType))
  14440. return 0;
  14441. if (!ASN1PEREncBoolean(enc, (val)->segmentableFlag))
  14442. return 0;
  14443. return 1;
  14444. }
  14445. static int ASN1CALL ASN1Dec_H223ModeParameters(ASN1decoding_t dec, H223ModeParameters *val)
  14446. {
  14447. ASN1uint32_t y;
  14448. if (!ASN1PERDecExtensionBit(dec, &y))
  14449. return 0;
  14450. if (!ASN1Dec_H223ModeParameters_adaptationLayerType(dec, &(val)->adaptationLayerType))
  14451. return 0;
  14452. if (!ASN1PERDecBoolean(dec, &(val)->segmentableFlag))
  14453. return 0;
  14454. if (y) {
  14455. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  14456. return 0;
  14457. }
  14458. return 1;
  14459. }
  14460. static void ASN1CALL ASN1Free_H223ModeParameters(H223ModeParameters *val)
  14461. {
  14462. if (val) {
  14463. ASN1Free_H223ModeParameters_adaptationLayerType(&(val)->adaptationLayerType);
  14464. }
  14465. }
  14466. static int ASN1CALL ASN1Enc_RedundancyEncodingMode(ASN1encoding_t enc, RedundancyEncodingMode *val)
  14467. {
  14468. if (!ASN1PEREncExtensionBitClear(enc))
  14469. return 0;
  14470. if (!ASN1PEREncBits(enc, 1, (val)->o))
  14471. return 0;
  14472. if (!ASN1Enc_RedundancyEncodingMethod(enc, &(val)->redundancyEncodingMethod))
  14473. return 0;
  14474. if ((val)->o[0] & 0x80) {
  14475. if (!ASN1Enc_RedundancyEncodingMode_secondaryEncoding(enc, &(val)->secondaryEncoding))
  14476. return 0;
  14477. }
  14478. return 1;
  14479. }
  14480. static int ASN1CALL ASN1Dec_RedundancyEncodingMode(ASN1decoding_t dec, RedundancyEncodingMode *val)
  14481. {
  14482. ASN1uint32_t y;
  14483. if (!ASN1PERDecExtensionBit(dec, &y))
  14484. return 0;
  14485. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  14486. return 0;
  14487. if (!ASN1Dec_RedundancyEncodingMethod(dec, &(val)->redundancyEncodingMethod))
  14488. return 0;
  14489. if ((val)->o[0] & 0x80) {
  14490. if (!ASN1Dec_RedundancyEncodingMode_secondaryEncoding(dec, &(val)->secondaryEncoding))
  14491. return 0;
  14492. }
  14493. if (y) {
  14494. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  14495. return 0;
  14496. }
  14497. return 1;
  14498. }
  14499. static void ASN1CALL ASN1Free_RedundancyEncodingMode(RedundancyEncodingMode *val)
  14500. {
  14501. if (val) {
  14502. ASN1Free_RedundancyEncodingMethod(&(val)->redundancyEncodingMethod);
  14503. if ((val)->o[0] & 0x80) {
  14504. ASN1Free_RedundancyEncodingMode_secondaryEncoding(&(val)->secondaryEncoding);
  14505. }
  14506. }
  14507. }
  14508. static int ASN1CALL ASN1Enc_VideoMode(ASN1encoding_t enc, VideoMode *val)
  14509. {
  14510. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  14511. return 0;
  14512. switch ((val)->choice) {
  14513. case 1:
  14514. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  14515. return 0;
  14516. break;
  14517. case 2:
  14518. if (!ASN1Enc_H261VideoMode(enc, &(val)->u.h261VideoMode))
  14519. return 0;
  14520. break;
  14521. case 3:
  14522. if (!ASN1Enc_H262VideoMode(enc, &(val)->u.h262VideoMode))
  14523. return 0;
  14524. break;
  14525. case 4:
  14526. if (!ASN1Enc_H263VideoMode(enc, &(val)->u.h263VideoMode))
  14527. return 0;
  14528. break;
  14529. case 5:
  14530. if (!ASN1Enc_IS11172VideoMode(enc, &(val)->u.is11172VideoMode))
  14531. return 0;
  14532. break;
  14533. default:
  14534. /* impossible */
  14535. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  14536. return 0;
  14537. }
  14538. return 1;
  14539. }
  14540. static int ASN1CALL ASN1Dec_VideoMode(ASN1decoding_t dec, VideoMode *val)
  14541. {
  14542. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  14543. return 0;
  14544. switch ((val)->choice) {
  14545. case 1:
  14546. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  14547. return 0;
  14548. break;
  14549. case 2:
  14550. if (!ASN1Dec_H261VideoMode(dec, &(val)->u.h261VideoMode))
  14551. return 0;
  14552. break;
  14553. case 3:
  14554. if (!ASN1Dec_H262VideoMode(dec, &(val)->u.h262VideoMode))
  14555. return 0;
  14556. break;
  14557. case 4:
  14558. if (!ASN1Dec_H263VideoMode(dec, &(val)->u.h263VideoMode))
  14559. return 0;
  14560. break;
  14561. case 5:
  14562. if (!ASN1Dec_IS11172VideoMode(dec, &(val)->u.is11172VideoMode))
  14563. return 0;
  14564. break;
  14565. case 0:
  14566. /* extension case */
  14567. if (!ASN1PERDecSkipFragmented(dec, 8))
  14568. return 0;
  14569. break;
  14570. default:
  14571. /* impossible */
  14572. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  14573. return 0;
  14574. }
  14575. return 1;
  14576. }
  14577. static void ASN1CALL ASN1Free_VideoMode(VideoMode *val)
  14578. {
  14579. if (val) {
  14580. switch ((val)->choice) {
  14581. case 1:
  14582. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  14583. break;
  14584. case 4:
  14585. ASN1Free_H263VideoMode(&(val)->u.h263VideoMode);
  14586. break;
  14587. }
  14588. }
  14589. }
  14590. static int ASN1CALL ASN1Enc_EncryptionCommand(ASN1encoding_t enc, EncryptionCommand *val)
  14591. {
  14592. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  14593. return 0;
  14594. switch ((val)->choice) {
  14595. case 1:
  14596. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->u.encryptionSE))
  14597. return 0;
  14598. break;
  14599. case 2:
  14600. break;
  14601. case 3:
  14602. if (!ASN1Enc_EncryptionCommand_encryptionAlgorithmID(enc, &(val)->u.encryptionAlgorithmID))
  14603. return 0;
  14604. break;
  14605. default:
  14606. /* impossible */
  14607. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  14608. return 0;
  14609. }
  14610. return 1;
  14611. }
  14612. static int ASN1CALL ASN1Dec_EncryptionCommand(ASN1decoding_t dec, EncryptionCommand *val)
  14613. {
  14614. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  14615. return 0;
  14616. switch ((val)->choice) {
  14617. case 1:
  14618. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->u.encryptionSE))
  14619. return 0;
  14620. break;
  14621. case 2:
  14622. break;
  14623. case 3:
  14624. if (!ASN1Dec_EncryptionCommand_encryptionAlgorithmID(dec, &(val)->u.encryptionAlgorithmID))
  14625. return 0;
  14626. break;
  14627. case 0:
  14628. /* extension case */
  14629. if (!ASN1PERDecSkipFragmented(dec, 8))
  14630. return 0;
  14631. break;
  14632. default:
  14633. /* impossible */
  14634. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  14635. return 0;
  14636. }
  14637. return 1;
  14638. }
  14639. static void ASN1CALL ASN1Free_EncryptionCommand(EncryptionCommand *val)
  14640. {
  14641. if (val) {
  14642. switch ((val)->choice) {
  14643. case 1:
  14644. ASN1octetstring_free(&(val)->u.encryptionSE);
  14645. break;
  14646. case 3:
  14647. ASN1Free_EncryptionCommand_encryptionAlgorithmID(&(val)->u.encryptionAlgorithmID);
  14648. break;
  14649. }
  14650. }
  14651. }
  14652. static int ASN1CALL ASN1Enc_MiscellaneousCommand(ASN1encoding_t enc, MiscellaneousCommand *val)
  14653. {
  14654. if (!ASN1PEREncExtensionBitClear(enc))
  14655. return 0;
  14656. if (!ASN1PEREncUnsignedShort(enc, (val)->logicalChannelNumber - 1))
  14657. return 0;
  14658. if (!ASN1Enc_MiscellaneousCommand_type(enc, &(val)->type))
  14659. return 0;
  14660. return 1;
  14661. }
  14662. static int ASN1CALL ASN1Dec_MiscellaneousCommand(ASN1decoding_t dec, MiscellaneousCommand *val)
  14663. {
  14664. ASN1uint32_t y;
  14665. if (!ASN1PERDecExtensionBit(dec, &y))
  14666. return 0;
  14667. if (!ASN1PERDecUnsignedShort(dec, &(val)->logicalChannelNumber))
  14668. return 0;
  14669. (val)->logicalChannelNumber += 1;
  14670. if (!ASN1Dec_MiscellaneousCommand_type(dec, &(val)->type))
  14671. return 0;
  14672. if (y) {
  14673. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  14674. return 0;
  14675. }
  14676. return 1;
  14677. }
  14678. static void ASN1CALL ASN1Free_MiscellaneousCommand(MiscellaneousCommand *val)
  14679. {
  14680. if (val) {
  14681. ASN1Free_MiscellaneousCommand_type(&(val)->type);
  14682. }
  14683. }
  14684. static int ASN1CALL ASN1Enc_MiscellaneousIndication(ASN1encoding_t enc, MiscellaneousIndication *val)
  14685. {
  14686. if (!ASN1PEREncExtensionBitClear(enc))
  14687. return 0;
  14688. if (!ASN1PEREncUnsignedShort(enc, (val)->logicalChannelNumber - 1))
  14689. return 0;
  14690. if (!ASN1Enc_MiscellaneousIndication_type(enc, &(val)->type))
  14691. return 0;
  14692. return 1;
  14693. }
  14694. static int ASN1CALL ASN1Dec_MiscellaneousIndication(ASN1decoding_t dec, MiscellaneousIndication *val)
  14695. {
  14696. ASN1uint32_t y;
  14697. if (!ASN1PERDecExtensionBit(dec, &y))
  14698. return 0;
  14699. if (!ASN1PERDecUnsignedShort(dec, &(val)->logicalChannelNumber))
  14700. return 0;
  14701. (val)->logicalChannelNumber += 1;
  14702. if (!ASN1Dec_MiscellaneousIndication_type(dec, &(val)->type))
  14703. return 0;
  14704. if (y) {
  14705. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  14706. return 0;
  14707. }
  14708. return 1;
  14709. }
  14710. static void ASN1CALL ASN1Free_MiscellaneousIndication(MiscellaneousIndication *val)
  14711. {
  14712. if (val) {
  14713. ASN1Free_MiscellaneousIndication_type(&(val)->type);
  14714. }
  14715. }
  14716. static int ASN1CALL ASN1Enc_MCLocationIndication(ASN1encoding_t enc, MCLocationIndication *val)
  14717. {
  14718. if (!ASN1PEREncExtensionBitClear(enc))
  14719. return 0;
  14720. if (!ASN1Enc_H245TransportAddress(enc, &(val)->signalAddress))
  14721. return 0;
  14722. return 1;
  14723. }
  14724. static int ASN1CALL ASN1Dec_MCLocationIndication(ASN1decoding_t dec, MCLocationIndication *val)
  14725. {
  14726. ASN1uint32_t y;
  14727. if (!ASN1PERDecExtensionBit(dec, &y))
  14728. return 0;
  14729. if (!ASN1Dec_H245TransportAddress(dec, &(val)->signalAddress))
  14730. return 0;
  14731. if (y) {
  14732. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  14733. return 0;
  14734. }
  14735. return 1;
  14736. }
  14737. static void ASN1CALL ASN1Free_MCLocationIndication(MCLocationIndication *val)
  14738. {
  14739. if (val) {
  14740. ASN1Free_H245TransportAddress(&(val)->signalAddress);
  14741. }
  14742. }
  14743. static int ASN1CALL ASN1Enc_UserInputIndication(ASN1encoding_t enc, UserInputIndication *val)
  14744. {
  14745. ASN1uint32_t t;
  14746. ASN1encoding_t ee;
  14747. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 1, 2))
  14748. return 0;
  14749. switch ((val)->choice) {
  14750. case 1:
  14751. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  14752. return 0;
  14753. break;
  14754. case 2:
  14755. t = lstrlenA((val)->u.alphanumeric);
  14756. if (!ASN1PEREncFragmentedCharString(enc, t, (val)->u.alphanumeric, 8))
  14757. return 0;
  14758. break;
  14759. case 3:
  14760. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  14761. return 0;
  14762. if (!ASN1Enc_UserInputIndication_userInputSupportIndication(ee, &(val)->u.userInputSupportIndication))
  14763. return 0;
  14764. if (!ASN1PEREncFlushFragmentedToParent(ee))
  14765. return 0;
  14766. ASN1_CloseEncoder2(ee);
  14767. break;
  14768. case 4:
  14769. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  14770. return 0;
  14771. if (!ASN1Enc_UserInputIndication_signal(ee, &(val)->u.signal))
  14772. return 0;
  14773. if (!ASN1PEREncFlushFragmentedToParent(ee))
  14774. return 0;
  14775. ASN1_CloseEncoder2(ee);
  14776. break;
  14777. case 5:
  14778. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  14779. return 0;
  14780. if (!ASN1Enc_UserInputIndication_signalUpdate(ee, &(val)->u.signalUpdate))
  14781. return 0;
  14782. if (!ASN1PEREncFlushFragmentedToParent(ee))
  14783. return 0;
  14784. ASN1_CloseEncoder2(ee);
  14785. break;
  14786. default:
  14787. /* impossible */
  14788. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  14789. return 0;
  14790. }
  14791. return 1;
  14792. }
  14793. static int ASN1CALL ASN1Dec_UserInputIndication(ASN1decoding_t dec, UserInputIndication *val)
  14794. {
  14795. ASN1decoding_t dd;
  14796. ASN1octet_t *db;
  14797. ASN1uint32_t ds;
  14798. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 1, 2))
  14799. return 0;
  14800. switch ((val)->choice) {
  14801. case 1:
  14802. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  14803. return 0;
  14804. break;
  14805. case 2:
  14806. if (!ASN1PERDecFragmentedZeroCharString(dec, &(val)->u.alphanumeric, 8))
  14807. return 0;
  14808. break;
  14809. case 3:
  14810. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  14811. return 0;
  14812. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  14813. return 0;
  14814. if (!ASN1Dec_UserInputIndication_userInputSupportIndication(dd, &(val)->u.userInputSupportIndication))
  14815. return 0;
  14816. ASN1_CloseDecoder(dd);
  14817. ASN1Free(db);
  14818. break;
  14819. case 4:
  14820. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  14821. return 0;
  14822. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  14823. return 0;
  14824. if (!ASN1Dec_UserInputIndication_signal(dd, &(val)->u.signal))
  14825. return 0;
  14826. ASN1_CloseDecoder(dd);
  14827. ASN1Free(db);
  14828. break;
  14829. case 5:
  14830. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  14831. return 0;
  14832. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  14833. return 0;
  14834. if (!ASN1Dec_UserInputIndication_signalUpdate(dd, &(val)->u.signalUpdate))
  14835. return 0;
  14836. ASN1_CloseDecoder(dd);
  14837. ASN1Free(db);
  14838. break;
  14839. case 0:
  14840. /* extension case */
  14841. if (!ASN1PERDecSkipFragmented(dec, 8))
  14842. return 0;
  14843. break;
  14844. default:
  14845. /* impossible */
  14846. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  14847. return 0;
  14848. }
  14849. return 1;
  14850. }
  14851. static void ASN1CALL ASN1Free_UserInputIndication(UserInputIndication *val)
  14852. {
  14853. if (val) {
  14854. switch ((val)->choice) {
  14855. case 1:
  14856. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  14857. break;
  14858. case 2:
  14859. ASN1ztcharstring_free((val)->u.alphanumeric);
  14860. break;
  14861. case 3:
  14862. ASN1Free_UserInputIndication_userInputSupportIndication(&(val)->u.userInputSupportIndication);
  14863. break;
  14864. case 4:
  14865. ASN1Free_UserInputIndication_signal(&(val)->u.signal);
  14866. break;
  14867. }
  14868. }
  14869. }
  14870. static int ASN1CALL ASN1Enc_DataApplicationCapability_application_nlpid(ASN1encoding_t enc, DataApplicationCapability_application_nlpid *val)
  14871. {
  14872. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->nlpidProtocol))
  14873. return 0;
  14874. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->nlpidData))
  14875. return 0;
  14876. return 1;
  14877. }
  14878. static int ASN1CALL ASN1Dec_DataApplicationCapability_application_nlpid(ASN1decoding_t dec, DataApplicationCapability_application_nlpid *val)
  14879. {
  14880. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->nlpidProtocol))
  14881. return 0;
  14882. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->nlpidData))
  14883. return 0;
  14884. return 1;
  14885. }
  14886. static void ASN1CALL ASN1Free_DataApplicationCapability_application_nlpid(DataApplicationCapability_application_nlpid *val)
  14887. {
  14888. if (val) {
  14889. ASN1Free_DataProtocolCapability(&(val)->nlpidProtocol);
  14890. ASN1octetstring_free(&(val)->nlpidData);
  14891. }
  14892. }
  14893. static int ASN1CALL ASN1Enc_DataApplicationCapability_application_t84(ASN1encoding_t enc, DataApplicationCapability_application_t84 *val)
  14894. {
  14895. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->t84Protocol))
  14896. return 0;
  14897. if (!ASN1Enc_T84Profile(enc, &(val)->t84Profile))
  14898. return 0;
  14899. return 1;
  14900. }
  14901. static int ASN1CALL ASN1Dec_DataApplicationCapability_application_t84(ASN1decoding_t dec, DataApplicationCapability_application_t84 *val)
  14902. {
  14903. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->t84Protocol))
  14904. return 0;
  14905. if (!ASN1Dec_T84Profile(dec, &(val)->t84Profile))
  14906. return 0;
  14907. return 1;
  14908. }
  14909. static void ASN1CALL ASN1Free_DataApplicationCapability_application_t84(DataApplicationCapability_application_t84 *val)
  14910. {
  14911. if (val) {
  14912. ASN1Free_DataProtocolCapability(&(val)->t84Protocol);
  14913. }
  14914. }
  14915. static int ASN1CALL ASN1Enc_DataMode_application_nlpid(ASN1encoding_t enc, DataMode_application_nlpid *val)
  14916. {
  14917. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->nlpidProtocol))
  14918. return 0;
  14919. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->nlpidData))
  14920. return 0;
  14921. return 1;
  14922. }
  14923. static int ASN1CALL ASN1Dec_DataMode_application_nlpid(ASN1decoding_t dec, DataMode_application_nlpid *val)
  14924. {
  14925. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->nlpidProtocol))
  14926. return 0;
  14927. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->nlpidData))
  14928. return 0;
  14929. return 1;
  14930. }
  14931. static void ASN1CALL ASN1Free_DataMode_application_nlpid(DataMode_application_nlpid *val)
  14932. {
  14933. if (val) {
  14934. ASN1Free_DataProtocolCapability(&(val)->nlpidProtocol);
  14935. ASN1octetstring_free(&(val)->nlpidData);
  14936. }
  14937. }
  14938. static int ASN1CALL ASN1Enc_DataMode_application(ASN1encoding_t enc, DataMode_application *val)
  14939. {
  14940. ASN1encoding_t ee;
  14941. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 10))
  14942. return 0;
  14943. switch ((val)->choice) {
  14944. case 1:
  14945. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  14946. return 0;
  14947. break;
  14948. case 2:
  14949. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.t120))
  14950. return 0;
  14951. break;
  14952. case 3:
  14953. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.dsm_cc))
  14954. return 0;
  14955. break;
  14956. case 4:
  14957. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.userData))
  14958. return 0;
  14959. break;
  14960. case 5:
  14961. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.t84))
  14962. return 0;
  14963. break;
  14964. case 6:
  14965. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.t434))
  14966. return 0;
  14967. break;
  14968. case 7:
  14969. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.h224))
  14970. return 0;
  14971. break;
  14972. case 8:
  14973. if (!ASN1Enc_DataMode_application_nlpid(enc, &(val)->u.nlpid))
  14974. return 0;
  14975. break;
  14976. case 9:
  14977. break;
  14978. case 10:
  14979. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.h222DataPartitioning))
  14980. return 0;
  14981. break;
  14982. case 11:
  14983. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  14984. return 0;
  14985. if (!ASN1Enc_DataProtocolCapability(ee, &(val)->u.t30fax))
  14986. return 0;
  14987. if (!ASN1PEREncFlushFragmentedToParent(ee))
  14988. return 0;
  14989. ASN1_CloseEncoder2(ee);
  14990. break;
  14991. case 12:
  14992. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  14993. return 0;
  14994. if (!ASN1Enc_DataProtocolCapability(ee, &(val)->u.t140))
  14995. return 0;
  14996. if (!ASN1PEREncFlushFragmentedToParent(ee))
  14997. return 0;
  14998. ASN1_CloseEncoder2(ee);
  14999. break;
  15000. default:
  15001. /* impossible */
  15002. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  15003. return 0;
  15004. }
  15005. return 1;
  15006. }
  15007. static int ASN1CALL ASN1Dec_DataMode_application(ASN1decoding_t dec, DataMode_application *val)
  15008. {
  15009. ASN1decoding_t dd;
  15010. ASN1octet_t *db;
  15011. ASN1uint32_t ds;
  15012. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 10))
  15013. return 0;
  15014. switch ((val)->choice) {
  15015. case 1:
  15016. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  15017. return 0;
  15018. break;
  15019. case 2:
  15020. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.t120))
  15021. return 0;
  15022. break;
  15023. case 3:
  15024. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.dsm_cc))
  15025. return 0;
  15026. break;
  15027. case 4:
  15028. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.userData))
  15029. return 0;
  15030. break;
  15031. case 5:
  15032. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.t84))
  15033. return 0;
  15034. break;
  15035. case 6:
  15036. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.t434))
  15037. return 0;
  15038. break;
  15039. case 7:
  15040. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.h224))
  15041. return 0;
  15042. break;
  15043. case 8:
  15044. if (!ASN1Dec_DataMode_application_nlpid(dec, &(val)->u.nlpid))
  15045. return 0;
  15046. break;
  15047. case 9:
  15048. break;
  15049. case 10:
  15050. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.h222DataPartitioning))
  15051. return 0;
  15052. break;
  15053. case 11:
  15054. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  15055. return 0;
  15056. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  15057. return 0;
  15058. if (!ASN1Dec_DataProtocolCapability(dd, &(val)->u.t30fax))
  15059. return 0;
  15060. ASN1_CloseDecoder(dd);
  15061. ASN1Free(db);
  15062. break;
  15063. case 12:
  15064. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  15065. return 0;
  15066. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  15067. return 0;
  15068. if (!ASN1Dec_DataProtocolCapability(dd, &(val)->u.t140))
  15069. return 0;
  15070. ASN1_CloseDecoder(dd);
  15071. ASN1Free(db);
  15072. break;
  15073. case 0:
  15074. /* extension case */
  15075. if (!ASN1PERDecSkipFragmented(dec, 8))
  15076. return 0;
  15077. break;
  15078. default:
  15079. /* impossible */
  15080. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  15081. return 0;
  15082. }
  15083. return 1;
  15084. }
  15085. static void ASN1CALL ASN1Free_DataMode_application(DataMode_application *val)
  15086. {
  15087. if (val) {
  15088. switch ((val)->choice) {
  15089. case 1:
  15090. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  15091. break;
  15092. case 2:
  15093. ASN1Free_DataProtocolCapability(&(val)->u.t120);
  15094. break;
  15095. case 3:
  15096. ASN1Free_DataProtocolCapability(&(val)->u.dsm_cc);
  15097. break;
  15098. case 4:
  15099. ASN1Free_DataProtocolCapability(&(val)->u.userData);
  15100. break;
  15101. case 5:
  15102. ASN1Free_DataProtocolCapability(&(val)->u.t84);
  15103. break;
  15104. case 6:
  15105. ASN1Free_DataProtocolCapability(&(val)->u.t434);
  15106. break;
  15107. case 7:
  15108. ASN1Free_DataProtocolCapability(&(val)->u.h224);
  15109. break;
  15110. case 8:
  15111. ASN1Free_DataMode_application_nlpid(&(val)->u.nlpid);
  15112. break;
  15113. case 10:
  15114. ASN1Free_DataProtocolCapability(&(val)->u.h222DataPartitioning);
  15115. break;
  15116. case 11:
  15117. ASN1Free_DataProtocolCapability(&(val)->u.t30fax);
  15118. break;
  15119. case 12:
  15120. ASN1Free_DataProtocolCapability(&(val)->u.t140);
  15121. break;
  15122. }
  15123. }
  15124. }
  15125. static int ASN1CALL ASN1Enc_OpenLogicalChannelAck_forwardMultiplexAckParameters(ASN1encoding_t enc, OpenLogicalChannelAck_forwardMultiplexAckParameters *val)
  15126. {
  15127. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 0))
  15128. return 0;
  15129. switch ((val)->choice) {
  15130. case 1:
  15131. if (!ASN1Enc_H2250LogicalChannelAckParameters(enc, &(val)->u.h2250LogicalChannelAckParameters))
  15132. return 0;
  15133. break;
  15134. default:
  15135. /* impossible */
  15136. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  15137. return 0;
  15138. }
  15139. return 1;
  15140. }
  15141. static int ASN1CALL ASN1Dec_OpenLogicalChannelAck_forwardMultiplexAckParameters(ASN1decoding_t dec, OpenLogicalChannelAck_forwardMultiplexAckParameters *val)
  15142. {
  15143. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 0))
  15144. return 0;
  15145. switch ((val)->choice) {
  15146. case 1:
  15147. if (!ASN1Dec_H2250LogicalChannelAckParameters(dec, &(val)->u.h2250LogicalChannelAckParameters))
  15148. return 0;
  15149. break;
  15150. case 0:
  15151. /* extension case */
  15152. if (!ASN1PERDecSkipFragmented(dec, 8))
  15153. return 0;
  15154. break;
  15155. default:
  15156. /* impossible */
  15157. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  15158. return 0;
  15159. }
  15160. return 1;
  15161. }
  15162. static void ASN1CALL ASN1Free_OpenLogicalChannelAck_forwardMultiplexAckParameters(OpenLogicalChannelAck_forwardMultiplexAckParameters *val)
  15163. {
  15164. if (val) {
  15165. switch ((val)->choice) {
  15166. case 1:
  15167. ASN1Free_H2250LogicalChannelAckParameters(&(val)->u.h2250LogicalChannelAckParameters);
  15168. break;
  15169. }
  15170. }
  15171. }
  15172. static int ASN1CALL ASN1Enc_H2250LogicalChannelParameters_mediaPacketization(ASN1encoding_t enc, H2250LogicalChannelParameters_mediaPacketization *val)
  15173. {
  15174. ASN1encoding_t ee;
  15175. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 0, 1))
  15176. return 0;
  15177. switch ((val)->choice) {
  15178. case 1:
  15179. break;
  15180. case 2:
  15181. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  15182. return 0;
  15183. if (!ASN1Enc_RTPPayloadType(ee, &(val)->u.rtpPayloadType))
  15184. return 0;
  15185. if (!ASN1PEREncFlushFragmentedToParent(ee))
  15186. return 0;
  15187. ASN1_CloseEncoder2(ee);
  15188. break;
  15189. default:
  15190. /* impossible */
  15191. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  15192. return 0;
  15193. }
  15194. return 1;
  15195. }
  15196. static int ASN1CALL ASN1Dec_H2250LogicalChannelParameters_mediaPacketization(ASN1decoding_t dec, H2250LogicalChannelParameters_mediaPacketization *val)
  15197. {
  15198. ASN1decoding_t dd;
  15199. ASN1octet_t *db;
  15200. ASN1uint32_t ds;
  15201. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 0, 1))
  15202. return 0;
  15203. switch ((val)->choice) {
  15204. case 1:
  15205. break;
  15206. case 2:
  15207. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  15208. return 0;
  15209. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  15210. return 0;
  15211. if (!ASN1Dec_RTPPayloadType(dd, &(val)->u.rtpPayloadType))
  15212. return 0;
  15213. ASN1_CloseDecoder(dd);
  15214. ASN1Free(db);
  15215. break;
  15216. case 0:
  15217. /* extension case */
  15218. if (!ASN1PERDecSkipFragmented(dec, 8))
  15219. return 0;
  15220. break;
  15221. default:
  15222. /* impossible */
  15223. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  15224. return 0;
  15225. }
  15226. return 1;
  15227. }
  15228. static void ASN1CALL ASN1Free_H2250LogicalChannelParameters_mediaPacketization(H2250LogicalChannelParameters_mediaPacketization *val)
  15229. {
  15230. if (val) {
  15231. switch ((val)->choice) {
  15232. case 2:
  15233. ASN1Free_RTPPayloadType(&(val)->u.rtpPayloadType);
  15234. break;
  15235. }
  15236. }
  15237. }
  15238. static ASN1stringtableentry_t NetworkAccessParameters_networkAddress_e164Address_StringTableEntries[] = {
  15239. { 35, 35, 0 }, { 42, 42, 1 }, { 44, 44, 2 },
  15240. { 48, 57, 3 },
  15241. };
  15242. static ASN1stringtable_t NetworkAccessParameters_networkAddress_e164Address_StringTable = {
  15243. 4, NetworkAccessParameters_networkAddress_e164Address_StringTableEntries
  15244. };
  15245. static int ASN1CALL ASN1Enc_NetworkAccessParameters_networkAddress(ASN1encoding_t enc, NetworkAccessParameters_networkAddress *val)
  15246. {
  15247. ASN1uint32_t t;
  15248. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  15249. return 0;
  15250. switch ((val)->choice) {
  15251. case 1:
  15252. if (!ASN1Enc_Q2931Address(enc, &(val)->u.q2931Address))
  15253. return 0;
  15254. break;
  15255. case 2:
  15256. t = lstrlenA((val)->u.e164Address);
  15257. if (!ASN1PEREncBitVal(enc, 7, t - 1))
  15258. return 0;
  15259. ASN1PEREncAlignment(enc);
  15260. if (!ASN1PEREncTableCharString(enc, t, (val)->u.e164Address, 4, &NetworkAccessParameters_networkAddress_e164Address_StringTable))
  15261. return 0;
  15262. break;
  15263. case 3:
  15264. if (!ASN1Enc_H245TransportAddress(enc, &(val)->u.localAreaAddress))
  15265. return 0;
  15266. break;
  15267. default:
  15268. /* impossible */
  15269. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  15270. return 0;
  15271. }
  15272. return 1;
  15273. }
  15274. static int ASN1CALL ASN1Dec_NetworkAccessParameters_networkAddress(ASN1decoding_t dec, NetworkAccessParameters_networkAddress *val)
  15275. {
  15276. ASN1uint32_t l;
  15277. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  15278. return 0;
  15279. switch ((val)->choice) {
  15280. case 1:
  15281. if (!ASN1Dec_Q2931Address(dec, &(val)->u.q2931Address))
  15282. return 0;
  15283. break;
  15284. case 2:
  15285. if (!ASN1PERDecU32Val(dec, 7, &l))
  15286. return 0;
  15287. l += 1;
  15288. ASN1PERDecAlignment(dec);
  15289. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->u.e164Address, 4, &NetworkAccessParameters_networkAddress_e164Address_StringTable))
  15290. return 0;
  15291. break;
  15292. case 3:
  15293. if (!ASN1Dec_H245TransportAddress(dec, &(val)->u.localAreaAddress))
  15294. return 0;
  15295. break;
  15296. case 0:
  15297. /* extension case */
  15298. if (!ASN1PERDecSkipFragmented(dec, 8))
  15299. return 0;
  15300. break;
  15301. default:
  15302. /* impossible */
  15303. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  15304. return 0;
  15305. }
  15306. return 1;
  15307. }
  15308. static void ASN1CALL ASN1Free_NetworkAccessParameters_networkAddress(NetworkAccessParameters_networkAddress *val)
  15309. {
  15310. if (val) {
  15311. switch ((val)->choice) {
  15312. case 1:
  15313. ASN1Free_Q2931Address(&(val)->u.q2931Address);
  15314. break;
  15315. case 2:
  15316. break;
  15317. case 3:
  15318. ASN1Free_H245TransportAddress(&(val)->u.localAreaAddress);
  15319. break;
  15320. }
  15321. }
  15322. }
  15323. static int ASN1CALL ASN1Enc_DataApplicationCapability_application(ASN1encoding_t enc, DataApplicationCapability_application *val)
  15324. {
  15325. ASN1encoding_t ee;
  15326. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 10))
  15327. return 0;
  15328. switch ((val)->choice) {
  15329. case 1:
  15330. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  15331. return 0;
  15332. break;
  15333. case 2:
  15334. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.t120))
  15335. return 0;
  15336. break;
  15337. case 3:
  15338. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.dsm_cc))
  15339. return 0;
  15340. break;
  15341. case 4:
  15342. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.userData))
  15343. return 0;
  15344. break;
  15345. case 5:
  15346. if (!ASN1Enc_DataApplicationCapability_application_t84(enc, &(val)->u.t84))
  15347. return 0;
  15348. break;
  15349. case 6:
  15350. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.t434))
  15351. return 0;
  15352. break;
  15353. case 7:
  15354. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.h224))
  15355. return 0;
  15356. break;
  15357. case 8:
  15358. if (!ASN1Enc_DataApplicationCapability_application_nlpid(enc, &(val)->u.nlpid))
  15359. return 0;
  15360. break;
  15361. case 9:
  15362. break;
  15363. case 10:
  15364. if (!ASN1Enc_DataProtocolCapability(enc, &(val)->u.h222DataPartitioning))
  15365. return 0;
  15366. break;
  15367. case 11:
  15368. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  15369. return 0;
  15370. if (!ASN1Enc_DataProtocolCapability(ee, &(val)->u.t30fax))
  15371. return 0;
  15372. if (!ASN1PEREncFlushFragmentedToParent(ee))
  15373. return 0;
  15374. ASN1_CloseEncoder2(ee);
  15375. break;
  15376. case 12:
  15377. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  15378. return 0;
  15379. if (!ASN1Enc_DataProtocolCapability(ee, &(val)->u.t140))
  15380. return 0;
  15381. if (!ASN1PEREncFlushFragmentedToParent(ee))
  15382. return 0;
  15383. ASN1_CloseEncoder2(ee);
  15384. break;
  15385. default:
  15386. /* impossible */
  15387. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  15388. return 0;
  15389. }
  15390. return 1;
  15391. }
  15392. static int ASN1CALL ASN1Dec_DataApplicationCapability_application(ASN1decoding_t dec, DataApplicationCapability_application *val)
  15393. {
  15394. ASN1decoding_t dd;
  15395. ASN1octet_t *db;
  15396. ASN1uint32_t ds;
  15397. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 10))
  15398. return 0;
  15399. switch ((val)->choice) {
  15400. case 1:
  15401. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  15402. return 0;
  15403. break;
  15404. case 2:
  15405. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.t120))
  15406. return 0;
  15407. break;
  15408. case 3:
  15409. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.dsm_cc))
  15410. return 0;
  15411. break;
  15412. case 4:
  15413. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.userData))
  15414. return 0;
  15415. break;
  15416. case 5:
  15417. if (!ASN1Dec_DataApplicationCapability_application_t84(dec, &(val)->u.t84))
  15418. return 0;
  15419. break;
  15420. case 6:
  15421. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.t434))
  15422. return 0;
  15423. break;
  15424. case 7:
  15425. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.h224))
  15426. return 0;
  15427. break;
  15428. case 8:
  15429. if (!ASN1Dec_DataApplicationCapability_application_nlpid(dec, &(val)->u.nlpid))
  15430. return 0;
  15431. break;
  15432. case 9:
  15433. break;
  15434. case 10:
  15435. if (!ASN1Dec_DataProtocolCapability(dec, &(val)->u.h222DataPartitioning))
  15436. return 0;
  15437. break;
  15438. case 11:
  15439. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  15440. return 0;
  15441. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  15442. return 0;
  15443. if (!ASN1Dec_DataProtocolCapability(dd, &(val)->u.t30fax))
  15444. return 0;
  15445. ASN1_CloseDecoder(dd);
  15446. ASN1Free(db);
  15447. break;
  15448. case 12:
  15449. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  15450. return 0;
  15451. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  15452. return 0;
  15453. if (!ASN1Dec_DataProtocolCapability(dd, &(val)->u.t140))
  15454. return 0;
  15455. ASN1_CloseDecoder(dd);
  15456. ASN1Free(db);
  15457. break;
  15458. case 0:
  15459. /* extension case */
  15460. if (!ASN1PERDecSkipFragmented(dec, 8))
  15461. return 0;
  15462. break;
  15463. default:
  15464. /* impossible */
  15465. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  15466. return 0;
  15467. }
  15468. return 1;
  15469. }
  15470. static void ASN1CALL ASN1Free_DataApplicationCapability_application(DataApplicationCapability_application *val)
  15471. {
  15472. if (val) {
  15473. switch ((val)->choice) {
  15474. case 1:
  15475. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  15476. break;
  15477. case 2:
  15478. ASN1Free_DataProtocolCapability(&(val)->u.t120);
  15479. break;
  15480. case 3:
  15481. ASN1Free_DataProtocolCapability(&(val)->u.dsm_cc);
  15482. break;
  15483. case 4:
  15484. ASN1Free_DataProtocolCapability(&(val)->u.userData);
  15485. break;
  15486. case 5:
  15487. ASN1Free_DataApplicationCapability_application_t84(&(val)->u.t84);
  15488. break;
  15489. case 6:
  15490. ASN1Free_DataProtocolCapability(&(val)->u.t434);
  15491. break;
  15492. case 7:
  15493. ASN1Free_DataProtocolCapability(&(val)->u.h224);
  15494. break;
  15495. case 8:
  15496. ASN1Free_DataApplicationCapability_application_nlpid(&(val)->u.nlpid);
  15497. break;
  15498. case 10:
  15499. ASN1Free_DataProtocolCapability(&(val)->u.h222DataPartitioning);
  15500. break;
  15501. case 11:
  15502. ASN1Free_DataProtocolCapability(&(val)->u.t30fax);
  15503. break;
  15504. case 12:
  15505. ASN1Free_DataProtocolCapability(&(val)->u.t140);
  15506. break;
  15507. }
  15508. }
  15509. }
  15510. static int ASN1CALL ASN1Enc_EnhancementLayerInfo_spatialEnhancement(ASN1encoding_t enc, PEnhancementLayerInfo_spatialEnhancement *val)
  15511. {
  15512. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_EnhancementLayerInfo_spatialEnhancement_ElmFn, 1, 14, 4);
  15513. }
  15514. static int ASN1CALL ASN1Enc_EnhancementLayerInfo_spatialEnhancement_ElmFn(ASN1encoding_t enc, PEnhancementLayerInfo_spatialEnhancement val)
  15515. {
  15516. if (!ASN1Enc_EnhancementOptions(enc, &val->value))
  15517. return 0;
  15518. return 1;
  15519. }
  15520. static int ASN1CALL ASN1Dec_EnhancementLayerInfo_spatialEnhancement(ASN1decoding_t dec, PEnhancementLayerInfo_spatialEnhancement *val)
  15521. {
  15522. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_EnhancementLayerInfo_spatialEnhancement_ElmFn, sizeof(**val), 1, 14, 4);
  15523. }
  15524. static int ASN1CALL ASN1Dec_EnhancementLayerInfo_spatialEnhancement_ElmFn(ASN1decoding_t dec, PEnhancementLayerInfo_spatialEnhancement val)
  15525. {
  15526. if (!ASN1Dec_EnhancementOptions(dec, &val->value))
  15527. return 0;
  15528. return 1;
  15529. }
  15530. static void ASN1CALL ASN1Free_EnhancementLayerInfo_spatialEnhancement(PEnhancementLayerInfo_spatialEnhancement *val)
  15531. {
  15532. if (val) {
  15533. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_EnhancementLayerInfo_spatialEnhancement_ElmFn);
  15534. }
  15535. }
  15536. static void ASN1CALL ASN1Free_EnhancementLayerInfo_spatialEnhancement_ElmFn(PEnhancementLayerInfo_spatialEnhancement val)
  15537. {
  15538. if (val) {
  15539. ASN1Free_EnhancementOptions(&val->value);
  15540. }
  15541. }
  15542. static int ASN1CALL ASN1Enc_EnhancementLayerInfo_snrEnhancement(ASN1encoding_t enc, PEnhancementLayerInfo_snrEnhancement *val)
  15543. {
  15544. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_EnhancementLayerInfo_snrEnhancement_ElmFn, 1, 14, 4);
  15545. }
  15546. static int ASN1CALL ASN1Enc_EnhancementLayerInfo_snrEnhancement_ElmFn(ASN1encoding_t enc, PEnhancementLayerInfo_snrEnhancement val)
  15547. {
  15548. if (!ASN1Enc_EnhancementOptions(enc, &val->value))
  15549. return 0;
  15550. return 1;
  15551. }
  15552. static int ASN1CALL ASN1Dec_EnhancementLayerInfo_snrEnhancement(ASN1decoding_t dec, PEnhancementLayerInfo_snrEnhancement *val)
  15553. {
  15554. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_EnhancementLayerInfo_snrEnhancement_ElmFn, sizeof(**val), 1, 14, 4);
  15555. }
  15556. static int ASN1CALL ASN1Dec_EnhancementLayerInfo_snrEnhancement_ElmFn(ASN1decoding_t dec, PEnhancementLayerInfo_snrEnhancement val)
  15557. {
  15558. if (!ASN1Dec_EnhancementOptions(dec, &val->value))
  15559. return 0;
  15560. return 1;
  15561. }
  15562. static void ASN1CALL ASN1Free_EnhancementLayerInfo_snrEnhancement(PEnhancementLayerInfo_snrEnhancement *val)
  15563. {
  15564. if (val) {
  15565. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_EnhancementLayerInfo_snrEnhancement_ElmFn);
  15566. }
  15567. }
  15568. static void ASN1CALL ASN1Free_EnhancementLayerInfo_snrEnhancement_ElmFn(PEnhancementLayerInfo_snrEnhancement val)
  15569. {
  15570. if (val) {
  15571. ASN1Free_EnhancementOptions(&val->value);
  15572. }
  15573. }
  15574. static int ASN1CALL ASN1Enc_MediaPacketizationCapability_rtpPayloadType(ASN1encoding_t enc, MediaPacketizationCapability_rtpPayloadType *val)
  15575. {
  15576. ASN1uint32_t i;
  15577. ASN1PEREncAlignment(enc);
  15578. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  15579. return 0;
  15580. for (i = 0; i < (val)->count; i++) {
  15581. if (!ASN1Enc_RTPPayloadType(enc, &((val)->value)[i]))
  15582. return 0;
  15583. }
  15584. return 1;
  15585. }
  15586. static int ASN1CALL ASN1Dec_MediaPacketizationCapability_rtpPayloadType(ASN1decoding_t dec, MediaPacketizationCapability_rtpPayloadType *val)
  15587. {
  15588. ASN1uint32_t i;
  15589. ASN1PERDecAlignment(dec);
  15590. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  15591. return 0;
  15592. (val)->count += 1;
  15593. for (i = 0; i < (val)->count; i++) {
  15594. if (!ASN1Dec_RTPPayloadType(dec, &((val)->value)[i]))
  15595. return 0;
  15596. }
  15597. return 1;
  15598. }
  15599. static void ASN1CALL ASN1Free_MediaPacketizationCapability_rtpPayloadType(MediaPacketizationCapability_rtpPayloadType *val)
  15600. {
  15601. ASN1uint32_t i;
  15602. if (val) {
  15603. for (i = 0; i < (val)->count; i++) {
  15604. ASN1Free_RTPPayloadType(&(val)->value[i]);
  15605. }
  15606. }
  15607. }
  15608. static int ASN1CALL ASN1Enc_H2250Capability_redundancyEncodingCapability(ASN1encoding_t enc, PH2250Capability_redundancyEncodingCapability *val)
  15609. {
  15610. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_H2250Capability_redundancyEncodingCapability_ElmFn, 1, 256, 8);
  15611. }
  15612. static int ASN1CALL ASN1Enc_H2250Capability_redundancyEncodingCapability_ElmFn(ASN1encoding_t enc, PH2250Capability_redundancyEncodingCapability val)
  15613. {
  15614. if (!ASN1Enc_RedundancyEncodingCapability(enc, &val->value))
  15615. return 0;
  15616. return 1;
  15617. }
  15618. static int ASN1CALL ASN1Dec_H2250Capability_redundancyEncodingCapability(ASN1decoding_t dec, PH2250Capability_redundancyEncodingCapability *val)
  15619. {
  15620. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_H2250Capability_redundancyEncodingCapability_ElmFn, sizeof(**val), 1, 256, 8);
  15621. }
  15622. static int ASN1CALL ASN1Dec_H2250Capability_redundancyEncodingCapability_ElmFn(ASN1decoding_t dec, PH2250Capability_redundancyEncodingCapability val)
  15623. {
  15624. if (!ASN1Dec_RedundancyEncodingCapability(dec, &val->value))
  15625. return 0;
  15626. return 1;
  15627. }
  15628. static void ASN1CALL ASN1Free_H2250Capability_redundancyEncodingCapability(PH2250Capability_redundancyEncodingCapability *val)
  15629. {
  15630. if (val) {
  15631. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_H2250Capability_redundancyEncodingCapability_ElmFn);
  15632. }
  15633. }
  15634. static void ASN1CALL ASN1Free_H2250Capability_redundancyEncodingCapability_ElmFn(PH2250Capability_redundancyEncodingCapability val)
  15635. {
  15636. if (val) {
  15637. ASN1Free_RedundancyEncodingCapability(&val->value);
  15638. }
  15639. }
  15640. static int ASN1CALL ASN1Enc_CommandMessage(ASN1encoding_t enc, CommandMessage *val)
  15641. {
  15642. ASN1encoding_t ee;
  15643. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 7))
  15644. return 0;
  15645. switch ((val)->choice) {
  15646. case 1:
  15647. if (!ASN1Enc_NonStandardMessage(enc, &(val)->u.nonStandard))
  15648. return 0;
  15649. break;
  15650. case 2:
  15651. if (!ASN1Enc_MaintenanceLoopOffCommand(enc, &(val)->u.maintenanceLoopOffCommand))
  15652. return 0;
  15653. break;
  15654. case 3:
  15655. if (!ASN1Enc_SendTerminalCapabilitySet(enc, &(val)->u.sendTerminalCapabilitySet))
  15656. return 0;
  15657. break;
  15658. case 4:
  15659. if (!ASN1Enc_EncryptionCommand(enc, &(val)->u.encryptionCommand))
  15660. return 0;
  15661. break;
  15662. case 5:
  15663. if (!ASN1Enc_FlowControlCommand(enc, &(val)->u.flowControlCommand))
  15664. return 0;
  15665. break;
  15666. case 6:
  15667. if (!ASN1Enc_EndSessionCommand(enc, &(val)->u.endSessionCommand))
  15668. return 0;
  15669. break;
  15670. case 7:
  15671. if (!ASN1Enc_MiscellaneousCommand(enc, &(val)->u.miscellaneousCommand))
  15672. return 0;
  15673. break;
  15674. case 8:
  15675. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  15676. return 0;
  15677. if (!ASN1Enc_CommunicationModeCommand(ee, &(val)->u.communicationModeCommand))
  15678. return 0;
  15679. if (!ASN1PEREncFlushFragmentedToParent(ee))
  15680. return 0;
  15681. ASN1_CloseEncoder2(ee);
  15682. break;
  15683. case 9:
  15684. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  15685. return 0;
  15686. if (!ASN1Enc_ConferenceCommand(ee, &(val)->u.conferenceCommand))
  15687. return 0;
  15688. if (!ASN1PEREncFlushFragmentedToParent(ee))
  15689. return 0;
  15690. ASN1_CloseEncoder2(ee);
  15691. break;
  15692. case 10:
  15693. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  15694. return 0;
  15695. if (!ASN1Enc_H223MultiplexReconfiguration(ee, &(val)->u.h223MultiplexReconfiguration))
  15696. return 0;
  15697. if (!ASN1PEREncFlushFragmentedToParent(ee))
  15698. return 0;
  15699. ASN1_CloseEncoder2(ee);
  15700. break;
  15701. default:
  15702. /* impossible */
  15703. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  15704. return 0;
  15705. }
  15706. return 1;
  15707. }
  15708. static int ASN1CALL ASN1Dec_CommandMessage(ASN1decoding_t dec, CommandMessage *val)
  15709. {
  15710. ASN1decoding_t dd;
  15711. ASN1octet_t *db;
  15712. ASN1uint32_t ds;
  15713. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 7))
  15714. return 0;
  15715. switch ((val)->choice) {
  15716. case 1:
  15717. if (!ASN1Dec_NonStandardMessage(dec, &(val)->u.nonStandard))
  15718. return 0;
  15719. break;
  15720. case 2:
  15721. if (!ASN1Dec_MaintenanceLoopOffCommand(dec, &(val)->u.maintenanceLoopOffCommand))
  15722. return 0;
  15723. break;
  15724. case 3:
  15725. if (!ASN1Dec_SendTerminalCapabilitySet(dec, &(val)->u.sendTerminalCapabilitySet))
  15726. return 0;
  15727. break;
  15728. case 4:
  15729. if (!ASN1Dec_EncryptionCommand(dec, &(val)->u.encryptionCommand))
  15730. return 0;
  15731. break;
  15732. case 5:
  15733. if (!ASN1Dec_FlowControlCommand(dec, &(val)->u.flowControlCommand))
  15734. return 0;
  15735. break;
  15736. case 6:
  15737. if (!ASN1Dec_EndSessionCommand(dec, &(val)->u.endSessionCommand))
  15738. return 0;
  15739. break;
  15740. case 7:
  15741. if (!ASN1Dec_MiscellaneousCommand(dec, &(val)->u.miscellaneousCommand))
  15742. return 0;
  15743. break;
  15744. case 8:
  15745. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  15746. return 0;
  15747. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  15748. return 0;
  15749. if (!ASN1Dec_CommunicationModeCommand(dd, &(val)->u.communicationModeCommand))
  15750. return 0;
  15751. ASN1_CloseDecoder(dd);
  15752. ASN1Free(db);
  15753. break;
  15754. case 9:
  15755. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  15756. return 0;
  15757. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  15758. return 0;
  15759. if (!ASN1Dec_ConferenceCommand(dd, &(val)->u.conferenceCommand))
  15760. return 0;
  15761. ASN1_CloseDecoder(dd);
  15762. ASN1Free(db);
  15763. break;
  15764. case 10:
  15765. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  15766. return 0;
  15767. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  15768. return 0;
  15769. if (!ASN1Dec_H223MultiplexReconfiguration(dd, &(val)->u.h223MultiplexReconfiguration))
  15770. return 0;
  15771. ASN1_CloseDecoder(dd);
  15772. ASN1Free(db);
  15773. break;
  15774. case 0:
  15775. /* extension case */
  15776. if (!ASN1PERDecSkipFragmented(dec, 8))
  15777. return 0;
  15778. break;
  15779. default:
  15780. /* impossible */
  15781. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  15782. return 0;
  15783. }
  15784. return 1;
  15785. }
  15786. static void ASN1CALL ASN1Free_CommandMessage(CommandMessage *val)
  15787. {
  15788. if (val) {
  15789. switch ((val)->choice) {
  15790. case 1:
  15791. ASN1Free_NonStandardMessage(&(val)->u.nonStandard);
  15792. break;
  15793. case 3:
  15794. ASN1Free_SendTerminalCapabilitySet(&(val)->u.sendTerminalCapabilitySet);
  15795. break;
  15796. case 4:
  15797. ASN1Free_EncryptionCommand(&(val)->u.encryptionCommand);
  15798. break;
  15799. case 6:
  15800. ASN1Free_EndSessionCommand(&(val)->u.endSessionCommand);
  15801. break;
  15802. case 7:
  15803. ASN1Free_MiscellaneousCommand(&(val)->u.miscellaneousCommand);
  15804. break;
  15805. case 8:
  15806. ASN1Free_CommunicationModeCommand(&(val)->u.communicationModeCommand);
  15807. break;
  15808. case 9:
  15809. ASN1Free_ConferenceCommand(&(val)->u.conferenceCommand);
  15810. break;
  15811. }
  15812. }
  15813. }
  15814. static int ASN1CALL ASN1Enc_H235SecurityCapability(ASN1encoding_t enc, H235SecurityCapability *val)
  15815. {
  15816. if (!ASN1PEREncExtensionBitClear(enc))
  15817. return 0;
  15818. if (!ASN1Enc_EncryptionAuthenticationAndIntegrity(enc, &(val)->encryptionAuthenticationAndIntegrity))
  15819. return 0;
  15820. if (!ASN1PEREncUnsignedShort(enc, (val)->mediaCapability - 1))
  15821. return 0;
  15822. return 1;
  15823. }
  15824. static int ASN1CALL ASN1Dec_H235SecurityCapability(ASN1decoding_t dec, H235SecurityCapability *val)
  15825. {
  15826. ASN1uint32_t y;
  15827. if (!ASN1PERDecExtensionBit(dec, &y))
  15828. return 0;
  15829. if (!ASN1Dec_EncryptionAuthenticationAndIntegrity(dec, &(val)->encryptionAuthenticationAndIntegrity))
  15830. return 0;
  15831. if (!ASN1PERDecUnsignedShort(dec, &(val)->mediaCapability))
  15832. return 0;
  15833. (val)->mediaCapability += 1;
  15834. if (y) {
  15835. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  15836. return 0;
  15837. }
  15838. return 1;
  15839. }
  15840. static void ASN1CALL ASN1Free_H235SecurityCapability(H235SecurityCapability *val)
  15841. {
  15842. if (val) {
  15843. ASN1Free_EncryptionAuthenticationAndIntegrity(&(val)->encryptionAuthenticationAndIntegrity);
  15844. }
  15845. }
  15846. static int ASN1CALL ASN1Enc_MediaPacketizationCapability(ASN1encoding_t enc, MediaPacketizationCapability *val)
  15847. {
  15848. ASN1uint32_t y;
  15849. ASN1encoding_t ee;
  15850. y = ASN1PEREncCheckExtensions(1, (val)->o + 0);
  15851. if (!ASN1PEREncBitVal(enc, 1, y))
  15852. return 0;
  15853. if (!ASN1PEREncBoolean(enc, (val)->h261aVideoPacketization))
  15854. return 0;
  15855. if (y) {
  15856. if (!ASN1PEREncNormallySmallBits(enc, 1, (val)->o + 0))
  15857. return 0;
  15858. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  15859. return 0;
  15860. if ((val)->o[0] & 0x80) {
  15861. if (!ASN1Enc_MediaPacketizationCapability_rtpPayloadType(ee, &(val)->rtpPayloadType))
  15862. return 0;
  15863. if (!ASN1PEREncFlushFragmentedToParent(ee))
  15864. return 0;
  15865. }
  15866. ASN1_CloseEncoder2(ee);
  15867. }
  15868. return 1;
  15869. }
  15870. static int ASN1CALL ASN1Dec_MediaPacketizationCapability(ASN1decoding_t dec, MediaPacketizationCapability *val)
  15871. {
  15872. ASN1uint32_t y;
  15873. ASN1decoding_t dd;
  15874. ASN1octet_t *db;
  15875. ASN1uint32_t ds;
  15876. ASN1uint32_t i;
  15877. ASN1uint32_t e;
  15878. if (!ASN1PERDecExtensionBit(dec, &y))
  15879. return 0;
  15880. if (!ASN1PERDecBoolean(dec, &(val)->h261aVideoPacketization))
  15881. return 0;
  15882. if (!y) {
  15883. ZeroMemory((val)->o + 0, 1);
  15884. } else {
  15885. if (!ASN1PERDecNormallySmallExtension(dec, &e, 1, (val)->o + 0))
  15886. return 0;
  15887. if ((val)->o[0] & 0x80) {
  15888. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  15889. return 0;
  15890. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  15891. return 0;
  15892. if (!ASN1Dec_MediaPacketizationCapability_rtpPayloadType(dd, &(val)->rtpPayloadType))
  15893. return 0;
  15894. ASN1_CloseDecoder(dd);
  15895. ASN1Free(db);
  15896. }
  15897. for (i = 0; i < e; i++) {
  15898. if (!ASN1PERDecSkipFragmented(dec, 8))
  15899. return 0;
  15900. }
  15901. }
  15902. return 1;
  15903. }
  15904. static void ASN1CALL ASN1Free_MediaPacketizationCapability(MediaPacketizationCapability *val)
  15905. {
  15906. if (val) {
  15907. if ((val)->o[0] & 0x80) {
  15908. ASN1Free_MediaPacketizationCapability_rtpPayloadType(&(val)->rtpPayloadType);
  15909. }
  15910. }
  15911. }
  15912. static int ASN1CALL ASN1Enc_VideoCapability(ASN1encoding_t enc, VideoCapability *val)
  15913. {
  15914. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  15915. return 0;
  15916. switch ((val)->choice) {
  15917. case 1:
  15918. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  15919. return 0;
  15920. break;
  15921. case 2:
  15922. if (!ASN1Enc_H261VideoCapability(enc, &(val)->u.h261VideoCapability))
  15923. return 0;
  15924. break;
  15925. case 3:
  15926. if (!ASN1Enc_H262VideoCapability(enc, &(val)->u.h262VideoCapability))
  15927. return 0;
  15928. break;
  15929. case 4:
  15930. if (!ASN1Enc_H263VideoCapability(enc, &(val)->u.h263VideoCapability))
  15931. return 0;
  15932. break;
  15933. case 5:
  15934. if (!ASN1Enc_IS11172VideoCapability(enc, &(val)->u.is11172VideoCapability))
  15935. return 0;
  15936. break;
  15937. default:
  15938. /* impossible */
  15939. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  15940. return 0;
  15941. }
  15942. return 1;
  15943. }
  15944. static int ASN1CALL ASN1Dec_VideoCapability(ASN1decoding_t dec, VideoCapability *val)
  15945. {
  15946. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  15947. return 0;
  15948. switch ((val)->choice) {
  15949. case 1:
  15950. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  15951. return 0;
  15952. break;
  15953. case 2:
  15954. if (!ASN1Dec_H261VideoCapability(dec, &(val)->u.h261VideoCapability))
  15955. return 0;
  15956. break;
  15957. case 3:
  15958. if (!ASN1Dec_H262VideoCapability(dec, &(val)->u.h262VideoCapability))
  15959. return 0;
  15960. break;
  15961. case 4:
  15962. if (!ASN1Dec_H263VideoCapability(dec, &(val)->u.h263VideoCapability))
  15963. return 0;
  15964. break;
  15965. case 5:
  15966. if (!ASN1Dec_IS11172VideoCapability(dec, &(val)->u.is11172VideoCapability))
  15967. return 0;
  15968. break;
  15969. case 0:
  15970. /* extension case */
  15971. if (!ASN1PERDecSkipFragmented(dec, 8))
  15972. return 0;
  15973. break;
  15974. default:
  15975. /* impossible */
  15976. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  15977. return 0;
  15978. }
  15979. return 1;
  15980. }
  15981. static void ASN1CALL ASN1Free_VideoCapability(VideoCapability *val)
  15982. {
  15983. if (val) {
  15984. switch ((val)->choice) {
  15985. case 1:
  15986. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  15987. break;
  15988. case 4:
  15989. ASN1Free_H263VideoCapability(&(val)->u.h263VideoCapability);
  15990. break;
  15991. }
  15992. }
  15993. }
  15994. static int ASN1CALL ASN1Enc_BEnhancementParameters(ASN1encoding_t enc, BEnhancementParameters *val)
  15995. {
  15996. if (!ASN1PEREncExtensionBitClear(enc))
  15997. return 0;
  15998. if (!ASN1Enc_EnhancementOptions(enc, &(val)->enhancementOptions))
  15999. return 0;
  16000. if (!ASN1PEREncBitVal(enc, 6, (val)->numberOfBPictures - 1))
  16001. return 0;
  16002. return 1;
  16003. }
  16004. static int ASN1CALL ASN1Dec_BEnhancementParameters(ASN1decoding_t dec, BEnhancementParameters *val)
  16005. {
  16006. ASN1uint32_t y;
  16007. if (!ASN1PERDecExtensionBit(dec, &y))
  16008. return 0;
  16009. if (!ASN1Dec_EnhancementOptions(dec, &(val)->enhancementOptions))
  16010. return 0;
  16011. if (!ASN1PERDecU16Val(dec, 6, &(val)->numberOfBPictures))
  16012. return 0;
  16013. (val)->numberOfBPictures += 1;
  16014. if (y) {
  16015. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  16016. return 0;
  16017. }
  16018. return 1;
  16019. }
  16020. static void ASN1CALL ASN1Free_BEnhancementParameters(BEnhancementParameters *val)
  16021. {
  16022. if (val) {
  16023. ASN1Free_EnhancementOptions(&(val)->enhancementOptions);
  16024. }
  16025. }
  16026. static int ASN1CALL ASN1Enc_DataApplicationCapability(ASN1encoding_t enc, DataApplicationCapability *val)
  16027. {
  16028. ASN1uint32_t l;
  16029. if (!ASN1PEREncExtensionBitClear(enc))
  16030. return 0;
  16031. if (!ASN1Enc_DataApplicationCapability_application(enc, &(val)->application))
  16032. return 0;
  16033. l = ASN1uint32_uoctets((val)->maxBitRate);
  16034. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  16035. return 0;
  16036. ASN1PEREncAlignment(enc);
  16037. if (!ASN1PEREncBitVal(enc, l * 8, (val)->maxBitRate))
  16038. return 0;
  16039. return 1;
  16040. }
  16041. static int ASN1CALL ASN1Dec_DataApplicationCapability(ASN1decoding_t dec, DataApplicationCapability *val)
  16042. {
  16043. ASN1uint32_t y;
  16044. ASN1uint32_t l;
  16045. if (!ASN1PERDecExtensionBit(dec, &y))
  16046. return 0;
  16047. if (!ASN1Dec_DataApplicationCapability_application(dec, &(val)->application))
  16048. return 0;
  16049. if (!ASN1PERDecU32Val(dec, 2, &l))
  16050. return 0;
  16051. l += 1;
  16052. ASN1PERDecAlignment(dec);
  16053. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->maxBitRate))
  16054. return 0;
  16055. if (y) {
  16056. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  16057. return 0;
  16058. }
  16059. return 1;
  16060. }
  16061. static void ASN1CALL ASN1Free_DataApplicationCapability(DataApplicationCapability *val)
  16062. {
  16063. if (val) {
  16064. ASN1Free_DataApplicationCapability_application(&(val)->application);
  16065. }
  16066. }
  16067. static int ASN1CALL ASN1Enc_NetworkAccessParameters(ASN1encoding_t enc, NetworkAccessParameters *val)
  16068. {
  16069. ASN1uint32_t y;
  16070. ASN1encoding_t ee;
  16071. y = ASN1PEREncCheckExtensions(1, (val)->o + 1);
  16072. if (!ASN1PEREncBitVal(enc, 1, y))
  16073. return 0;
  16074. if (!ASN1PEREncBits(enc, 2, (val)->o))
  16075. return 0;
  16076. if ((val)->o[0] & 0x80) {
  16077. if (!ASN1Enc_NetworkAccessParameters_distribution(enc, &(val)->distribution))
  16078. return 0;
  16079. }
  16080. if (!ASN1Enc_NetworkAccessParameters_networkAddress(enc, &(val)->networkAddress))
  16081. return 0;
  16082. if (!ASN1PEREncBoolean(enc, (val)->associateConference))
  16083. return 0;
  16084. if ((val)->o[0] & 0x40) {
  16085. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->externalReference, 1, 255, 8))
  16086. return 0;
  16087. }
  16088. if (y) {
  16089. if (!ASN1PEREncNormallySmallBits(enc, 1, (val)->o + 1))
  16090. return 0;
  16091. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  16092. return 0;
  16093. if ((val)->o[1] & 0x80) {
  16094. if (!ASN1Enc_NetworkAccessParameters_t120SetupProcedure(ee, &(val)->t120SetupProcedure))
  16095. return 0;
  16096. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16097. return 0;
  16098. }
  16099. ASN1_CloseEncoder2(ee);
  16100. }
  16101. return 1;
  16102. }
  16103. static int ASN1CALL ASN1Dec_NetworkAccessParameters(ASN1decoding_t dec, NetworkAccessParameters *val)
  16104. {
  16105. ASN1uint32_t y;
  16106. ASN1decoding_t dd;
  16107. ASN1octet_t *db;
  16108. ASN1uint32_t ds;
  16109. ASN1uint32_t i;
  16110. ASN1uint32_t e;
  16111. if (!ASN1PERDecExtensionBit(dec, &y))
  16112. return 0;
  16113. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  16114. return 0;
  16115. if ((val)->o[0] & 0x80) {
  16116. if (!ASN1Dec_NetworkAccessParameters_distribution(dec, &(val)->distribution))
  16117. return 0;
  16118. }
  16119. if (!ASN1Dec_NetworkAccessParameters_networkAddress(dec, &(val)->networkAddress))
  16120. return 0;
  16121. if (!ASN1PERDecBoolean(dec, &(val)->associateConference))
  16122. return 0;
  16123. if ((val)->o[0] & 0x40) {
  16124. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->externalReference, 1, 255, 8))
  16125. return 0;
  16126. }
  16127. if (!y) {
  16128. ZeroMemory((val)->o + 1, 1);
  16129. } else {
  16130. if (!ASN1PERDecNormallySmallExtension(dec, &e, 1, (val)->o + 1))
  16131. return 0;
  16132. if ((val)->o[1] & 0x80) {
  16133. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16134. return 0;
  16135. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16136. return 0;
  16137. if (!ASN1Dec_NetworkAccessParameters_t120SetupProcedure(dd, &(val)->t120SetupProcedure))
  16138. return 0;
  16139. ASN1_CloseDecoder(dd);
  16140. ASN1Free(db);
  16141. }
  16142. for (i = 0; i < e; i++) {
  16143. if (!ASN1PERDecSkipFragmented(dec, 8))
  16144. return 0;
  16145. }
  16146. }
  16147. return 1;
  16148. }
  16149. static void ASN1CALL ASN1Free_NetworkAccessParameters(NetworkAccessParameters *val)
  16150. {
  16151. if (val) {
  16152. ASN1Free_NetworkAccessParameters_networkAddress(&(val)->networkAddress);
  16153. if ((val)->o[0] & 0x40) {
  16154. }
  16155. }
  16156. }
  16157. static int ASN1CALL ASN1Enc_H2250ModeParameters(ASN1encoding_t enc, H2250ModeParameters *val)
  16158. {
  16159. if (!ASN1PEREncExtensionBitClear(enc))
  16160. return 0;
  16161. if (!ASN1PEREncBits(enc, 1, (val)->o))
  16162. return 0;
  16163. if ((val)->o[0] & 0x80) {
  16164. if (!ASN1Enc_RedundancyEncodingMode(enc, &(val)->redundancyEncodingMode))
  16165. return 0;
  16166. }
  16167. return 1;
  16168. }
  16169. static int ASN1CALL ASN1Dec_H2250ModeParameters(ASN1decoding_t dec, H2250ModeParameters *val)
  16170. {
  16171. ASN1uint32_t y;
  16172. if (!ASN1PERDecExtensionBit(dec, &y))
  16173. return 0;
  16174. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  16175. return 0;
  16176. if ((val)->o[0] & 0x80) {
  16177. if (!ASN1Dec_RedundancyEncodingMode(dec, &(val)->redundancyEncodingMode))
  16178. return 0;
  16179. }
  16180. if (y) {
  16181. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  16182. return 0;
  16183. }
  16184. return 1;
  16185. }
  16186. static void ASN1CALL ASN1Free_H2250ModeParameters(H2250ModeParameters *val)
  16187. {
  16188. if (val) {
  16189. if ((val)->o[0] & 0x80) {
  16190. ASN1Free_RedundancyEncodingMode(&(val)->redundancyEncodingMode);
  16191. }
  16192. }
  16193. }
  16194. static int ASN1CALL ASN1Enc_DataMode(ASN1encoding_t enc, DataMode *val)
  16195. {
  16196. ASN1uint32_t l;
  16197. if (!ASN1PEREncExtensionBitClear(enc))
  16198. return 0;
  16199. if (!ASN1Enc_DataMode_application(enc, &(val)->application))
  16200. return 0;
  16201. l = ASN1uint32_uoctets((val)->bitRate);
  16202. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  16203. return 0;
  16204. ASN1PEREncAlignment(enc);
  16205. if (!ASN1PEREncBitVal(enc, l * 8, (val)->bitRate))
  16206. return 0;
  16207. return 1;
  16208. }
  16209. static int ASN1CALL ASN1Dec_DataMode(ASN1decoding_t dec, DataMode *val)
  16210. {
  16211. ASN1uint32_t y;
  16212. ASN1uint32_t l;
  16213. if (!ASN1PERDecExtensionBit(dec, &y))
  16214. return 0;
  16215. if (!ASN1Dec_DataMode_application(dec, &(val)->application))
  16216. return 0;
  16217. if (!ASN1PERDecU32Val(dec, 2, &l))
  16218. return 0;
  16219. l += 1;
  16220. ASN1PERDecAlignment(dec);
  16221. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->bitRate))
  16222. return 0;
  16223. if (y) {
  16224. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  16225. return 0;
  16226. }
  16227. return 1;
  16228. }
  16229. static void ASN1CALL ASN1Free_DataMode(DataMode *val)
  16230. {
  16231. if (val) {
  16232. ASN1Free_DataMode_application(&(val)->application);
  16233. }
  16234. }
  16235. static int ASN1CALL ASN1Enc_CommunicationModeTableEntry_dataType(ASN1encoding_t enc, CommunicationModeTableEntry_dataType *val)
  16236. {
  16237. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  16238. return 0;
  16239. switch ((val)->choice) {
  16240. case 1:
  16241. if (!ASN1Enc_VideoCapability(enc, &(val)->u.videoData))
  16242. return 0;
  16243. break;
  16244. case 2:
  16245. if (!ASN1Enc_AudioCapability(enc, &(val)->u.audioData))
  16246. return 0;
  16247. break;
  16248. case 3:
  16249. if (!ASN1Enc_DataApplicationCapability(enc, &(val)->u.data))
  16250. return 0;
  16251. break;
  16252. default:
  16253. /* impossible */
  16254. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  16255. return 0;
  16256. }
  16257. return 1;
  16258. }
  16259. static int ASN1CALL ASN1Dec_CommunicationModeTableEntry_dataType(ASN1decoding_t dec, CommunicationModeTableEntry_dataType *val)
  16260. {
  16261. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  16262. return 0;
  16263. switch ((val)->choice) {
  16264. case 1:
  16265. if (!ASN1Dec_VideoCapability(dec, &(val)->u.videoData))
  16266. return 0;
  16267. break;
  16268. case 2:
  16269. if (!ASN1Dec_AudioCapability(dec, &(val)->u.audioData))
  16270. return 0;
  16271. break;
  16272. case 3:
  16273. if (!ASN1Dec_DataApplicationCapability(dec, &(val)->u.data))
  16274. return 0;
  16275. break;
  16276. case 0:
  16277. /* extension case */
  16278. if (!ASN1PERDecSkipFragmented(dec, 8))
  16279. return 0;
  16280. break;
  16281. default:
  16282. /* impossible */
  16283. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  16284. return 0;
  16285. }
  16286. return 1;
  16287. }
  16288. static void ASN1CALL ASN1Free_CommunicationModeTableEntry_dataType(CommunicationModeTableEntry_dataType *val)
  16289. {
  16290. if (val) {
  16291. switch ((val)->choice) {
  16292. case 1:
  16293. ASN1Free_VideoCapability(&(val)->u.videoData);
  16294. break;
  16295. case 2:
  16296. ASN1Free_AudioCapability(&(val)->u.audioData);
  16297. break;
  16298. case 3:
  16299. ASN1Free_DataApplicationCapability(&(val)->u.data);
  16300. break;
  16301. }
  16302. }
  16303. }
  16304. static int ASN1CALL ASN1Enc_H235Mode_mediaMode(ASN1encoding_t enc, H235Mode_mediaMode *val)
  16305. {
  16306. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  16307. return 0;
  16308. switch ((val)->choice) {
  16309. case 1:
  16310. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  16311. return 0;
  16312. break;
  16313. case 2:
  16314. if (!ASN1Enc_VideoMode(enc, &(val)->u.videoMode))
  16315. return 0;
  16316. break;
  16317. case 3:
  16318. if (!ASN1Enc_AudioMode(enc, &(val)->u.audioMode))
  16319. return 0;
  16320. break;
  16321. case 4:
  16322. if (!ASN1Enc_DataMode(enc, &(val)->u.dataMode))
  16323. return 0;
  16324. break;
  16325. default:
  16326. /* impossible */
  16327. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  16328. return 0;
  16329. }
  16330. return 1;
  16331. }
  16332. static int ASN1CALL ASN1Dec_H235Mode_mediaMode(ASN1decoding_t dec, H235Mode_mediaMode *val)
  16333. {
  16334. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  16335. return 0;
  16336. switch ((val)->choice) {
  16337. case 1:
  16338. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  16339. return 0;
  16340. break;
  16341. case 2:
  16342. if (!ASN1Dec_VideoMode(dec, &(val)->u.videoMode))
  16343. return 0;
  16344. break;
  16345. case 3:
  16346. if (!ASN1Dec_AudioMode(dec, &(val)->u.audioMode))
  16347. return 0;
  16348. break;
  16349. case 4:
  16350. if (!ASN1Dec_DataMode(dec, &(val)->u.dataMode))
  16351. return 0;
  16352. break;
  16353. case 0:
  16354. /* extension case */
  16355. if (!ASN1PERDecSkipFragmented(dec, 8))
  16356. return 0;
  16357. break;
  16358. default:
  16359. /* impossible */
  16360. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  16361. return 0;
  16362. }
  16363. return 1;
  16364. }
  16365. static void ASN1CALL ASN1Free_H235Mode_mediaMode(H235Mode_mediaMode *val)
  16366. {
  16367. if (val) {
  16368. switch ((val)->choice) {
  16369. case 1:
  16370. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  16371. break;
  16372. case 2:
  16373. ASN1Free_VideoMode(&(val)->u.videoMode);
  16374. break;
  16375. case 3:
  16376. ASN1Free_AudioMode(&(val)->u.audioMode);
  16377. break;
  16378. case 4:
  16379. ASN1Free_DataMode(&(val)->u.dataMode);
  16380. break;
  16381. }
  16382. }
  16383. }
  16384. static int ASN1CALL ASN1Enc_H235Media_mediaType(ASN1encoding_t enc, H235Media_mediaType *val)
  16385. {
  16386. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  16387. return 0;
  16388. switch ((val)->choice) {
  16389. case 1:
  16390. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  16391. return 0;
  16392. break;
  16393. case 2:
  16394. if (!ASN1Enc_VideoCapability(enc, &(val)->u.videoData))
  16395. return 0;
  16396. break;
  16397. case 3:
  16398. if (!ASN1Enc_AudioCapability(enc, &(val)->u.audioData))
  16399. return 0;
  16400. break;
  16401. case 4:
  16402. if (!ASN1Enc_DataApplicationCapability(enc, &(val)->u.data))
  16403. return 0;
  16404. break;
  16405. default:
  16406. /* impossible */
  16407. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  16408. return 0;
  16409. }
  16410. return 1;
  16411. }
  16412. static int ASN1CALL ASN1Dec_H235Media_mediaType(ASN1decoding_t dec, H235Media_mediaType *val)
  16413. {
  16414. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  16415. return 0;
  16416. switch ((val)->choice) {
  16417. case 1:
  16418. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  16419. return 0;
  16420. break;
  16421. case 2:
  16422. if (!ASN1Dec_VideoCapability(dec, &(val)->u.videoData))
  16423. return 0;
  16424. break;
  16425. case 3:
  16426. if (!ASN1Dec_AudioCapability(dec, &(val)->u.audioData))
  16427. return 0;
  16428. break;
  16429. case 4:
  16430. if (!ASN1Dec_DataApplicationCapability(dec, &(val)->u.data))
  16431. return 0;
  16432. break;
  16433. case 0:
  16434. /* extension case */
  16435. if (!ASN1PERDecSkipFragmented(dec, 8))
  16436. return 0;
  16437. break;
  16438. default:
  16439. /* impossible */
  16440. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  16441. return 0;
  16442. }
  16443. return 1;
  16444. }
  16445. static void ASN1CALL ASN1Free_H235Media_mediaType(H235Media_mediaType *val)
  16446. {
  16447. if (val) {
  16448. switch ((val)->choice) {
  16449. case 1:
  16450. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  16451. break;
  16452. case 2:
  16453. ASN1Free_VideoCapability(&(val)->u.videoData);
  16454. break;
  16455. case 3:
  16456. ASN1Free_AudioCapability(&(val)->u.audioData);
  16457. break;
  16458. case 4:
  16459. ASN1Free_DataApplicationCapability(&(val)->u.data);
  16460. break;
  16461. }
  16462. }
  16463. }
  16464. static int ASN1CALL ASN1Enc_EnhancementLayerInfo_bPictureEnhancement(ASN1encoding_t enc, PEnhancementLayerInfo_bPictureEnhancement *val)
  16465. {
  16466. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_EnhancementLayerInfo_bPictureEnhancement_ElmFn, 1, 14, 4);
  16467. }
  16468. static int ASN1CALL ASN1Enc_EnhancementLayerInfo_bPictureEnhancement_ElmFn(ASN1encoding_t enc, PEnhancementLayerInfo_bPictureEnhancement val)
  16469. {
  16470. if (!ASN1Enc_BEnhancementParameters(enc, &val->value))
  16471. return 0;
  16472. return 1;
  16473. }
  16474. static int ASN1CALL ASN1Dec_EnhancementLayerInfo_bPictureEnhancement(ASN1decoding_t dec, PEnhancementLayerInfo_bPictureEnhancement *val)
  16475. {
  16476. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_EnhancementLayerInfo_bPictureEnhancement_ElmFn, sizeof(**val), 1, 14, 4);
  16477. }
  16478. static int ASN1CALL ASN1Dec_EnhancementLayerInfo_bPictureEnhancement_ElmFn(ASN1decoding_t dec, PEnhancementLayerInfo_bPictureEnhancement val)
  16479. {
  16480. if (!ASN1Dec_BEnhancementParameters(dec, &val->value))
  16481. return 0;
  16482. return 1;
  16483. }
  16484. static void ASN1CALL ASN1Free_EnhancementLayerInfo_bPictureEnhancement(PEnhancementLayerInfo_bPictureEnhancement *val)
  16485. {
  16486. if (val) {
  16487. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_EnhancementLayerInfo_bPictureEnhancement_ElmFn);
  16488. }
  16489. }
  16490. static void ASN1CALL ASN1Free_EnhancementLayerInfo_bPictureEnhancement_ElmFn(PEnhancementLayerInfo_bPictureEnhancement val)
  16491. {
  16492. if (val) {
  16493. ASN1Free_BEnhancementParameters(&val->value);
  16494. }
  16495. }
  16496. static int ASN1CALL ASN1Enc_MediaDistributionCapability_distributedData(ASN1encoding_t enc, PMediaDistributionCapability_distributedData *val)
  16497. {
  16498. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_MediaDistributionCapability_distributedData_ElmFn);
  16499. }
  16500. static int ASN1CALL ASN1Enc_MediaDistributionCapability_distributedData_ElmFn(ASN1encoding_t enc, PMediaDistributionCapability_distributedData val)
  16501. {
  16502. if (!ASN1Enc_DataApplicationCapability(enc, &val->value))
  16503. return 0;
  16504. return 1;
  16505. }
  16506. static int ASN1CALL ASN1Dec_MediaDistributionCapability_distributedData(ASN1decoding_t dec, PMediaDistributionCapability_distributedData *val)
  16507. {
  16508. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_MediaDistributionCapability_distributedData_ElmFn, sizeof(**val));
  16509. }
  16510. static int ASN1CALL ASN1Dec_MediaDistributionCapability_distributedData_ElmFn(ASN1decoding_t dec, PMediaDistributionCapability_distributedData val)
  16511. {
  16512. if (!ASN1Dec_DataApplicationCapability(dec, &val->value))
  16513. return 0;
  16514. return 1;
  16515. }
  16516. static void ASN1CALL ASN1Free_MediaDistributionCapability_distributedData(PMediaDistributionCapability_distributedData *val)
  16517. {
  16518. if (val) {
  16519. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_MediaDistributionCapability_distributedData_ElmFn);
  16520. }
  16521. }
  16522. static void ASN1CALL ASN1Free_MediaDistributionCapability_distributedData_ElmFn(PMediaDistributionCapability_distributedData val)
  16523. {
  16524. if (val) {
  16525. ASN1Free_DataApplicationCapability(&val->value);
  16526. }
  16527. }
  16528. static int ASN1CALL ASN1Enc_MediaDistributionCapability_centralizedData(ASN1encoding_t enc, PMediaDistributionCapability_centralizedData *val)
  16529. {
  16530. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_MediaDistributionCapability_centralizedData_ElmFn);
  16531. }
  16532. static int ASN1CALL ASN1Enc_MediaDistributionCapability_centralizedData_ElmFn(ASN1encoding_t enc, PMediaDistributionCapability_centralizedData val)
  16533. {
  16534. if (!ASN1Enc_DataApplicationCapability(enc, &val->value))
  16535. return 0;
  16536. return 1;
  16537. }
  16538. static int ASN1CALL ASN1Dec_MediaDistributionCapability_centralizedData(ASN1decoding_t dec, PMediaDistributionCapability_centralizedData *val)
  16539. {
  16540. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_MediaDistributionCapability_centralizedData_ElmFn, sizeof(**val));
  16541. }
  16542. static int ASN1CALL ASN1Dec_MediaDistributionCapability_centralizedData_ElmFn(ASN1decoding_t dec, PMediaDistributionCapability_centralizedData val)
  16543. {
  16544. if (!ASN1Dec_DataApplicationCapability(dec, &val->value))
  16545. return 0;
  16546. return 1;
  16547. }
  16548. static void ASN1CALL ASN1Free_MediaDistributionCapability_centralizedData(PMediaDistributionCapability_centralizedData *val)
  16549. {
  16550. if (val) {
  16551. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_MediaDistributionCapability_centralizedData_ElmFn);
  16552. }
  16553. }
  16554. static void ASN1CALL ASN1Free_MediaDistributionCapability_centralizedData_ElmFn(PMediaDistributionCapability_centralizedData val)
  16555. {
  16556. if (val) {
  16557. ASN1Free_DataApplicationCapability(&val->value);
  16558. }
  16559. }
  16560. static int ASN1CALL ASN1Enc_Capability(ASN1encoding_t enc, Capability *val)
  16561. {
  16562. ASN1encoding_t ee;
  16563. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 12))
  16564. return 0;
  16565. switch ((val)->choice) {
  16566. case 1:
  16567. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  16568. return 0;
  16569. break;
  16570. case 2:
  16571. if (!ASN1Enc_VideoCapability(enc, &(val)->u.receiveVideoCapability))
  16572. return 0;
  16573. break;
  16574. case 3:
  16575. if (!ASN1Enc_VideoCapability(enc, &(val)->u.transmitVideoCapability))
  16576. return 0;
  16577. break;
  16578. case 4:
  16579. if (!ASN1Enc_VideoCapability(enc, &(val)->u.receiveAndTransmitVideoCapability))
  16580. return 0;
  16581. break;
  16582. case 5:
  16583. if (!ASN1Enc_AudioCapability(enc, &(val)->u.receiveAudioCapability))
  16584. return 0;
  16585. break;
  16586. case 6:
  16587. if (!ASN1Enc_AudioCapability(enc, &(val)->u.transmitAudioCapability))
  16588. return 0;
  16589. break;
  16590. case 7:
  16591. if (!ASN1Enc_AudioCapability(enc, &(val)->u.receiveAndTransmitAudioCapability))
  16592. return 0;
  16593. break;
  16594. case 8:
  16595. if (!ASN1Enc_DataApplicationCapability(enc, &(val)->u.receiveDataApplicationCapability))
  16596. return 0;
  16597. break;
  16598. case 9:
  16599. if (!ASN1Enc_DataApplicationCapability(enc, &(val)->u.transmitDataApplicationCapability))
  16600. return 0;
  16601. break;
  16602. case 10:
  16603. if (!ASN1Enc_DataApplicationCapability(enc, &(val)->u.receiveAndTransmitDataApplicationCapability))
  16604. return 0;
  16605. break;
  16606. case 11:
  16607. if (!ASN1PEREncBoolean(enc, (val)->u.h233EncryptionTransmitCapability))
  16608. return 0;
  16609. break;
  16610. case 12:
  16611. if (!ASN1Enc_Capability_h233EncryptionReceiveCapability(enc, &(val)->u.h233EncryptionReceiveCapability))
  16612. return 0;
  16613. break;
  16614. case 13:
  16615. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  16616. return 0;
  16617. if (!ASN1Enc_ConferenceCapability(ee, &(val)->u.conferenceCapability))
  16618. return 0;
  16619. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16620. return 0;
  16621. ASN1_CloseEncoder2(ee);
  16622. break;
  16623. case 14:
  16624. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  16625. return 0;
  16626. if (!ASN1Enc_H235SecurityCapability(ee, &(val)->u.h235SecurityCapability))
  16627. return 0;
  16628. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16629. return 0;
  16630. ASN1_CloseEncoder2(ee);
  16631. break;
  16632. case 15:
  16633. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  16634. return 0;
  16635. ASN1PEREncAlignment(ee);
  16636. if (!ASN1PEREncBitVal(ee, 8, (val)->u.maxPendingReplacementFor))
  16637. return 0;
  16638. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16639. return 0;
  16640. ASN1_CloseEncoder2(ee);
  16641. break;
  16642. case 16:
  16643. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  16644. return 0;
  16645. if (!ASN1Enc_UserInputCapability(ee, &(val)->u.receiveUserInputCapability))
  16646. return 0;
  16647. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16648. return 0;
  16649. ASN1_CloseEncoder2(ee);
  16650. break;
  16651. case 17:
  16652. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  16653. return 0;
  16654. if (!ASN1Enc_UserInputCapability(ee, &(val)->u.transmitUserInputCapability))
  16655. return 0;
  16656. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16657. return 0;
  16658. ASN1_CloseEncoder2(ee);
  16659. break;
  16660. case 18:
  16661. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  16662. return 0;
  16663. if (!ASN1Enc_UserInputCapability(ee, &(val)->u.receiveAndTransmitUserInputCapability))
  16664. return 0;
  16665. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16666. return 0;
  16667. ASN1_CloseEncoder2(ee);
  16668. break;
  16669. default:
  16670. /* impossible */
  16671. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  16672. return 0;
  16673. }
  16674. return 1;
  16675. }
  16676. static int ASN1CALL ASN1Dec_Capability(ASN1decoding_t dec, Capability *val)
  16677. {
  16678. ASN1decoding_t dd;
  16679. ASN1octet_t *db;
  16680. ASN1uint32_t ds;
  16681. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 12))
  16682. return 0;
  16683. switch ((val)->choice) {
  16684. case 1:
  16685. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  16686. return 0;
  16687. break;
  16688. case 2:
  16689. if (!ASN1Dec_VideoCapability(dec, &(val)->u.receiveVideoCapability))
  16690. return 0;
  16691. break;
  16692. case 3:
  16693. if (!ASN1Dec_VideoCapability(dec, &(val)->u.transmitVideoCapability))
  16694. return 0;
  16695. break;
  16696. case 4:
  16697. if (!ASN1Dec_VideoCapability(dec, &(val)->u.receiveAndTransmitVideoCapability))
  16698. return 0;
  16699. break;
  16700. case 5:
  16701. if (!ASN1Dec_AudioCapability(dec, &(val)->u.receiveAudioCapability))
  16702. return 0;
  16703. break;
  16704. case 6:
  16705. if (!ASN1Dec_AudioCapability(dec, &(val)->u.transmitAudioCapability))
  16706. return 0;
  16707. break;
  16708. case 7:
  16709. if (!ASN1Dec_AudioCapability(dec, &(val)->u.receiveAndTransmitAudioCapability))
  16710. return 0;
  16711. break;
  16712. case 8:
  16713. if (!ASN1Dec_DataApplicationCapability(dec, &(val)->u.receiveDataApplicationCapability))
  16714. return 0;
  16715. break;
  16716. case 9:
  16717. if (!ASN1Dec_DataApplicationCapability(dec, &(val)->u.transmitDataApplicationCapability))
  16718. return 0;
  16719. break;
  16720. case 10:
  16721. if (!ASN1Dec_DataApplicationCapability(dec, &(val)->u.receiveAndTransmitDataApplicationCapability))
  16722. return 0;
  16723. break;
  16724. case 11:
  16725. if (!ASN1PERDecBoolean(dec, &(val)->u.h233EncryptionTransmitCapability))
  16726. return 0;
  16727. break;
  16728. case 12:
  16729. if (!ASN1Dec_Capability_h233EncryptionReceiveCapability(dec, &(val)->u.h233EncryptionReceiveCapability))
  16730. return 0;
  16731. break;
  16732. case 13:
  16733. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16734. return 0;
  16735. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16736. return 0;
  16737. if (!ASN1Dec_ConferenceCapability(dd, &(val)->u.conferenceCapability))
  16738. return 0;
  16739. ASN1_CloseDecoder(dd);
  16740. ASN1Free(db);
  16741. break;
  16742. case 14:
  16743. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16744. return 0;
  16745. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16746. return 0;
  16747. if (!ASN1Dec_H235SecurityCapability(dd, &(val)->u.h235SecurityCapability))
  16748. return 0;
  16749. ASN1_CloseDecoder(dd);
  16750. ASN1Free(db);
  16751. break;
  16752. case 15:
  16753. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16754. return 0;
  16755. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16756. return 0;
  16757. ASN1PERDecAlignment(dd);
  16758. if (!ASN1PERDecU16Val(dd, 8, &(val)->u.maxPendingReplacementFor))
  16759. return 0;
  16760. ASN1_CloseDecoder(dd);
  16761. ASN1Free(db);
  16762. break;
  16763. case 16:
  16764. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16765. return 0;
  16766. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16767. return 0;
  16768. if (!ASN1Dec_UserInputCapability(dd, &(val)->u.receiveUserInputCapability))
  16769. return 0;
  16770. ASN1_CloseDecoder(dd);
  16771. ASN1Free(db);
  16772. break;
  16773. case 17:
  16774. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16775. return 0;
  16776. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16777. return 0;
  16778. if (!ASN1Dec_UserInputCapability(dd, &(val)->u.transmitUserInputCapability))
  16779. return 0;
  16780. ASN1_CloseDecoder(dd);
  16781. ASN1Free(db);
  16782. break;
  16783. case 18:
  16784. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16785. return 0;
  16786. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16787. return 0;
  16788. if (!ASN1Dec_UserInputCapability(dd, &(val)->u.receiveAndTransmitUserInputCapability))
  16789. return 0;
  16790. ASN1_CloseDecoder(dd);
  16791. ASN1Free(db);
  16792. break;
  16793. case 0:
  16794. /* extension case */
  16795. if (!ASN1PERDecSkipFragmented(dec, 8))
  16796. return 0;
  16797. break;
  16798. default:
  16799. /* impossible */
  16800. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  16801. return 0;
  16802. }
  16803. return 1;
  16804. }
  16805. static void ASN1CALL ASN1Free_Capability(Capability *val)
  16806. {
  16807. if (val) {
  16808. switch ((val)->choice) {
  16809. case 1:
  16810. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  16811. break;
  16812. case 2:
  16813. ASN1Free_VideoCapability(&(val)->u.receiveVideoCapability);
  16814. break;
  16815. case 3:
  16816. ASN1Free_VideoCapability(&(val)->u.transmitVideoCapability);
  16817. break;
  16818. case 4:
  16819. ASN1Free_VideoCapability(&(val)->u.receiveAndTransmitVideoCapability);
  16820. break;
  16821. case 5:
  16822. ASN1Free_AudioCapability(&(val)->u.receiveAudioCapability);
  16823. break;
  16824. case 6:
  16825. ASN1Free_AudioCapability(&(val)->u.transmitAudioCapability);
  16826. break;
  16827. case 7:
  16828. ASN1Free_AudioCapability(&(val)->u.receiveAndTransmitAudioCapability);
  16829. break;
  16830. case 8:
  16831. ASN1Free_DataApplicationCapability(&(val)->u.receiveDataApplicationCapability);
  16832. break;
  16833. case 9:
  16834. ASN1Free_DataApplicationCapability(&(val)->u.transmitDataApplicationCapability);
  16835. break;
  16836. case 10:
  16837. ASN1Free_DataApplicationCapability(&(val)->u.receiveAndTransmitDataApplicationCapability);
  16838. break;
  16839. case 13:
  16840. ASN1Free_ConferenceCapability(&(val)->u.conferenceCapability);
  16841. break;
  16842. case 14:
  16843. ASN1Free_H235SecurityCapability(&(val)->u.h235SecurityCapability);
  16844. break;
  16845. case 16:
  16846. ASN1Free_UserInputCapability(&(val)->u.receiveUserInputCapability);
  16847. break;
  16848. case 17:
  16849. ASN1Free_UserInputCapability(&(val)->u.transmitUserInputCapability);
  16850. break;
  16851. case 18:
  16852. ASN1Free_UserInputCapability(&(val)->u.receiveAndTransmitUserInputCapability);
  16853. break;
  16854. }
  16855. }
  16856. }
  16857. static int ASN1CALL ASN1Enc_H2250Capability(ASN1encoding_t enc, H2250Capability *val)
  16858. {
  16859. ASN1octet_t o[1];
  16860. ASN1uint32_t y;
  16861. ASN1encoding_t ee;
  16862. CopyMemory(o, (val)->o, 1);
  16863. o[0] |= 0x20;
  16864. o[0] |= 0x10;
  16865. y = ASN1PEREncCheckExtensions(4, (val)->o + 0);
  16866. if (!ASN1PEREncBitVal(enc, 1, y))
  16867. return 0;
  16868. if (!ASN1PEREncUnsignedShort(enc, (val)->maximumAudioDelayJitter))
  16869. return 0;
  16870. if (!ASN1Enc_MultipointCapability(enc, &(val)->receiveMultipointCapability))
  16871. return 0;
  16872. if (!ASN1Enc_MultipointCapability(enc, &(val)->transmitMultipointCapability))
  16873. return 0;
  16874. if (!ASN1Enc_MultipointCapability(enc, &(val)->receiveAndTransmitMultipointCapability))
  16875. return 0;
  16876. if (!ASN1Enc_H2250Capability_mcCapability(enc, &(val)->mcCapability))
  16877. return 0;
  16878. if (!ASN1PEREncBoolean(enc, (val)->rtcpVideoControlCapability))
  16879. return 0;
  16880. if (!ASN1Enc_MediaPacketizationCapability(enc, &(val)->mediaPacketizationCapability))
  16881. return 0;
  16882. if (y) {
  16883. if (!ASN1PEREncNormallySmallBits(enc, 4, o + 0))
  16884. return 0;
  16885. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  16886. return 0;
  16887. if (o[0] & 0x80) {
  16888. if (!ASN1Enc_TransportCapability(ee, &(val)->transportCapability))
  16889. return 0;
  16890. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16891. return 0;
  16892. }
  16893. if (o[0] & 0x40) {
  16894. if (!ASN1Enc_H2250Capability_redundancyEncodingCapability(ee, &(val)->redundancyEncodingCapability))
  16895. return 0;
  16896. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16897. return 0;
  16898. }
  16899. if (o[0] & 0x20) {
  16900. if (!ASN1PEREncBoolean(ee, (val)->logicalChannelSwitchingCapability))
  16901. return 0;
  16902. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16903. return 0;
  16904. }
  16905. if (o[0] & 0x10) {
  16906. if (!ASN1PEREncBoolean(ee, (val)->t120DynamicPortCapability))
  16907. return 0;
  16908. if (!ASN1PEREncFlushFragmentedToParent(ee))
  16909. return 0;
  16910. }
  16911. ASN1_CloseEncoder2(ee);
  16912. }
  16913. return 1;
  16914. }
  16915. static int ASN1CALL ASN1Dec_H2250Capability(ASN1decoding_t dec, H2250Capability *val)
  16916. {
  16917. ASN1uint32_t y;
  16918. ASN1decoding_t dd;
  16919. ASN1octet_t *db;
  16920. ASN1uint32_t ds;
  16921. ASN1uint32_t i;
  16922. ASN1uint32_t e;
  16923. if (!ASN1PERDecExtensionBit(dec, &y))
  16924. return 0;
  16925. if (!ASN1PERDecUnsignedShort(dec, &(val)->maximumAudioDelayJitter))
  16926. return 0;
  16927. if (!ASN1Dec_MultipointCapability(dec, &(val)->receiveMultipointCapability))
  16928. return 0;
  16929. if (!ASN1Dec_MultipointCapability(dec, &(val)->transmitMultipointCapability))
  16930. return 0;
  16931. if (!ASN1Dec_MultipointCapability(dec, &(val)->receiveAndTransmitMultipointCapability))
  16932. return 0;
  16933. if (!ASN1Dec_H2250Capability_mcCapability(dec, &(val)->mcCapability))
  16934. return 0;
  16935. if (!ASN1PERDecBoolean(dec, &(val)->rtcpVideoControlCapability))
  16936. return 0;
  16937. if (!ASN1Dec_MediaPacketizationCapability(dec, &(val)->mediaPacketizationCapability))
  16938. return 0;
  16939. if (!y) {
  16940. ZeroMemory((val)->o + 0, 1);
  16941. } else {
  16942. if (!ASN1PERDecNormallySmallExtension(dec, &e, 4, (val)->o + 0))
  16943. return 0;
  16944. if ((val)->o[0] & 0x80) {
  16945. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16946. return 0;
  16947. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16948. return 0;
  16949. if (!ASN1Dec_TransportCapability(dd, &(val)->transportCapability))
  16950. return 0;
  16951. ASN1_CloseDecoder(dd);
  16952. ASN1Free(db);
  16953. }
  16954. if ((val)->o[0] & 0x40) {
  16955. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16956. return 0;
  16957. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16958. return 0;
  16959. if (!ASN1Dec_H2250Capability_redundancyEncodingCapability(dd, &(val)->redundancyEncodingCapability))
  16960. return 0;
  16961. ASN1_CloseDecoder(dd);
  16962. ASN1Free(db);
  16963. }
  16964. if ((val)->o[0] & 0x20) {
  16965. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16966. return 0;
  16967. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16968. return 0;
  16969. if (!ASN1PERDecBoolean(dd, &(val)->logicalChannelSwitchingCapability))
  16970. return 0;
  16971. ASN1_CloseDecoder(dd);
  16972. ASN1Free(db);
  16973. }
  16974. if ((val)->o[0] & 0x10) {
  16975. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  16976. return 0;
  16977. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  16978. return 0;
  16979. if (!ASN1PERDecBoolean(dd, &(val)->t120DynamicPortCapability))
  16980. return 0;
  16981. ASN1_CloseDecoder(dd);
  16982. ASN1Free(db);
  16983. }
  16984. for (i = 0; i < e; i++) {
  16985. if (!ASN1PERDecSkipFragmented(dec, 8))
  16986. return 0;
  16987. }
  16988. }
  16989. return 1;
  16990. }
  16991. static void ASN1CALL ASN1Free_H2250Capability(H2250Capability *val)
  16992. {
  16993. if (val) {
  16994. ASN1Free_MultipointCapability(&(val)->receiveMultipointCapability);
  16995. ASN1Free_MultipointCapability(&(val)->transmitMultipointCapability);
  16996. ASN1Free_MultipointCapability(&(val)->receiveAndTransmitMultipointCapability);
  16997. ASN1Free_MediaPacketizationCapability(&(val)->mediaPacketizationCapability);
  16998. if ((val)->o[0] & 0x80) {
  16999. ASN1Free_TransportCapability(&(val)->transportCapability);
  17000. }
  17001. if ((val)->o[0] & 0x40) {
  17002. ASN1Free_H2250Capability_redundancyEncodingCapability(&(val)->redundancyEncodingCapability);
  17003. }
  17004. }
  17005. }
  17006. static int ASN1CALL ASN1Enc_H235Media(ASN1encoding_t enc, H235Media *val)
  17007. {
  17008. if (!ASN1PEREncExtensionBitClear(enc))
  17009. return 0;
  17010. if (!ASN1Enc_EncryptionAuthenticationAndIntegrity(enc, &(val)->encryptionAuthenticationAndIntegrity))
  17011. return 0;
  17012. if (!ASN1Enc_H235Media_mediaType(enc, &(val)->mediaType))
  17013. return 0;
  17014. return 1;
  17015. }
  17016. static int ASN1CALL ASN1Dec_H235Media(ASN1decoding_t dec, H235Media *val)
  17017. {
  17018. ASN1uint32_t y;
  17019. if (!ASN1PERDecExtensionBit(dec, &y))
  17020. return 0;
  17021. if (!ASN1Dec_EncryptionAuthenticationAndIntegrity(dec, &(val)->encryptionAuthenticationAndIntegrity))
  17022. return 0;
  17023. if (!ASN1Dec_H235Media_mediaType(dec, &(val)->mediaType))
  17024. return 0;
  17025. if (y) {
  17026. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  17027. return 0;
  17028. }
  17029. return 1;
  17030. }
  17031. static void ASN1CALL ASN1Free_H235Media(H235Media *val)
  17032. {
  17033. if (val) {
  17034. ASN1Free_EncryptionAuthenticationAndIntegrity(&(val)->encryptionAuthenticationAndIntegrity);
  17035. ASN1Free_H235Media_mediaType(&(val)->mediaType);
  17036. }
  17037. }
  17038. static int ASN1CALL ASN1Enc_H235Mode(ASN1encoding_t enc, H235Mode *val)
  17039. {
  17040. if (!ASN1PEREncExtensionBitClear(enc))
  17041. return 0;
  17042. if (!ASN1Enc_EncryptionAuthenticationAndIntegrity(enc, &(val)->encryptionAuthenticationAndIntegrity))
  17043. return 0;
  17044. if (!ASN1Enc_H235Mode_mediaMode(enc, &(val)->mediaMode))
  17045. return 0;
  17046. return 1;
  17047. }
  17048. static int ASN1CALL ASN1Dec_H235Mode(ASN1decoding_t dec, H235Mode *val)
  17049. {
  17050. ASN1uint32_t y;
  17051. if (!ASN1PERDecExtensionBit(dec, &y))
  17052. return 0;
  17053. if (!ASN1Dec_EncryptionAuthenticationAndIntegrity(dec, &(val)->encryptionAuthenticationAndIntegrity))
  17054. return 0;
  17055. if (!ASN1Dec_H235Mode_mediaMode(dec, &(val)->mediaMode))
  17056. return 0;
  17057. if (y) {
  17058. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  17059. return 0;
  17060. }
  17061. return 1;
  17062. }
  17063. static void ASN1CALL ASN1Free_H235Mode(H235Mode *val)
  17064. {
  17065. if (val) {
  17066. ASN1Free_EncryptionAuthenticationAndIntegrity(&(val)->encryptionAuthenticationAndIntegrity);
  17067. ASN1Free_H235Mode_mediaMode(&(val)->mediaMode);
  17068. }
  17069. }
  17070. static int ASN1CALL ASN1Enc_ModeElement_type(ASN1encoding_t enc, ModeElement_type *val)
  17071. {
  17072. ASN1encoding_t ee;
  17073. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 5))
  17074. return 0;
  17075. switch ((val)->choice) {
  17076. case 1:
  17077. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  17078. return 0;
  17079. break;
  17080. case 2:
  17081. if (!ASN1Enc_VideoMode(enc, &(val)->u.videoMode))
  17082. return 0;
  17083. break;
  17084. case 3:
  17085. if (!ASN1Enc_AudioMode(enc, &(val)->u.audioMode))
  17086. return 0;
  17087. break;
  17088. case 4:
  17089. if (!ASN1Enc_DataMode(enc, &(val)->u.dataMode))
  17090. return 0;
  17091. break;
  17092. case 5:
  17093. if (!ASN1Enc_EncryptionMode(enc, &(val)->u.encryptionMode))
  17094. return 0;
  17095. break;
  17096. case 6:
  17097. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  17098. return 0;
  17099. if (!ASN1Enc_H235Mode(ee, &(val)->u.h235Mode))
  17100. return 0;
  17101. if (!ASN1PEREncFlushFragmentedToParent(ee))
  17102. return 0;
  17103. ASN1_CloseEncoder2(ee);
  17104. break;
  17105. default:
  17106. /* impossible */
  17107. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  17108. return 0;
  17109. }
  17110. return 1;
  17111. }
  17112. static int ASN1CALL ASN1Dec_ModeElement_type(ASN1decoding_t dec, ModeElement_type *val)
  17113. {
  17114. ASN1decoding_t dd;
  17115. ASN1octet_t *db;
  17116. ASN1uint32_t ds;
  17117. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 5))
  17118. return 0;
  17119. switch ((val)->choice) {
  17120. case 1:
  17121. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  17122. return 0;
  17123. break;
  17124. case 2:
  17125. if (!ASN1Dec_VideoMode(dec, &(val)->u.videoMode))
  17126. return 0;
  17127. break;
  17128. case 3:
  17129. if (!ASN1Dec_AudioMode(dec, &(val)->u.audioMode))
  17130. return 0;
  17131. break;
  17132. case 4:
  17133. if (!ASN1Dec_DataMode(dec, &(val)->u.dataMode))
  17134. return 0;
  17135. break;
  17136. case 5:
  17137. if (!ASN1Dec_EncryptionMode(dec, &(val)->u.encryptionMode))
  17138. return 0;
  17139. break;
  17140. case 6:
  17141. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  17142. return 0;
  17143. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  17144. return 0;
  17145. if (!ASN1Dec_H235Mode(dd, &(val)->u.h235Mode))
  17146. return 0;
  17147. ASN1_CloseDecoder(dd);
  17148. ASN1Free(db);
  17149. break;
  17150. case 0:
  17151. /* extension case */
  17152. if (!ASN1PERDecSkipFragmented(dec, 8))
  17153. return 0;
  17154. break;
  17155. default:
  17156. /* impossible */
  17157. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  17158. return 0;
  17159. }
  17160. return 1;
  17161. }
  17162. static void ASN1CALL ASN1Free_ModeElement_type(ModeElement_type *val)
  17163. {
  17164. if (val) {
  17165. switch ((val)->choice) {
  17166. case 1:
  17167. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  17168. break;
  17169. case 2:
  17170. ASN1Free_VideoMode(&(val)->u.videoMode);
  17171. break;
  17172. case 3:
  17173. ASN1Free_AudioMode(&(val)->u.audioMode);
  17174. break;
  17175. case 4:
  17176. ASN1Free_DataMode(&(val)->u.dataMode);
  17177. break;
  17178. case 5:
  17179. ASN1Free_EncryptionMode(&(val)->u.encryptionMode);
  17180. break;
  17181. case 6:
  17182. ASN1Free_H235Mode(&(val)->u.h235Mode);
  17183. break;
  17184. }
  17185. }
  17186. }
  17187. static int ASN1CALL ASN1Enc_CapabilityTableEntry(ASN1encoding_t enc, CapabilityTableEntry *val)
  17188. {
  17189. if (!ASN1PEREncBits(enc, 1, (val)->o))
  17190. return 0;
  17191. if (!ASN1PEREncUnsignedShort(enc, (val)->capabilityTableEntryNumber - 1))
  17192. return 0;
  17193. if ((val)->o[0] & 0x80) {
  17194. if (!ASN1Enc_Capability(enc, &(val)->capability))
  17195. return 0;
  17196. }
  17197. return 1;
  17198. }
  17199. static int ASN1CALL ASN1Dec_CapabilityTableEntry(ASN1decoding_t dec, CapabilityTableEntry *val)
  17200. {
  17201. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  17202. return 0;
  17203. if (!ASN1PERDecUnsignedShort(dec, &(val)->capabilityTableEntryNumber))
  17204. return 0;
  17205. (val)->capabilityTableEntryNumber += 1;
  17206. if ((val)->o[0] & 0x80) {
  17207. if (!ASN1Dec_Capability(dec, &(val)->capability))
  17208. return 0;
  17209. }
  17210. return 1;
  17211. }
  17212. static void ASN1CALL ASN1Free_CapabilityTableEntry(CapabilityTableEntry *val)
  17213. {
  17214. if (val) {
  17215. if ((val)->o[0] & 0x80) {
  17216. ASN1Free_Capability(&(val)->capability);
  17217. }
  17218. }
  17219. }
  17220. static int ASN1CALL ASN1Enc_MultiplexCapability(ASN1encoding_t enc, MultiplexCapability *val)
  17221. {
  17222. ASN1encoding_t ee;
  17223. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 2, 4))
  17224. return 0;
  17225. switch ((val)->choice) {
  17226. case 1:
  17227. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  17228. return 0;
  17229. break;
  17230. case 2:
  17231. if (!ASN1Enc_H222Capability(enc, &(val)->u.h222Capability))
  17232. return 0;
  17233. break;
  17234. case 3:
  17235. if (!ASN1Enc_H223Capability(enc, &(val)->u.h223Capability))
  17236. return 0;
  17237. break;
  17238. case 4:
  17239. if (!ASN1Enc_V76Capability(enc, &(val)->u.v76Capability))
  17240. return 0;
  17241. break;
  17242. case 5:
  17243. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  17244. return 0;
  17245. if (!ASN1Enc_H2250Capability(ee, &(val)->u.h2250Capability))
  17246. return 0;
  17247. if (!ASN1PEREncFlushFragmentedToParent(ee))
  17248. return 0;
  17249. ASN1_CloseEncoder2(ee);
  17250. break;
  17251. default:
  17252. /* impossible */
  17253. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  17254. return 0;
  17255. }
  17256. return 1;
  17257. }
  17258. static int ASN1CALL ASN1Dec_MultiplexCapability(ASN1decoding_t dec, MultiplexCapability *val)
  17259. {
  17260. ASN1decoding_t dd;
  17261. ASN1octet_t *db;
  17262. ASN1uint32_t ds;
  17263. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 2, 4))
  17264. return 0;
  17265. switch ((val)->choice) {
  17266. case 1:
  17267. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  17268. return 0;
  17269. break;
  17270. case 2:
  17271. if (!ASN1Dec_H222Capability(dec, &(val)->u.h222Capability))
  17272. return 0;
  17273. break;
  17274. case 3:
  17275. if (!ASN1Dec_H223Capability(dec, &(val)->u.h223Capability))
  17276. return 0;
  17277. break;
  17278. case 4:
  17279. if (!ASN1Dec_V76Capability(dec, &(val)->u.v76Capability))
  17280. return 0;
  17281. break;
  17282. case 5:
  17283. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  17284. return 0;
  17285. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  17286. return 0;
  17287. if (!ASN1Dec_H2250Capability(dd, &(val)->u.h2250Capability))
  17288. return 0;
  17289. ASN1_CloseDecoder(dd);
  17290. ASN1Free(db);
  17291. break;
  17292. case 0:
  17293. /* extension case */
  17294. if (!ASN1PERDecSkipFragmented(dec, 8))
  17295. return 0;
  17296. break;
  17297. default:
  17298. /* impossible */
  17299. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  17300. return 0;
  17301. }
  17302. return 1;
  17303. }
  17304. static void ASN1CALL ASN1Free_MultiplexCapability(MultiplexCapability *val)
  17305. {
  17306. if (val) {
  17307. switch ((val)->choice) {
  17308. case 1:
  17309. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  17310. break;
  17311. case 2:
  17312. ASN1Free_H222Capability(&(val)->u.h222Capability);
  17313. break;
  17314. case 5:
  17315. ASN1Free_H2250Capability(&(val)->u.h2250Capability);
  17316. break;
  17317. }
  17318. }
  17319. }
  17320. static int ASN1CALL ASN1Enc_DataType(ASN1encoding_t enc, DataType *val)
  17321. {
  17322. ASN1encoding_t ee;
  17323. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 3, 6))
  17324. return 0;
  17325. switch ((val)->choice) {
  17326. case 1:
  17327. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.nonStandard))
  17328. return 0;
  17329. break;
  17330. case 2:
  17331. break;
  17332. case 3:
  17333. if (!ASN1Enc_VideoCapability(enc, &(val)->u.videoData))
  17334. return 0;
  17335. break;
  17336. case 4:
  17337. if (!ASN1Enc_AudioCapability(enc, &(val)->u.audioData))
  17338. return 0;
  17339. break;
  17340. case 5:
  17341. if (!ASN1Enc_DataApplicationCapability(enc, &(val)->u.data))
  17342. return 0;
  17343. break;
  17344. case 6:
  17345. if (!ASN1Enc_EncryptionMode(enc, &(val)->u.encryptionData))
  17346. return 0;
  17347. break;
  17348. case 7:
  17349. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  17350. return 0;
  17351. if (!ASN1Enc_NonStandardParameter(ee, &(val)->u.h235Control))
  17352. return 0;
  17353. if (!ASN1PEREncFlushFragmentedToParent(ee))
  17354. return 0;
  17355. ASN1_CloseEncoder2(ee);
  17356. break;
  17357. case 8:
  17358. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  17359. return 0;
  17360. if (!ASN1Enc_H235Media(ee, &(val)->u.h235Media))
  17361. return 0;
  17362. if (!ASN1PEREncFlushFragmentedToParent(ee))
  17363. return 0;
  17364. ASN1_CloseEncoder2(ee);
  17365. break;
  17366. default:
  17367. /* impossible */
  17368. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  17369. return 0;
  17370. }
  17371. return 1;
  17372. }
  17373. static int ASN1CALL ASN1Dec_DataType(ASN1decoding_t dec, DataType *val)
  17374. {
  17375. ASN1decoding_t dd;
  17376. ASN1octet_t *db;
  17377. ASN1uint32_t ds;
  17378. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 3, 6))
  17379. return 0;
  17380. switch ((val)->choice) {
  17381. case 1:
  17382. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.nonStandard))
  17383. return 0;
  17384. break;
  17385. case 2:
  17386. break;
  17387. case 3:
  17388. if (!ASN1Dec_VideoCapability(dec, &(val)->u.videoData))
  17389. return 0;
  17390. break;
  17391. case 4:
  17392. if (!ASN1Dec_AudioCapability(dec, &(val)->u.audioData))
  17393. return 0;
  17394. break;
  17395. case 5:
  17396. if (!ASN1Dec_DataApplicationCapability(dec, &(val)->u.data))
  17397. return 0;
  17398. break;
  17399. case 6:
  17400. if (!ASN1Dec_EncryptionMode(dec, &(val)->u.encryptionData))
  17401. return 0;
  17402. break;
  17403. case 7:
  17404. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  17405. return 0;
  17406. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  17407. return 0;
  17408. if (!ASN1Dec_NonStandardParameter(dd, &(val)->u.h235Control))
  17409. return 0;
  17410. ASN1_CloseDecoder(dd);
  17411. ASN1Free(db);
  17412. break;
  17413. case 8:
  17414. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  17415. return 0;
  17416. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  17417. return 0;
  17418. if (!ASN1Dec_H235Media(dd, &(val)->u.h235Media))
  17419. return 0;
  17420. ASN1_CloseDecoder(dd);
  17421. ASN1Free(db);
  17422. break;
  17423. case 0:
  17424. /* extension case */
  17425. if (!ASN1PERDecSkipFragmented(dec, 8))
  17426. return 0;
  17427. break;
  17428. default:
  17429. /* impossible */
  17430. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  17431. return 0;
  17432. }
  17433. return 1;
  17434. }
  17435. static void ASN1CALL ASN1Free_DataType(DataType *val)
  17436. {
  17437. if (val) {
  17438. switch ((val)->choice) {
  17439. case 1:
  17440. ASN1Free_NonStandardParameter(&(val)->u.nonStandard);
  17441. break;
  17442. case 3:
  17443. ASN1Free_VideoCapability(&(val)->u.videoData);
  17444. break;
  17445. case 4:
  17446. ASN1Free_AudioCapability(&(val)->u.audioData);
  17447. break;
  17448. case 5:
  17449. ASN1Free_DataApplicationCapability(&(val)->u.data);
  17450. break;
  17451. case 6:
  17452. ASN1Free_EncryptionMode(&(val)->u.encryptionData);
  17453. break;
  17454. case 7:
  17455. ASN1Free_NonStandardParameter(&(val)->u.h235Control);
  17456. break;
  17457. case 8:
  17458. ASN1Free_H235Media(&(val)->u.h235Media);
  17459. break;
  17460. }
  17461. }
  17462. }
  17463. static int ASN1CALL ASN1Enc_RedundancyEncoding(ASN1encoding_t enc, RedundancyEncoding *val)
  17464. {
  17465. if (!ASN1PEREncExtensionBitClear(enc))
  17466. return 0;
  17467. if (!ASN1PEREncBits(enc, 1, (val)->o))
  17468. return 0;
  17469. if (!ASN1Enc_RedundancyEncodingMethod(enc, &(val)->redundancyEncodingMethod))
  17470. return 0;
  17471. if ((val)->o[0] & 0x80) {
  17472. if (!ASN1Enc_DataType(enc, &(val)->secondaryEncoding))
  17473. return 0;
  17474. }
  17475. return 1;
  17476. }
  17477. static int ASN1CALL ASN1Dec_RedundancyEncoding(ASN1decoding_t dec, RedundancyEncoding *val)
  17478. {
  17479. ASN1uint32_t y;
  17480. if (!ASN1PERDecExtensionBit(dec, &y))
  17481. return 0;
  17482. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  17483. return 0;
  17484. if (!ASN1Dec_RedundancyEncodingMethod(dec, &(val)->redundancyEncodingMethod))
  17485. return 0;
  17486. if ((val)->o[0] & 0x80) {
  17487. if (!ASN1Dec_DataType(dec, &(val)->secondaryEncoding))
  17488. return 0;
  17489. }
  17490. if (y) {
  17491. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  17492. return 0;
  17493. }
  17494. return 1;
  17495. }
  17496. static void ASN1CALL ASN1Free_RedundancyEncoding(RedundancyEncoding *val)
  17497. {
  17498. if (val) {
  17499. ASN1Free_RedundancyEncodingMethod(&(val)->redundancyEncodingMethod);
  17500. if ((val)->o[0] & 0x80) {
  17501. ASN1Free_DataType(&(val)->secondaryEncoding);
  17502. }
  17503. }
  17504. }
  17505. static int ASN1CALL ASN1Enc_ModeElement(ASN1encoding_t enc, ModeElement *val)
  17506. {
  17507. ASN1uint32_t y;
  17508. ASN1encoding_t ee;
  17509. y = ASN1PEREncCheckExtensions(2, (val)->o + 1);
  17510. if (!ASN1PEREncBitVal(enc, 1, y))
  17511. return 0;
  17512. if (!ASN1PEREncBits(enc, 1, (val)->o))
  17513. return 0;
  17514. if (!ASN1Enc_ModeElement_type(enc, &(val)->type))
  17515. return 0;
  17516. if ((val)->o[0] & 0x80) {
  17517. if (!ASN1Enc_H223ModeParameters(enc, &(val)->h223ModeParameters))
  17518. return 0;
  17519. }
  17520. if (y) {
  17521. if (!ASN1PEREncNormallySmallBits(enc, 2, (val)->o + 1))
  17522. return 0;
  17523. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  17524. return 0;
  17525. if ((val)->o[1] & 0x80) {
  17526. if (!ASN1Enc_V76ModeParameters(ee, &(val)->v76ModeParameters))
  17527. return 0;
  17528. if (!ASN1PEREncFlushFragmentedToParent(ee))
  17529. return 0;
  17530. }
  17531. if ((val)->o[1] & 0x40) {
  17532. if (!ASN1Enc_H2250ModeParameters(ee, &(val)->h2250ModeParameters))
  17533. return 0;
  17534. if (!ASN1PEREncFlushFragmentedToParent(ee))
  17535. return 0;
  17536. }
  17537. ASN1_CloseEncoder2(ee);
  17538. }
  17539. return 1;
  17540. }
  17541. static int ASN1CALL ASN1Dec_ModeElement(ASN1decoding_t dec, ModeElement *val)
  17542. {
  17543. ASN1uint32_t y;
  17544. ASN1decoding_t dd;
  17545. ASN1octet_t *db;
  17546. ASN1uint32_t ds;
  17547. ASN1uint32_t i;
  17548. ASN1uint32_t e;
  17549. if (!ASN1PERDecExtensionBit(dec, &y))
  17550. return 0;
  17551. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  17552. return 0;
  17553. if (!ASN1Dec_ModeElement_type(dec, &(val)->type))
  17554. return 0;
  17555. if ((val)->o[0] & 0x80) {
  17556. if (!ASN1Dec_H223ModeParameters(dec, &(val)->h223ModeParameters))
  17557. return 0;
  17558. }
  17559. if (!y) {
  17560. ZeroMemory((val)->o + 1, 1);
  17561. } else {
  17562. if (!ASN1PERDecNormallySmallExtension(dec, &e, 2, (val)->o + 1))
  17563. return 0;
  17564. if ((val)->o[1] & 0x80) {
  17565. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  17566. return 0;
  17567. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  17568. return 0;
  17569. if (!ASN1Dec_V76ModeParameters(dd, &(val)->v76ModeParameters))
  17570. return 0;
  17571. ASN1_CloseDecoder(dd);
  17572. ASN1Free(db);
  17573. }
  17574. if ((val)->o[1] & 0x40) {
  17575. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  17576. return 0;
  17577. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  17578. return 0;
  17579. if (!ASN1Dec_H2250ModeParameters(dd, &(val)->h2250ModeParameters))
  17580. return 0;
  17581. ASN1_CloseDecoder(dd);
  17582. ASN1Free(db);
  17583. }
  17584. for (i = 0; i < e; i++) {
  17585. if (!ASN1PERDecSkipFragmented(dec, 8))
  17586. return 0;
  17587. }
  17588. }
  17589. return 1;
  17590. }
  17591. static void ASN1CALL ASN1Free_ModeElement(ModeElement *val)
  17592. {
  17593. if (val) {
  17594. ASN1Free_ModeElement_type(&(val)->type);
  17595. if ((val)->o[0] & 0x80) {
  17596. ASN1Free_H223ModeParameters(&(val)->h223ModeParameters);
  17597. }
  17598. if ((val)->o[1] & 0x40) {
  17599. ASN1Free_H2250ModeParameters(&(val)->h2250ModeParameters);
  17600. }
  17601. }
  17602. }
  17603. static int ASN1CALL ASN1Enc_CommunicationModeTableEntry(ASN1encoding_t enc, CommunicationModeTableEntry *val)
  17604. {
  17605. ASN1uint32_t y;
  17606. ASN1encoding_t ee;
  17607. y = ASN1PEREncCheckExtensions(3, (val)->o + 1);
  17608. if (!ASN1PEREncBitVal(enc, 1, y))
  17609. return 0;
  17610. if (!ASN1PEREncBits(enc, 7, (val)->o))
  17611. return 0;
  17612. if ((val)->o[0] & 0x80) {
  17613. if (!ASN1Enc_CommunicationModeTableEntry_nonStandard(enc, &(val)->nonStandard))
  17614. return 0;
  17615. }
  17616. if (!ASN1PEREncBitVal(enc, 8, (val)->sessionID - 1))
  17617. return 0;
  17618. if ((val)->o[0] & 0x40) {
  17619. if (!ASN1PEREncBitVal(enc, 8, (val)->associatedSessionID - 1))
  17620. return 0;
  17621. }
  17622. if ((val)->o[0] & 0x20) {
  17623. if (!ASN1Enc_TerminalLabel(enc, &(val)->terminalLabel))
  17624. return 0;
  17625. }
  17626. if (!ASN1PEREncBitVal(enc, 7, ((val)->sessionDescription).length - 1))
  17627. return 0;
  17628. ASN1PEREncAlignment(enc);
  17629. if (!ASN1PEREncChar16String(enc, ((val)->sessionDescription).length, ((val)->sessionDescription).value, 16))
  17630. return 0;
  17631. if (!ASN1Enc_CommunicationModeTableEntry_dataType(enc, &(val)->dataType))
  17632. return 0;
  17633. if ((val)->o[0] & 0x10) {
  17634. if (!ASN1Enc_H245TransportAddress(enc, &(val)->mediaChannel))
  17635. return 0;
  17636. }
  17637. if ((val)->o[0] & 0x8) {
  17638. if (!ASN1PEREncBoolean(enc, (val)->mediaGuaranteedDelivery))
  17639. return 0;
  17640. }
  17641. if ((val)->o[0] & 0x4) {
  17642. if (!ASN1Enc_H245TransportAddress(enc, &(val)->mediaControlChannel))
  17643. return 0;
  17644. }
  17645. if ((val)->o[0] & 0x2) {
  17646. if (!ASN1PEREncBoolean(enc, (val)->mediaControlGuaranteedDelivery))
  17647. return 0;
  17648. }
  17649. if (y) {
  17650. if (!ASN1PEREncNormallySmallBits(enc, 3, (val)->o + 1))
  17651. return 0;
  17652. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  17653. return 0;
  17654. if ((val)->o[1] & 0x80) {
  17655. if (!ASN1Enc_RedundancyEncoding(ee, &(val)->redundancyEncoding))
  17656. return 0;
  17657. if (!ASN1PEREncFlushFragmentedToParent(ee))
  17658. return 0;
  17659. }
  17660. if ((val)->o[1] & 0x40) {
  17661. if (!ASN1PEREncBitVal(ee, 8, (val)->sessionDependency - 1))
  17662. return 0;
  17663. if (!ASN1PEREncFlushFragmentedToParent(ee))
  17664. return 0;
  17665. }
  17666. if ((val)->o[1] & 0x20) {
  17667. if (!ASN1Enc_TerminalLabel(ee, &(val)->destination))
  17668. return 0;
  17669. if (!ASN1PEREncFlushFragmentedToParent(ee))
  17670. return 0;
  17671. }
  17672. ASN1_CloseEncoder2(ee);
  17673. }
  17674. return 1;
  17675. }
  17676. static int ASN1CALL ASN1Dec_CommunicationModeTableEntry(ASN1decoding_t dec, CommunicationModeTableEntry *val)
  17677. {
  17678. ASN1uint32_t y;
  17679. ASN1decoding_t dd;
  17680. ASN1octet_t *db;
  17681. ASN1uint32_t ds;
  17682. ASN1uint32_t i;
  17683. ASN1uint32_t e;
  17684. if (!ASN1PERDecExtensionBit(dec, &y))
  17685. return 0;
  17686. if (!ASN1PERDecExtension(dec, 7, (val)->o))
  17687. return 0;
  17688. if ((val)->o[0] & 0x80) {
  17689. if (!ASN1Dec_CommunicationModeTableEntry_nonStandard(dec, &(val)->nonStandard))
  17690. return 0;
  17691. }
  17692. if (!ASN1PERDecU16Val(dec, 8, &(val)->sessionID))
  17693. return 0;
  17694. (val)->sessionID += 1;
  17695. if ((val)->o[0] & 0x40) {
  17696. if (!ASN1PERDecU16Val(dec, 8, &(val)->associatedSessionID))
  17697. return 0;
  17698. (val)->associatedSessionID += 1;
  17699. }
  17700. if ((val)->o[0] & 0x20) {
  17701. if (!ASN1Dec_TerminalLabel(dec, &(val)->terminalLabel))
  17702. return 0;
  17703. }
  17704. if (!ASN1PERDecU32Val(dec, 7, &((val)->sessionDescription).length))
  17705. return 0;
  17706. ((val)->sessionDescription).length += 1;
  17707. ASN1PERDecAlignment(dec);
  17708. if (!ASN1PERDecChar16String(dec, ((val)->sessionDescription).length, &((val)->sessionDescription).value, 16))
  17709. return 0;
  17710. if (!ASN1Dec_CommunicationModeTableEntry_dataType(dec, &(val)->dataType))
  17711. return 0;
  17712. if ((val)->o[0] & 0x10) {
  17713. if (!ASN1Dec_H245TransportAddress(dec, &(val)->mediaChannel))
  17714. return 0;
  17715. }
  17716. if ((val)->o[0] & 0x8) {
  17717. if (!ASN1PERDecBoolean(dec, &(val)->mediaGuaranteedDelivery))
  17718. return 0;
  17719. }
  17720. if ((val)->o[0] & 0x4) {
  17721. if (!ASN1Dec_H245TransportAddress(dec, &(val)->mediaControlChannel))
  17722. return 0;
  17723. }
  17724. if ((val)->o[0] & 0x2) {
  17725. if (!ASN1PERDecBoolean(dec, &(val)->mediaControlGuaranteedDelivery))
  17726. return 0;
  17727. }
  17728. if (!y) {
  17729. ZeroMemory((val)->o + 1, 1);
  17730. } else {
  17731. if (!ASN1PERDecNormallySmallExtension(dec, &e, 3, (val)->o + 1))
  17732. return 0;
  17733. if ((val)->o[1] & 0x80) {
  17734. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  17735. return 0;
  17736. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  17737. return 0;
  17738. if (!ASN1Dec_RedundancyEncoding(dd, &(val)->redundancyEncoding))
  17739. return 0;
  17740. ASN1_CloseDecoder(dd);
  17741. ASN1Free(db);
  17742. }
  17743. if ((val)->o[1] & 0x40) {
  17744. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  17745. return 0;
  17746. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  17747. return 0;
  17748. if (!ASN1PERDecU16Val(dd, 8, &(val)->sessionDependency))
  17749. return 0;
  17750. (val)->sessionDependency += 1;
  17751. ASN1_CloseDecoder(dd);
  17752. ASN1Free(db);
  17753. }
  17754. if ((val)->o[1] & 0x20) {
  17755. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  17756. return 0;
  17757. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  17758. return 0;
  17759. if (!ASN1Dec_TerminalLabel(dd, &(val)->destination))
  17760. return 0;
  17761. ASN1_CloseDecoder(dd);
  17762. ASN1Free(db);
  17763. }
  17764. for (i = 0; i < e; i++) {
  17765. if (!ASN1PERDecSkipFragmented(dec, 8))
  17766. return 0;
  17767. }
  17768. }
  17769. return 1;
  17770. }
  17771. static void ASN1CALL ASN1Free_CommunicationModeTableEntry(CommunicationModeTableEntry *val)
  17772. {
  17773. if (val) {
  17774. if ((val)->o[0] & 0x80) {
  17775. ASN1Free_CommunicationModeTableEntry_nonStandard(&(val)->nonStandard);
  17776. }
  17777. ASN1char16string_free(&(val)->sessionDescription);
  17778. ASN1Free_CommunicationModeTableEntry_dataType(&(val)->dataType);
  17779. if ((val)->o[0] & 0x10) {
  17780. ASN1Free_H245TransportAddress(&(val)->mediaChannel);
  17781. }
  17782. if ((val)->o[0] & 0x4) {
  17783. ASN1Free_H245TransportAddress(&(val)->mediaControlChannel);
  17784. }
  17785. if ((val)->o[1] & 0x80) {
  17786. ASN1Free_RedundancyEncoding(&(val)->redundancyEncoding);
  17787. }
  17788. }
  17789. }
  17790. static int ASN1CALL ASN1Enc_CommunicationModeResponse_communicationModeTable(ASN1encoding_t enc, PCommunicationModeResponse_communicationModeTable *val)
  17791. {
  17792. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CommunicationModeResponse_communicationModeTable_ElmFn, 1, 256, 8);
  17793. }
  17794. static int ASN1CALL ASN1Enc_CommunicationModeResponse_communicationModeTable_ElmFn(ASN1encoding_t enc, PCommunicationModeResponse_communicationModeTable val)
  17795. {
  17796. if (!ASN1Enc_CommunicationModeTableEntry(enc, &val->value))
  17797. return 0;
  17798. return 1;
  17799. }
  17800. static int ASN1CALL ASN1Dec_CommunicationModeResponse_communicationModeTable(ASN1decoding_t dec, PCommunicationModeResponse_communicationModeTable *val)
  17801. {
  17802. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CommunicationModeResponse_communicationModeTable_ElmFn, sizeof(**val), 1, 256, 8);
  17803. }
  17804. static int ASN1CALL ASN1Dec_CommunicationModeResponse_communicationModeTable_ElmFn(ASN1decoding_t dec, PCommunicationModeResponse_communicationModeTable val)
  17805. {
  17806. if (!ASN1Dec_CommunicationModeTableEntry(dec, &val->value))
  17807. return 0;
  17808. return 1;
  17809. }
  17810. static void ASN1CALL ASN1Free_CommunicationModeResponse_communicationModeTable(PCommunicationModeResponse_communicationModeTable *val)
  17811. {
  17812. if (val) {
  17813. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CommunicationModeResponse_communicationModeTable_ElmFn);
  17814. }
  17815. }
  17816. static void ASN1CALL ASN1Free_CommunicationModeResponse_communicationModeTable_ElmFn(PCommunicationModeResponse_communicationModeTable val)
  17817. {
  17818. if (val) {
  17819. ASN1Free_CommunicationModeTableEntry(&val->value);
  17820. }
  17821. }
  17822. static int ASN1CALL ASN1Enc_CommunicationModeCommand_communicationModeTable(ASN1encoding_t enc, PCommunicationModeCommand_communicationModeTable *val)
  17823. {
  17824. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CommunicationModeCommand_communicationModeTable_ElmFn, 1, 256, 8);
  17825. }
  17826. static int ASN1CALL ASN1Enc_CommunicationModeCommand_communicationModeTable_ElmFn(ASN1encoding_t enc, PCommunicationModeCommand_communicationModeTable val)
  17827. {
  17828. if (!ASN1Enc_CommunicationModeTableEntry(enc, &val->value))
  17829. return 0;
  17830. return 1;
  17831. }
  17832. static int ASN1CALL ASN1Dec_CommunicationModeCommand_communicationModeTable(ASN1decoding_t dec, PCommunicationModeCommand_communicationModeTable *val)
  17833. {
  17834. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CommunicationModeCommand_communicationModeTable_ElmFn, sizeof(**val), 1, 256, 8);
  17835. }
  17836. static int ASN1CALL ASN1Dec_CommunicationModeCommand_communicationModeTable_ElmFn(ASN1decoding_t dec, PCommunicationModeCommand_communicationModeTable val)
  17837. {
  17838. if (!ASN1Dec_CommunicationModeTableEntry(dec, &val->value))
  17839. return 0;
  17840. return 1;
  17841. }
  17842. static void ASN1CALL ASN1Free_CommunicationModeCommand_communicationModeTable(PCommunicationModeCommand_communicationModeTable *val)
  17843. {
  17844. if (val) {
  17845. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CommunicationModeCommand_communicationModeTable_ElmFn);
  17846. }
  17847. }
  17848. static void ASN1CALL ASN1Free_CommunicationModeCommand_communicationModeTable_ElmFn(PCommunicationModeCommand_communicationModeTable val)
  17849. {
  17850. if (val) {
  17851. ASN1Free_CommunicationModeTableEntry(&val->value);
  17852. }
  17853. }
  17854. static int ASN1CALL ASN1Enc_TerminalCapabilitySet_capabilityTable(ASN1encoding_t enc, PTerminalCapabilitySet_capabilityTable *val)
  17855. {
  17856. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_TerminalCapabilitySet_capabilityTable_ElmFn, 1, 256, 8);
  17857. }
  17858. static int ASN1CALL ASN1Enc_TerminalCapabilitySet_capabilityTable_ElmFn(ASN1encoding_t enc, PTerminalCapabilitySet_capabilityTable val)
  17859. {
  17860. if (!ASN1Enc_CapabilityTableEntry(enc, &val->value))
  17861. return 0;
  17862. return 1;
  17863. }
  17864. static int ASN1CALL ASN1Dec_TerminalCapabilitySet_capabilityTable(ASN1decoding_t dec, PTerminalCapabilitySet_capabilityTable *val)
  17865. {
  17866. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_TerminalCapabilitySet_capabilityTable_ElmFn, sizeof(**val), 1, 256, 8);
  17867. }
  17868. static int ASN1CALL ASN1Dec_TerminalCapabilitySet_capabilityTable_ElmFn(ASN1decoding_t dec, PTerminalCapabilitySet_capabilityTable val)
  17869. {
  17870. if (!ASN1Dec_CapabilityTableEntry(dec, &val->value))
  17871. return 0;
  17872. return 1;
  17873. }
  17874. static void ASN1CALL ASN1Free_TerminalCapabilitySet_capabilityTable(PTerminalCapabilitySet_capabilityTable *val)
  17875. {
  17876. if (val) {
  17877. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_TerminalCapabilitySet_capabilityTable_ElmFn);
  17878. }
  17879. }
  17880. static void ASN1CALL ASN1Free_TerminalCapabilitySet_capabilityTable_ElmFn(PTerminalCapabilitySet_capabilityTable val)
  17881. {
  17882. if (val) {
  17883. ASN1Free_CapabilityTableEntry(&val->value);
  17884. }
  17885. }
  17886. static int ASN1CALL ASN1Enc_TerminalCapabilitySet(ASN1encoding_t enc, TerminalCapabilitySet *val)
  17887. {
  17888. if (!ASN1PEREncExtensionBitClear(enc))
  17889. return 0;
  17890. if (!ASN1PEREncBits(enc, 3, (val)->o))
  17891. return 0;
  17892. ASN1PEREncAlignment(enc);
  17893. if (!ASN1PEREncBitVal(enc, 8, (val)->sequenceNumber))
  17894. return 0;
  17895. if (!ASN1PEREncObjectIdentifier(enc, &(val)->protocolIdentifier))
  17896. return 0;
  17897. if ((val)->o[0] & 0x80) {
  17898. if (!ASN1Enc_MultiplexCapability(enc, &(val)->multiplexCapability))
  17899. return 0;
  17900. }
  17901. if ((val)->o[0] & 0x40) {
  17902. if (!ASN1Enc_TerminalCapabilitySet_capabilityTable(enc, &(val)->capabilityTable))
  17903. return 0;
  17904. }
  17905. if ((val)->o[0] & 0x20) {
  17906. if (!ASN1Enc_TerminalCapabilitySet_capabilityDescriptors(enc, &(val)->capabilityDescriptors))
  17907. return 0;
  17908. }
  17909. return 1;
  17910. }
  17911. static int ASN1CALL ASN1Dec_TerminalCapabilitySet(ASN1decoding_t dec, TerminalCapabilitySet *val)
  17912. {
  17913. ASN1uint32_t y;
  17914. if (!ASN1PERDecExtensionBit(dec, &y))
  17915. return 0;
  17916. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  17917. return 0;
  17918. ASN1PERDecAlignment(dec);
  17919. if (!ASN1PERDecU16Val(dec, 8, &(val)->sequenceNumber))
  17920. return 0;
  17921. if (!ASN1PERDecObjectIdentifier(dec, &(val)->protocolIdentifier))
  17922. return 0;
  17923. if ((val)->o[0] & 0x80) {
  17924. if (!ASN1Dec_MultiplexCapability(dec, &(val)->multiplexCapability))
  17925. return 0;
  17926. }
  17927. if ((val)->o[0] & 0x40) {
  17928. if (!ASN1Dec_TerminalCapabilitySet_capabilityTable(dec, &(val)->capabilityTable))
  17929. return 0;
  17930. }
  17931. if ((val)->o[0] & 0x20) {
  17932. if (!ASN1Dec_TerminalCapabilitySet_capabilityDescriptors(dec, &(val)->capabilityDescriptors))
  17933. return 0;
  17934. }
  17935. if (y) {
  17936. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  17937. return 0;
  17938. }
  17939. return 1;
  17940. }
  17941. static void ASN1CALL ASN1Free_TerminalCapabilitySet(TerminalCapabilitySet *val)
  17942. {
  17943. if (val) {
  17944. ASN1objectidentifier_free(&(val)->protocolIdentifier);
  17945. if ((val)->o[0] & 0x80) {
  17946. ASN1Free_MultiplexCapability(&(val)->multiplexCapability);
  17947. }
  17948. if ((val)->o[0] & 0x40) {
  17949. ASN1Free_TerminalCapabilitySet_capabilityTable(&(val)->capabilityTable);
  17950. }
  17951. if ((val)->o[0] & 0x20) {
  17952. ASN1Free_TerminalCapabilitySet_capabilityDescriptors(&(val)->capabilityDescriptors);
  17953. }
  17954. }
  17955. }
  17956. static int ASN1CALL ASN1Enc_H2250LogicalChannelParameters(ASN1encoding_t enc, H2250LogicalChannelParameters *val)
  17957. {
  17958. ASN1uint32_t y;
  17959. ASN1encoding_t ee;
  17960. y = ASN1PEREncCheckExtensions(3, (val)->o + 2);
  17961. if (!ASN1PEREncBitVal(enc, 1, y))
  17962. return 0;
  17963. if (!ASN1PEREncBits(enc, 10, (val)->o))
  17964. return 0;
  17965. if ((val)->o[0] & 0x80) {
  17966. if (!ASN1Enc_H2250LogicalChannelParameters_nonStandard(enc, &(val)->nonStandard))
  17967. return 0;
  17968. }
  17969. ASN1PEREncAlignment(enc);
  17970. if (!ASN1PEREncBitVal(enc, 8, (val)->sessionID))
  17971. return 0;
  17972. if ((val)->o[0] & 0x40) {
  17973. if (!ASN1PEREncBitVal(enc, 8, (val)->associatedSessionID - 1))
  17974. return 0;
  17975. }
  17976. if ((val)->o[0] & 0x20) {
  17977. if (!ASN1Enc_H245TransportAddress(enc, &(val)->mediaChannel))
  17978. return 0;
  17979. }
  17980. if ((val)->o[0] & 0x10) {
  17981. if (!ASN1PEREncBoolean(enc, (val)->mediaGuaranteedDelivery))
  17982. return 0;
  17983. }
  17984. if ((val)->o[0] & 0x8) {
  17985. if (!ASN1Enc_H245TransportAddress(enc, &(val)->mediaControlChannel))
  17986. return 0;
  17987. }
  17988. if ((val)->o[0] & 0x4) {
  17989. if (!ASN1PEREncBoolean(enc, (val)->mediaControlGuaranteedDelivery))
  17990. return 0;
  17991. }
  17992. if ((val)->o[0] & 0x2) {
  17993. if (!ASN1PEREncBoolean(enc, (val)->silenceSuppression))
  17994. return 0;
  17995. }
  17996. if ((val)->o[0] & 0x1) {
  17997. if (!ASN1Enc_TerminalLabel(enc, &(val)->destination))
  17998. return 0;
  17999. }
  18000. if ((val)->o[1] & 0x80) {
  18001. if (!ASN1PEREncBitVal(enc, 5, (val)->dynamicRTPPayloadType - 96))
  18002. return 0;
  18003. }
  18004. if ((val)->o[1] & 0x40) {
  18005. if (!ASN1Enc_H2250LogicalChannelParameters_mediaPacketization(enc, &(val)->mediaPacketization))
  18006. return 0;
  18007. }
  18008. if (y) {
  18009. if (!ASN1PEREncNormallySmallBits(enc, 3, (val)->o + 2))
  18010. return 0;
  18011. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18012. return 0;
  18013. if ((val)->o[2] & 0x80) {
  18014. if (!ASN1Enc_TransportCapability(ee, &(val)->transportCapability))
  18015. return 0;
  18016. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18017. return 0;
  18018. }
  18019. if ((val)->o[2] & 0x40) {
  18020. if (!ASN1Enc_RedundancyEncoding(ee, &(val)->redundancyEncoding))
  18021. return 0;
  18022. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18023. return 0;
  18024. }
  18025. if ((val)->o[2] & 0x20) {
  18026. if (!ASN1Enc_TerminalLabel(ee, &(val)->source))
  18027. return 0;
  18028. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18029. return 0;
  18030. }
  18031. ASN1_CloseEncoder2(ee);
  18032. }
  18033. return 1;
  18034. }
  18035. static int ASN1CALL ASN1Dec_H2250LogicalChannelParameters(ASN1decoding_t dec, H2250LogicalChannelParameters *val)
  18036. {
  18037. ASN1uint32_t y;
  18038. ASN1decoding_t dd;
  18039. ASN1octet_t *db;
  18040. ASN1uint32_t ds;
  18041. ASN1uint32_t i;
  18042. ASN1uint32_t e;
  18043. if (!ASN1PERDecExtensionBit(dec, &y))
  18044. return 0;
  18045. if (!ASN1PERDecExtension(dec, 10, (val)->o))
  18046. return 0;
  18047. if ((val)->o[0] & 0x80) {
  18048. if (!ASN1Dec_H2250LogicalChannelParameters_nonStandard(dec, &(val)->nonStandard))
  18049. return 0;
  18050. }
  18051. ASN1PERDecAlignment(dec);
  18052. if (!ASN1PERDecU16Val(dec, 8, &(val)->sessionID))
  18053. return 0;
  18054. if ((val)->o[0] & 0x40) {
  18055. if (!ASN1PERDecU16Val(dec, 8, &(val)->associatedSessionID))
  18056. return 0;
  18057. (val)->associatedSessionID += 1;
  18058. }
  18059. if ((val)->o[0] & 0x20) {
  18060. if (!ASN1Dec_H245TransportAddress(dec, &(val)->mediaChannel))
  18061. return 0;
  18062. }
  18063. if ((val)->o[0] & 0x10) {
  18064. if (!ASN1PERDecBoolean(dec, &(val)->mediaGuaranteedDelivery))
  18065. return 0;
  18066. }
  18067. if ((val)->o[0] & 0x8) {
  18068. if (!ASN1Dec_H245TransportAddress(dec, &(val)->mediaControlChannel))
  18069. return 0;
  18070. }
  18071. if ((val)->o[0] & 0x4) {
  18072. if (!ASN1PERDecBoolean(dec, &(val)->mediaControlGuaranteedDelivery))
  18073. return 0;
  18074. }
  18075. if ((val)->o[0] & 0x2) {
  18076. if (!ASN1PERDecBoolean(dec, &(val)->silenceSuppression))
  18077. return 0;
  18078. }
  18079. if ((val)->o[0] & 0x1) {
  18080. if (!ASN1Dec_TerminalLabel(dec, &(val)->destination))
  18081. return 0;
  18082. }
  18083. if ((val)->o[1] & 0x80) {
  18084. if (!ASN1PERDecU16Val(dec, 5, &(val)->dynamicRTPPayloadType))
  18085. return 0;
  18086. (val)->dynamicRTPPayloadType += 96;
  18087. }
  18088. if ((val)->o[1] & 0x40) {
  18089. if (!ASN1Dec_H2250LogicalChannelParameters_mediaPacketization(dec, &(val)->mediaPacketization))
  18090. return 0;
  18091. }
  18092. if (!y) {
  18093. ZeroMemory((val)->o + 2, 1);
  18094. } else {
  18095. if (!ASN1PERDecNormallySmallExtension(dec, &e, 3, (val)->o + 2))
  18096. return 0;
  18097. if ((val)->o[2] & 0x80) {
  18098. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18099. return 0;
  18100. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18101. return 0;
  18102. if (!ASN1Dec_TransportCapability(dd, &(val)->transportCapability))
  18103. return 0;
  18104. ASN1_CloseDecoder(dd);
  18105. ASN1Free(db);
  18106. }
  18107. if ((val)->o[2] & 0x40) {
  18108. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18109. return 0;
  18110. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18111. return 0;
  18112. if (!ASN1Dec_RedundancyEncoding(dd, &(val)->redundancyEncoding))
  18113. return 0;
  18114. ASN1_CloseDecoder(dd);
  18115. ASN1Free(db);
  18116. }
  18117. if ((val)->o[2] & 0x20) {
  18118. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18119. return 0;
  18120. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18121. return 0;
  18122. if (!ASN1Dec_TerminalLabel(dd, &(val)->source))
  18123. return 0;
  18124. ASN1_CloseDecoder(dd);
  18125. ASN1Free(db);
  18126. }
  18127. for (i = 0; i < e; i++) {
  18128. if (!ASN1PERDecSkipFragmented(dec, 8))
  18129. return 0;
  18130. }
  18131. }
  18132. return 1;
  18133. }
  18134. static void ASN1CALL ASN1Free_H2250LogicalChannelParameters(H2250LogicalChannelParameters *val)
  18135. {
  18136. if (val) {
  18137. if ((val)->o[0] & 0x80) {
  18138. ASN1Free_H2250LogicalChannelParameters_nonStandard(&(val)->nonStandard);
  18139. }
  18140. if ((val)->o[0] & 0x20) {
  18141. ASN1Free_H245TransportAddress(&(val)->mediaChannel);
  18142. }
  18143. if ((val)->o[0] & 0x8) {
  18144. ASN1Free_H245TransportAddress(&(val)->mediaControlChannel);
  18145. }
  18146. if ((val)->o[1] & 0x40) {
  18147. ASN1Free_H2250LogicalChannelParameters_mediaPacketization(&(val)->mediaPacketization);
  18148. }
  18149. if ((val)->o[2] & 0x80) {
  18150. ASN1Free_TransportCapability(&(val)->transportCapability);
  18151. }
  18152. if ((val)->o[2] & 0x40) {
  18153. ASN1Free_RedundancyEncoding(&(val)->redundancyEncoding);
  18154. }
  18155. }
  18156. }
  18157. static int ASN1CALL ASN1Enc_ModeDescription(ASN1encoding_t enc, ModeDescription *val)
  18158. {
  18159. ASN1uint32_t i;
  18160. ASN1PEREncAlignment(enc);
  18161. if (!ASN1PEREncBitVal(enc, 8, (val)->count - 1))
  18162. return 0;
  18163. for (i = 0; i < (val)->count; i++) {
  18164. if (!ASN1Enc_ModeElement(enc, &((val)->value)[i]))
  18165. return 0;
  18166. }
  18167. return 1;
  18168. }
  18169. static int ASN1CALL ASN1Dec_ModeDescription(ASN1decoding_t dec, ModeDescription *val)
  18170. {
  18171. ASN1uint32_t i;
  18172. ASN1PERDecAlignment(dec);
  18173. if (!ASN1PERDecU32Val(dec, 8, &(val)->count))
  18174. return 0;
  18175. (val)->count += 1;
  18176. for (i = 0; i < (val)->count; i++) {
  18177. if (!ASN1Dec_ModeElement(dec, &((val)->value)[i]))
  18178. return 0;
  18179. }
  18180. return 1;
  18181. }
  18182. static void ASN1CALL ASN1Free_ModeDescription(ModeDescription *val)
  18183. {
  18184. ASN1uint32_t i;
  18185. if (val) {
  18186. for (i = 0; i < (val)->count; i++) {
  18187. ASN1Free_ModeElement(&(val)->value[i]);
  18188. }
  18189. }
  18190. }
  18191. static int ASN1CALL ASN1Enc_OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters(ASN1encoding_t enc, OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters *val)
  18192. {
  18193. ASN1encoding_t ee;
  18194. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 2, 3))
  18195. return 0;
  18196. switch ((val)->choice) {
  18197. case 1:
  18198. if (!ASN1Enc_H222LogicalChannelParameters(enc, &(val)->u.h222LogicalChannelParameters))
  18199. return 0;
  18200. break;
  18201. case 2:
  18202. if (!ASN1Enc_H223LogicalChannelParameters(enc, &(val)->u.h223LogicalChannelParameters))
  18203. return 0;
  18204. break;
  18205. case 3:
  18206. if (!ASN1Enc_V76LogicalChannelParameters(enc, &(val)->u.v76LogicalChannelParameters))
  18207. return 0;
  18208. break;
  18209. case 4:
  18210. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18211. return 0;
  18212. if (!ASN1Enc_H2250LogicalChannelParameters(ee, &(val)->u.h2250LogicalChannelParameters))
  18213. return 0;
  18214. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18215. return 0;
  18216. ASN1_CloseEncoder2(ee);
  18217. break;
  18218. case 5:
  18219. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18220. return 0;
  18221. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18222. return 0;
  18223. ASN1_CloseEncoder2(ee);
  18224. break;
  18225. default:
  18226. /* impossible */
  18227. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  18228. return 0;
  18229. }
  18230. return 1;
  18231. }
  18232. static int ASN1CALL ASN1Dec_OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters(ASN1decoding_t dec, OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters *val)
  18233. {
  18234. ASN1decoding_t dd;
  18235. ASN1octet_t *db;
  18236. ASN1uint32_t ds;
  18237. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 2, 3))
  18238. return 0;
  18239. switch ((val)->choice) {
  18240. case 1:
  18241. if (!ASN1Dec_H222LogicalChannelParameters(dec, &(val)->u.h222LogicalChannelParameters))
  18242. return 0;
  18243. break;
  18244. case 2:
  18245. if (!ASN1Dec_H223LogicalChannelParameters(dec, &(val)->u.h223LogicalChannelParameters))
  18246. return 0;
  18247. break;
  18248. case 3:
  18249. if (!ASN1Dec_V76LogicalChannelParameters(dec, &(val)->u.v76LogicalChannelParameters))
  18250. return 0;
  18251. break;
  18252. case 4:
  18253. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18254. return 0;
  18255. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18256. return 0;
  18257. if (!ASN1Dec_H2250LogicalChannelParameters(dd, &(val)->u.h2250LogicalChannelParameters))
  18258. return 0;
  18259. ASN1_CloseDecoder(dd);
  18260. ASN1Free(db);
  18261. break;
  18262. case 5:
  18263. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18264. return 0;
  18265. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18266. return 0;
  18267. ASN1_CloseDecoder(dd);
  18268. ASN1Free(db);
  18269. break;
  18270. case 0:
  18271. /* extension case */
  18272. if (!ASN1PERDecSkipFragmented(dec, 8))
  18273. return 0;
  18274. break;
  18275. default:
  18276. /* impossible */
  18277. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  18278. return 0;
  18279. }
  18280. return 1;
  18281. }
  18282. static void ASN1CALL ASN1Free_OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters(OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters *val)
  18283. {
  18284. if (val) {
  18285. switch ((val)->choice) {
  18286. case 1:
  18287. ASN1Free_H222LogicalChannelParameters(&(val)->u.h222LogicalChannelParameters);
  18288. break;
  18289. case 2:
  18290. ASN1Free_H223LogicalChannelParameters(&(val)->u.h223LogicalChannelParameters);
  18291. break;
  18292. case 4:
  18293. ASN1Free_H2250LogicalChannelParameters(&(val)->u.h2250LogicalChannelParameters);
  18294. break;
  18295. }
  18296. }
  18297. }
  18298. static int ASN1CALL ASN1Enc_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters(ASN1encoding_t enc, OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters *val)
  18299. {
  18300. ASN1encoding_t ee;
  18301. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 1, 2))
  18302. return 0;
  18303. switch ((val)->choice) {
  18304. case 1:
  18305. if (!ASN1Enc_H223LogicalChannelParameters(enc, &(val)->u.h223LogicalChannelParameters))
  18306. return 0;
  18307. break;
  18308. case 2:
  18309. if (!ASN1Enc_V76LogicalChannelParameters(enc, &(val)->u.v76LogicalChannelParameters))
  18310. return 0;
  18311. break;
  18312. case 3:
  18313. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18314. return 0;
  18315. if (!ASN1Enc_H2250LogicalChannelParameters(ee, &(val)->u.h2250LogicalChannelParameters))
  18316. return 0;
  18317. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18318. return 0;
  18319. ASN1_CloseEncoder2(ee);
  18320. break;
  18321. default:
  18322. /* impossible */
  18323. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  18324. return 0;
  18325. }
  18326. return 1;
  18327. }
  18328. static int ASN1CALL ASN1Dec_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters(ASN1decoding_t dec, OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters *val)
  18329. {
  18330. ASN1decoding_t dd;
  18331. ASN1octet_t *db;
  18332. ASN1uint32_t ds;
  18333. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 1, 2))
  18334. return 0;
  18335. switch ((val)->choice) {
  18336. case 1:
  18337. if (!ASN1Dec_H223LogicalChannelParameters(dec, &(val)->u.h223LogicalChannelParameters))
  18338. return 0;
  18339. break;
  18340. case 2:
  18341. if (!ASN1Dec_V76LogicalChannelParameters(dec, &(val)->u.v76LogicalChannelParameters))
  18342. return 0;
  18343. break;
  18344. case 3:
  18345. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18346. return 0;
  18347. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18348. return 0;
  18349. if (!ASN1Dec_H2250LogicalChannelParameters(dd, &(val)->u.h2250LogicalChannelParameters))
  18350. return 0;
  18351. ASN1_CloseDecoder(dd);
  18352. ASN1Free(db);
  18353. break;
  18354. case 0:
  18355. /* extension case */
  18356. if (!ASN1PERDecSkipFragmented(dec, 8))
  18357. return 0;
  18358. break;
  18359. default:
  18360. /* impossible */
  18361. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  18362. return 0;
  18363. }
  18364. return 1;
  18365. }
  18366. static void ASN1CALL ASN1Free_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters(OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters *val)
  18367. {
  18368. if (val) {
  18369. switch ((val)->choice) {
  18370. case 1:
  18371. ASN1Free_H223LogicalChannelParameters(&(val)->u.h223LogicalChannelParameters);
  18372. break;
  18373. case 3:
  18374. ASN1Free_H2250LogicalChannelParameters(&(val)->u.h2250LogicalChannelParameters);
  18375. break;
  18376. }
  18377. }
  18378. }
  18379. static int ASN1CALL ASN1Enc_OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters(ASN1encoding_t enc, OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters *val)
  18380. {
  18381. ASN1encoding_t ee;
  18382. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 0, 1))
  18383. return 0;
  18384. switch ((val)->choice) {
  18385. case 1:
  18386. if (!ASN1Enc_H222LogicalChannelParameters(enc, &(val)->u.h222LogicalChannelParameters))
  18387. return 0;
  18388. break;
  18389. case 2:
  18390. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18391. return 0;
  18392. if (!ASN1Enc_H2250LogicalChannelParameters(ee, &(val)->u.h2250LogicalChannelParameters))
  18393. return 0;
  18394. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18395. return 0;
  18396. ASN1_CloseEncoder2(ee);
  18397. break;
  18398. default:
  18399. /* impossible */
  18400. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  18401. return 0;
  18402. }
  18403. return 1;
  18404. }
  18405. static int ASN1CALL ASN1Dec_OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters(ASN1decoding_t dec, OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters *val)
  18406. {
  18407. ASN1decoding_t dd;
  18408. ASN1octet_t *db;
  18409. ASN1uint32_t ds;
  18410. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 0, 1))
  18411. return 0;
  18412. switch ((val)->choice) {
  18413. case 1:
  18414. if (!ASN1Dec_H222LogicalChannelParameters(dec, &(val)->u.h222LogicalChannelParameters))
  18415. return 0;
  18416. break;
  18417. case 2:
  18418. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18419. return 0;
  18420. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18421. return 0;
  18422. if (!ASN1Dec_H2250LogicalChannelParameters(dd, &(val)->u.h2250LogicalChannelParameters))
  18423. return 0;
  18424. ASN1_CloseDecoder(dd);
  18425. ASN1Free(db);
  18426. break;
  18427. case 0:
  18428. /* extension case */
  18429. if (!ASN1PERDecSkipFragmented(dec, 8))
  18430. return 0;
  18431. break;
  18432. default:
  18433. /* impossible */
  18434. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  18435. return 0;
  18436. }
  18437. return 1;
  18438. }
  18439. static void ASN1CALL ASN1Free_OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters(OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters *val)
  18440. {
  18441. if (val) {
  18442. switch ((val)->choice) {
  18443. case 1:
  18444. ASN1Free_H222LogicalChannelParameters(&(val)->u.h222LogicalChannelParameters);
  18445. break;
  18446. case 2:
  18447. ASN1Free_H2250LogicalChannelParameters(&(val)->u.h2250LogicalChannelParameters);
  18448. break;
  18449. }
  18450. }
  18451. }
  18452. static int ASN1CALL ASN1Enc_RequestMode_requestedModes(ASN1encoding_t enc, PRequestMode_requestedModes *val)
  18453. {
  18454. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_RequestMode_requestedModes_ElmFn, 1, 256, 8);
  18455. }
  18456. static int ASN1CALL ASN1Enc_RequestMode_requestedModes_ElmFn(ASN1encoding_t enc, PRequestMode_requestedModes val)
  18457. {
  18458. if (!ASN1Enc_ModeDescription(enc, &val->value))
  18459. return 0;
  18460. return 1;
  18461. }
  18462. static int ASN1CALL ASN1Dec_RequestMode_requestedModes(ASN1decoding_t dec, PRequestMode_requestedModes *val)
  18463. {
  18464. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_RequestMode_requestedModes_ElmFn, sizeof(**val), 1, 256, 8);
  18465. }
  18466. static int ASN1CALL ASN1Dec_RequestMode_requestedModes_ElmFn(ASN1decoding_t dec, PRequestMode_requestedModes val)
  18467. {
  18468. if (!ASN1Dec_ModeDescription(dec, &val->value))
  18469. return 0;
  18470. return 1;
  18471. }
  18472. static void ASN1CALL ASN1Free_RequestMode_requestedModes(PRequestMode_requestedModes *val)
  18473. {
  18474. if (val) {
  18475. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_RequestMode_requestedModes_ElmFn);
  18476. }
  18477. }
  18478. static void ASN1CALL ASN1Free_RequestMode_requestedModes_ElmFn(PRequestMode_requestedModes val)
  18479. {
  18480. if (val) {
  18481. ASN1Free_ModeDescription(&val->value);
  18482. }
  18483. }
  18484. static int ASN1CALL ASN1Enc_OpenLogicalChannelAck_reverseLogicalChannelParameters(ASN1encoding_t enc, OpenLogicalChannelAck_reverseLogicalChannelParameters *val)
  18485. {
  18486. ASN1uint32_t y;
  18487. ASN1encoding_t ee;
  18488. y = ASN1PEREncCheckExtensions(1, (val)->o + 1);
  18489. if (!ASN1PEREncBitVal(enc, 1, y))
  18490. return 0;
  18491. if (!ASN1PEREncBits(enc, 2, (val)->o))
  18492. return 0;
  18493. if (!ASN1PEREncUnsignedShort(enc, (val)->reverseLogicalChannelNumber - 1))
  18494. return 0;
  18495. if ((val)->o[0] & 0x80) {
  18496. if (!ASN1PEREncUnsignedShort(enc, (val)->portNumber))
  18497. return 0;
  18498. }
  18499. if ((val)->o[0] & 0x40) {
  18500. if (!ASN1Enc_OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters(enc, &(val)->multiplexParameters))
  18501. return 0;
  18502. }
  18503. if (y) {
  18504. if (!ASN1PEREncNormallySmallBits(enc, 1, (val)->o + 1))
  18505. return 0;
  18506. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18507. return 0;
  18508. if ((val)->o[1] & 0x80) {
  18509. if (!ASN1PEREncUnsignedShort(ee, (val)->replacementFor - 1))
  18510. return 0;
  18511. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18512. return 0;
  18513. }
  18514. ASN1_CloseEncoder2(ee);
  18515. }
  18516. return 1;
  18517. }
  18518. static int ASN1CALL ASN1Dec_OpenLogicalChannelAck_reverseLogicalChannelParameters(ASN1decoding_t dec, OpenLogicalChannelAck_reverseLogicalChannelParameters *val)
  18519. {
  18520. ASN1uint32_t y;
  18521. ASN1decoding_t dd;
  18522. ASN1octet_t *db;
  18523. ASN1uint32_t ds;
  18524. ASN1uint32_t i;
  18525. ASN1uint32_t e;
  18526. if (!ASN1PERDecExtensionBit(dec, &y))
  18527. return 0;
  18528. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  18529. return 0;
  18530. if (!ASN1PERDecUnsignedShort(dec, &(val)->reverseLogicalChannelNumber))
  18531. return 0;
  18532. (val)->reverseLogicalChannelNumber += 1;
  18533. if ((val)->o[0] & 0x80) {
  18534. if (!ASN1PERDecUnsignedShort(dec, &(val)->portNumber))
  18535. return 0;
  18536. }
  18537. if ((val)->o[0] & 0x40) {
  18538. if (!ASN1Dec_OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters(dec, &(val)->multiplexParameters))
  18539. return 0;
  18540. }
  18541. if (!y) {
  18542. ZeroMemory((val)->o + 1, 1);
  18543. } else {
  18544. if (!ASN1PERDecNormallySmallExtension(dec, &e, 1, (val)->o + 1))
  18545. return 0;
  18546. if ((val)->o[1] & 0x80) {
  18547. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18548. return 0;
  18549. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18550. return 0;
  18551. if (!ASN1PERDecUnsignedShort(dd, &(val)->replacementFor))
  18552. return 0;
  18553. (val)->replacementFor += 1;
  18554. ASN1_CloseDecoder(dd);
  18555. ASN1Free(db);
  18556. }
  18557. for (i = 0; i < e; i++) {
  18558. if (!ASN1PERDecSkipFragmented(dec, 8))
  18559. return 0;
  18560. }
  18561. }
  18562. return 1;
  18563. }
  18564. static void ASN1CALL ASN1Free_OpenLogicalChannelAck_reverseLogicalChannelParameters(OpenLogicalChannelAck_reverseLogicalChannelParameters *val)
  18565. {
  18566. if (val) {
  18567. if ((val)->o[0] & 0x40) {
  18568. ASN1Free_OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters(&(val)->multiplexParameters);
  18569. }
  18570. }
  18571. }
  18572. static int ASN1CALL ASN1Enc_OpenLogicalChannel_reverseLogicalChannelParameters(ASN1encoding_t enc, OpenLogicalChannel_reverseLogicalChannelParameters *val)
  18573. {
  18574. ASN1uint32_t y;
  18575. ASN1encoding_t ee;
  18576. y = ASN1PEREncCheckExtensions(2, (val)->o + 1);
  18577. if (!ASN1PEREncBitVal(enc, 1, y))
  18578. return 0;
  18579. if (!ASN1PEREncBits(enc, 1, (val)->o))
  18580. return 0;
  18581. if (!ASN1Enc_DataType(enc, &(val)->dataType))
  18582. return 0;
  18583. if ((val)->o[0] & 0x80) {
  18584. if (!ASN1Enc_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters(enc, &(val)->multiplexParameters))
  18585. return 0;
  18586. }
  18587. if (y) {
  18588. if (!ASN1PEREncNormallySmallBits(enc, 2, (val)->o + 1))
  18589. return 0;
  18590. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18591. return 0;
  18592. if ((val)->o[1] & 0x80) {
  18593. if (!ASN1PEREncUnsignedShort(ee, (val)->reverseLogicalChannelDependency - 1))
  18594. return 0;
  18595. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18596. return 0;
  18597. }
  18598. if ((val)->o[1] & 0x40) {
  18599. if (!ASN1PEREncUnsignedShort(ee, (val)->replacementFor - 1))
  18600. return 0;
  18601. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18602. return 0;
  18603. }
  18604. ASN1_CloseEncoder2(ee);
  18605. }
  18606. return 1;
  18607. }
  18608. static int ASN1CALL ASN1Dec_OpenLogicalChannel_reverseLogicalChannelParameters(ASN1decoding_t dec, OpenLogicalChannel_reverseLogicalChannelParameters *val)
  18609. {
  18610. ASN1uint32_t y;
  18611. ASN1decoding_t dd;
  18612. ASN1octet_t *db;
  18613. ASN1uint32_t ds;
  18614. ASN1uint32_t i;
  18615. ASN1uint32_t e;
  18616. if (!ASN1PERDecExtensionBit(dec, &y))
  18617. return 0;
  18618. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  18619. return 0;
  18620. if (!ASN1Dec_DataType(dec, &(val)->dataType))
  18621. return 0;
  18622. if ((val)->o[0] & 0x80) {
  18623. if (!ASN1Dec_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters(dec, &(val)->multiplexParameters))
  18624. return 0;
  18625. }
  18626. if (!y) {
  18627. ZeroMemory((val)->o + 1, 1);
  18628. } else {
  18629. if (!ASN1PERDecNormallySmallExtension(dec, &e, 2, (val)->o + 1))
  18630. return 0;
  18631. if ((val)->o[1] & 0x80) {
  18632. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18633. return 0;
  18634. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18635. return 0;
  18636. if (!ASN1PERDecUnsignedShort(dd, &(val)->reverseLogicalChannelDependency))
  18637. return 0;
  18638. (val)->reverseLogicalChannelDependency += 1;
  18639. ASN1_CloseDecoder(dd);
  18640. ASN1Free(db);
  18641. }
  18642. if ((val)->o[1] & 0x40) {
  18643. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18644. return 0;
  18645. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18646. return 0;
  18647. if (!ASN1PERDecUnsignedShort(dd, &(val)->replacementFor))
  18648. return 0;
  18649. (val)->replacementFor += 1;
  18650. ASN1_CloseDecoder(dd);
  18651. ASN1Free(db);
  18652. }
  18653. for (i = 0; i < e; i++) {
  18654. if (!ASN1PERDecSkipFragmented(dec, 8))
  18655. return 0;
  18656. }
  18657. }
  18658. return 1;
  18659. }
  18660. static void ASN1CALL ASN1Free_OpenLogicalChannel_reverseLogicalChannelParameters(OpenLogicalChannel_reverseLogicalChannelParameters *val)
  18661. {
  18662. if (val) {
  18663. ASN1Free_DataType(&(val)->dataType);
  18664. if ((val)->o[0] & 0x80) {
  18665. ASN1Free_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters(&(val)->multiplexParameters);
  18666. }
  18667. }
  18668. }
  18669. static int ASN1CALL ASN1Enc_OpenLogicalChannel_forwardLogicalChannelParameters(ASN1encoding_t enc, OpenLogicalChannel_forwardLogicalChannelParameters *val)
  18670. {
  18671. ASN1uint32_t y;
  18672. ASN1encoding_t ee;
  18673. y = ASN1PEREncCheckExtensions(2, (val)->o + 1);
  18674. if (!ASN1PEREncBitVal(enc, 1, y))
  18675. return 0;
  18676. if (!ASN1PEREncBits(enc, 1, (val)->o))
  18677. return 0;
  18678. if ((val)->o[0] & 0x80) {
  18679. if (!ASN1PEREncUnsignedShort(enc, (val)->portNumber))
  18680. return 0;
  18681. }
  18682. if (!ASN1Enc_DataType(enc, &(val)->dataType))
  18683. return 0;
  18684. if (!ASN1Enc_OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters(enc, &(val)->multiplexParameters))
  18685. return 0;
  18686. if (y) {
  18687. if (!ASN1PEREncNormallySmallBits(enc, 2, (val)->o + 1))
  18688. return 0;
  18689. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18690. return 0;
  18691. if ((val)->o[1] & 0x80) {
  18692. if (!ASN1PEREncUnsignedShort(ee, (val)->forwardLogicalChannelDependency - 1))
  18693. return 0;
  18694. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18695. return 0;
  18696. }
  18697. if ((val)->o[1] & 0x40) {
  18698. if (!ASN1PEREncUnsignedShort(ee, (val)->replacementFor - 1))
  18699. return 0;
  18700. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18701. return 0;
  18702. }
  18703. ASN1_CloseEncoder2(ee);
  18704. }
  18705. return 1;
  18706. }
  18707. static int ASN1CALL ASN1Dec_OpenLogicalChannel_forwardLogicalChannelParameters(ASN1decoding_t dec, OpenLogicalChannel_forwardLogicalChannelParameters *val)
  18708. {
  18709. ASN1uint32_t y;
  18710. ASN1decoding_t dd;
  18711. ASN1octet_t *db;
  18712. ASN1uint32_t ds;
  18713. ASN1uint32_t i;
  18714. ASN1uint32_t e;
  18715. if (!ASN1PERDecExtensionBit(dec, &y))
  18716. return 0;
  18717. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  18718. return 0;
  18719. if ((val)->o[0] & 0x80) {
  18720. if (!ASN1PERDecUnsignedShort(dec, &(val)->portNumber))
  18721. return 0;
  18722. }
  18723. if (!ASN1Dec_DataType(dec, &(val)->dataType))
  18724. return 0;
  18725. if (!ASN1Dec_OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters(dec, &(val)->multiplexParameters))
  18726. return 0;
  18727. if (!y) {
  18728. ZeroMemory((val)->o + 1, 1);
  18729. } else {
  18730. if (!ASN1PERDecNormallySmallExtension(dec, &e, 2, (val)->o + 1))
  18731. return 0;
  18732. if ((val)->o[1] & 0x80) {
  18733. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18734. return 0;
  18735. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18736. return 0;
  18737. if (!ASN1PERDecUnsignedShort(dd, &(val)->forwardLogicalChannelDependency))
  18738. return 0;
  18739. (val)->forwardLogicalChannelDependency += 1;
  18740. ASN1_CloseDecoder(dd);
  18741. ASN1Free(db);
  18742. }
  18743. if ((val)->o[1] & 0x40) {
  18744. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18745. return 0;
  18746. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18747. return 0;
  18748. if (!ASN1PERDecUnsignedShort(dd, &(val)->replacementFor))
  18749. return 0;
  18750. (val)->replacementFor += 1;
  18751. ASN1_CloseDecoder(dd);
  18752. ASN1Free(db);
  18753. }
  18754. for (i = 0; i < e; i++) {
  18755. if (!ASN1PERDecSkipFragmented(dec, 8))
  18756. return 0;
  18757. }
  18758. }
  18759. return 1;
  18760. }
  18761. static void ASN1CALL ASN1Free_OpenLogicalChannel_forwardLogicalChannelParameters(OpenLogicalChannel_forwardLogicalChannelParameters *val)
  18762. {
  18763. if (val) {
  18764. ASN1Free_DataType(&(val)->dataType);
  18765. ASN1Free_OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters(&(val)->multiplexParameters);
  18766. }
  18767. }
  18768. static int ASN1CALL ASN1Enc_OpenLogicalChannel(ASN1encoding_t enc, OpenLogicalChannel *val)
  18769. {
  18770. ASN1uint32_t y;
  18771. ASN1encoding_t ee;
  18772. y = ASN1PEREncCheckExtensions(2, (val)->o + 1);
  18773. if (!ASN1PEREncBitVal(enc, 1, y))
  18774. return 0;
  18775. if (!ASN1PEREncBits(enc, 1, (val)->o))
  18776. return 0;
  18777. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  18778. return 0;
  18779. if (!ASN1Enc_OpenLogicalChannel_forwardLogicalChannelParameters(enc, &(val)->forwardLogicalChannelParameters))
  18780. return 0;
  18781. if ((val)->o[0] & 0x80) {
  18782. if (!ASN1Enc_OpenLogicalChannel_reverseLogicalChannelParameters(enc, &(val)->reverseLogicalChannelParameters))
  18783. return 0;
  18784. }
  18785. if (y) {
  18786. if (!ASN1PEREncNormallySmallBits(enc, 2, (val)->o + 1))
  18787. return 0;
  18788. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18789. return 0;
  18790. if ((val)->o[1] & 0x80) {
  18791. if (!ASN1Enc_NetworkAccessParameters(ee, &(val)->separateStack))
  18792. return 0;
  18793. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18794. return 0;
  18795. }
  18796. if ((val)->o[1] & 0x40) {
  18797. if (!ASN1Enc_EncryptionSync(ee, &(val)->encryptionSync))
  18798. return 0;
  18799. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18800. return 0;
  18801. }
  18802. ASN1_CloseEncoder2(ee);
  18803. }
  18804. return 1;
  18805. }
  18806. static int ASN1CALL ASN1Dec_OpenLogicalChannel(ASN1decoding_t dec, OpenLogicalChannel *val)
  18807. {
  18808. ASN1uint32_t y;
  18809. ASN1decoding_t dd;
  18810. ASN1octet_t *db;
  18811. ASN1uint32_t ds;
  18812. ASN1uint32_t i;
  18813. ASN1uint32_t e;
  18814. if (!ASN1PERDecExtensionBit(dec, &y))
  18815. return 0;
  18816. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  18817. return 0;
  18818. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  18819. return 0;
  18820. (val)->forwardLogicalChannelNumber += 1;
  18821. if (!ASN1Dec_OpenLogicalChannel_forwardLogicalChannelParameters(dec, &(val)->forwardLogicalChannelParameters))
  18822. return 0;
  18823. if ((val)->o[0] & 0x80) {
  18824. if (!ASN1Dec_OpenLogicalChannel_reverseLogicalChannelParameters(dec, &(val)->reverseLogicalChannelParameters))
  18825. return 0;
  18826. }
  18827. if (!y) {
  18828. ZeroMemory((val)->o + 1, 1);
  18829. } else {
  18830. if (!ASN1PERDecNormallySmallExtension(dec, &e, 2, (val)->o + 1))
  18831. return 0;
  18832. if ((val)->o[1] & 0x80) {
  18833. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18834. return 0;
  18835. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18836. return 0;
  18837. if (!ASN1Dec_NetworkAccessParameters(dd, &(val)->separateStack))
  18838. return 0;
  18839. ASN1_CloseDecoder(dd);
  18840. ASN1Free(db);
  18841. }
  18842. if ((val)->o[1] & 0x40) {
  18843. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18844. return 0;
  18845. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18846. return 0;
  18847. if (!ASN1Dec_EncryptionSync(dd, &(val)->encryptionSync))
  18848. return 0;
  18849. ASN1_CloseDecoder(dd);
  18850. ASN1Free(db);
  18851. }
  18852. for (i = 0; i < e; i++) {
  18853. if (!ASN1PERDecSkipFragmented(dec, 8))
  18854. return 0;
  18855. }
  18856. }
  18857. return 1;
  18858. }
  18859. static void ASN1CALL ASN1Free_OpenLogicalChannel(OpenLogicalChannel *val)
  18860. {
  18861. if (val) {
  18862. ASN1Free_OpenLogicalChannel_forwardLogicalChannelParameters(&(val)->forwardLogicalChannelParameters);
  18863. if ((val)->o[0] & 0x80) {
  18864. ASN1Free_OpenLogicalChannel_reverseLogicalChannelParameters(&(val)->reverseLogicalChannelParameters);
  18865. }
  18866. if ((val)->o[1] & 0x80) {
  18867. ASN1Free_NetworkAccessParameters(&(val)->separateStack);
  18868. }
  18869. if ((val)->o[1] & 0x40) {
  18870. ASN1Free_EncryptionSync(&(val)->encryptionSync);
  18871. }
  18872. }
  18873. }
  18874. static int ASN1CALL ASN1Enc_OpenLogicalChannelAck(ASN1encoding_t enc, OpenLogicalChannelAck *val)
  18875. {
  18876. ASN1uint32_t y;
  18877. ASN1encoding_t ee;
  18878. y = ASN1PEREncCheckExtensions(3, (val)->o + 1);
  18879. if (!ASN1PEREncBitVal(enc, 1, y))
  18880. return 0;
  18881. if (!ASN1PEREncBits(enc, 1, (val)->o))
  18882. return 0;
  18883. if (!ASN1PEREncUnsignedShort(enc, (val)->forwardLogicalChannelNumber - 1))
  18884. return 0;
  18885. if ((val)->o[0] & 0x80) {
  18886. if (!ASN1Enc_OpenLogicalChannelAck_reverseLogicalChannelParameters(enc, &(val)->reverseLogicalChannelParameters))
  18887. return 0;
  18888. }
  18889. if (y) {
  18890. if (!ASN1PEREncNormallySmallBits(enc, 3, (val)->o + 1))
  18891. return 0;
  18892. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  18893. return 0;
  18894. if ((val)->o[1] & 0x80) {
  18895. if (!ASN1Enc_NetworkAccessParameters(ee, &(val)->separateStack))
  18896. return 0;
  18897. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18898. return 0;
  18899. }
  18900. if ((val)->o[1] & 0x40) {
  18901. if (!ASN1Enc_OpenLogicalChannelAck_forwardMultiplexAckParameters(ee, &(val)->forwardMultiplexAckParameters))
  18902. return 0;
  18903. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18904. return 0;
  18905. }
  18906. if ((val)->o[1] & 0x20) {
  18907. if (!ASN1Enc_EncryptionSync(ee, &(val)->encryptionSync))
  18908. return 0;
  18909. if (!ASN1PEREncFlushFragmentedToParent(ee))
  18910. return 0;
  18911. }
  18912. ASN1_CloseEncoder2(ee);
  18913. }
  18914. return 1;
  18915. }
  18916. static int ASN1CALL ASN1Dec_OpenLogicalChannelAck(ASN1decoding_t dec, OpenLogicalChannelAck *val)
  18917. {
  18918. ASN1uint32_t y;
  18919. ASN1decoding_t dd;
  18920. ASN1octet_t *db;
  18921. ASN1uint32_t ds;
  18922. ASN1uint32_t i;
  18923. ASN1uint32_t e;
  18924. if (!ASN1PERDecExtensionBit(dec, &y))
  18925. return 0;
  18926. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  18927. return 0;
  18928. if (!ASN1PERDecUnsignedShort(dec, &(val)->forwardLogicalChannelNumber))
  18929. return 0;
  18930. (val)->forwardLogicalChannelNumber += 1;
  18931. if ((val)->o[0] & 0x80) {
  18932. if (!ASN1Dec_OpenLogicalChannelAck_reverseLogicalChannelParameters(dec, &(val)->reverseLogicalChannelParameters))
  18933. return 0;
  18934. }
  18935. if (!y) {
  18936. ZeroMemory((val)->o + 1, 1);
  18937. } else {
  18938. if (!ASN1PERDecNormallySmallExtension(dec, &e, 3, (val)->o + 1))
  18939. return 0;
  18940. if ((val)->o[1] & 0x80) {
  18941. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18942. return 0;
  18943. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18944. return 0;
  18945. if (!ASN1Dec_NetworkAccessParameters(dd, &(val)->separateStack))
  18946. return 0;
  18947. ASN1_CloseDecoder(dd);
  18948. ASN1Free(db);
  18949. }
  18950. if ((val)->o[1] & 0x40) {
  18951. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18952. return 0;
  18953. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18954. return 0;
  18955. if (!ASN1Dec_OpenLogicalChannelAck_forwardMultiplexAckParameters(dd, &(val)->forwardMultiplexAckParameters))
  18956. return 0;
  18957. ASN1_CloseDecoder(dd);
  18958. ASN1Free(db);
  18959. }
  18960. if ((val)->o[1] & 0x20) {
  18961. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  18962. return 0;
  18963. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  18964. return 0;
  18965. if (!ASN1Dec_EncryptionSync(dd, &(val)->encryptionSync))
  18966. return 0;
  18967. ASN1_CloseDecoder(dd);
  18968. ASN1Free(db);
  18969. }
  18970. for (i = 0; i < e; i++) {
  18971. if (!ASN1PERDecSkipFragmented(dec, 8))
  18972. return 0;
  18973. }
  18974. }
  18975. return 1;
  18976. }
  18977. static void ASN1CALL ASN1Free_OpenLogicalChannelAck(OpenLogicalChannelAck *val)
  18978. {
  18979. if (val) {
  18980. if ((val)->o[0] & 0x80) {
  18981. ASN1Free_OpenLogicalChannelAck_reverseLogicalChannelParameters(&(val)->reverseLogicalChannelParameters);
  18982. }
  18983. if ((val)->o[1] & 0x80) {
  18984. ASN1Free_NetworkAccessParameters(&(val)->separateStack);
  18985. }
  18986. if ((val)->o[1] & 0x40) {
  18987. ASN1Free_OpenLogicalChannelAck_forwardMultiplexAckParameters(&(val)->forwardMultiplexAckParameters);
  18988. }
  18989. if ((val)->o[1] & 0x20) {
  18990. ASN1Free_EncryptionSync(&(val)->encryptionSync);
  18991. }
  18992. }
  18993. }
  18994. static int ASN1CALL ASN1Enc_RequestMessage(ASN1encoding_t enc, RequestMessage *val)
  18995. {
  18996. ASN1encoding_t ee;
  18997. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 11))
  18998. return 0;
  18999. switch ((val)->choice) {
  19000. case 1:
  19001. if (!ASN1Enc_NonStandardMessage(enc, &(val)->u.nonStandard))
  19002. return 0;
  19003. break;
  19004. case 2:
  19005. if (!ASN1Enc_MasterSlaveDetermination(enc, &(val)->u.masterSlaveDetermination))
  19006. return 0;
  19007. break;
  19008. case 3:
  19009. if (!ASN1Enc_TerminalCapabilitySet(enc, &(val)->u.terminalCapabilitySet))
  19010. return 0;
  19011. break;
  19012. case 4:
  19013. if (!ASN1Enc_OpenLogicalChannel(enc, &(val)->u.openLogicalChannel))
  19014. return 0;
  19015. break;
  19016. case 5:
  19017. if (!ASN1Enc_CloseLogicalChannel(enc, &(val)->u.closeLogicalChannel))
  19018. return 0;
  19019. break;
  19020. case 6:
  19021. if (!ASN1Enc_RequestChannelClose(enc, &(val)->u.requestChannelClose))
  19022. return 0;
  19023. break;
  19024. case 7:
  19025. if (!ASN1Enc_MultiplexEntrySend(enc, &(val)->u.multiplexEntrySend))
  19026. return 0;
  19027. break;
  19028. case 8:
  19029. if (!ASN1Enc_RequestMultiplexEntry(enc, &(val)->u.requestMultiplexEntry))
  19030. return 0;
  19031. break;
  19032. case 9:
  19033. if (!ASN1Enc_RequestMode(enc, &(val)->u.requestMode))
  19034. return 0;
  19035. break;
  19036. case 10:
  19037. if (!ASN1Enc_RoundTripDelayRequest(enc, &(val)->u.roundTripDelayRequest))
  19038. return 0;
  19039. break;
  19040. case 11:
  19041. if (!ASN1Enc_MaintenanceLoopRequest(enc, &(val)->u.maintenanceLoopRequest))
  19042. return 0;
  19043. break;
  19044. case 12:
  19045. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  19046. return 0;
  19047. if (!ASN1Enc_CommunicationModeRequest(ee, &(val)->u.communicationModeRequest))
  19048. return 0;
  19049. if (!ASN1PEREncFlushFragmentedToParent(ee))
  19050. return 0;
  19051. ASN1_CloseEncoder2(ee);
  19052. break;
  19053. case 13:
  19054. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  19055. return 0;
  19056. if (!ASN1Enc_ConferenceRequest(ee, &(val)->u.conferenceRequest))
  19057. return 0;
  19058. if (!ASN1PEREncFlushFragmentedToParent(ee))
  19059. return 0;
  19060. ASN1_CloseEncoder2(ee);
  19061. break;
  19062. default:
  19063. /* impossible */
  19064. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  19065. return 0;
  19066. }
  19067. return 1;
  19068. }
  19069. static int ASN1CALL ASN1Dec_RequestMessage(ASN1decoding_t dec, RequestMessage *val)
  19070. {
  19071. ASN1decoding_t dd;
  19072. ASN1octet_t *db;
  19073. ASN1uint32_t ds;
  19074. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 11))
  19075. return 0;
  19076. switch ((val)->choice) {
  19077. case 1:
  19078. if (!ASN1Dec_NonStandardMessage(dec, &(val)->u.nonStandard))
  19079. return 0;
  19080. break;
  19081. case 2:
  19082. if (!ASN1Dec_MasterSlaveDetermination(dec, &(val)->u.masterSlaveDetermination))
  19083. return 0;
  19084. break;
  19085. case 3:
  19086. if (!ASN1Dec_TerminalCapabilitySet(dec, &(val)->u.terminalCapabilitySet))
  19087. return 0;
  19088. break;
  19089. case 4:
  19090. if (!ASN1Dec_OpenLogicalChannel(dec, &(val)->u.openLogicalChannel))
  19091. return 0;
  19092. break;
  19093. case 5:
  19094. if (!ASN1Dec_CloseLogicalChannel(dec, &(val)->u.closeLogicalChannel))
  19095. return 0;
  19096. break;
  19097. case 6:
  19098. if (!ASN1Dec_RequestChannelClose(dec, &(val)->u.requestChannelClose))
  19099. return 0;
  19100. break;
  19101. case 7:
  19102. if (!ASN1Dec_MultiplexEntrySend(dec, &(val)->u.multiplexEntrySend))
  19103. return 0;
  19104. break;
  19105. case 8:
  19106. if (!ASN1Dec_RequestMultiplexEntry(dec, &(val)->u.requestMultiplexEntry))
  19107. return 0;
  19108. break;
  19109. case 9:
  19110. if (!ASN1Dec_RequestMode(dec, &(val)->u.requestMode))
  19111. return 0;
  19112. break;
  19113. case 10:
  19114. if (!ASN1Dec_RoundTripDelayRequest(dec, &(val)->u.roundTripDelayRequest))
  19115. return 0;
  19116. break;
  19117. case 11:
  19118. if (!ASN1Dec_MaintenanceLoopRequest(dec, &(val)->u.maintenanceLoopRequest))
  19119. return 0;
  19120. break;
  19121. case 12:
  19122. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  19123. return 0;
  19124. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  19125. return 0;
  19126. if (!ASN1Dec_CommunicationModeRequest(dd, &(val)->u.communicationModeRequest))
  19127. return 0;
  19128. ASN1_CloseDecoder(dd);
  19129. ASN1Free(db);
  19130. break;
  19131. case 13:
  19132. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  19133. return 0;
  19134. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  19135. return 0;
  19136. if (!ASN1Dec_ConferenceRequest(dd, &(val)->u.conferenceRequest))
  19137. return 0;
  19138. ASN1_CloseDecoder(dd);
  19139. ASN1Free(db);
  19140. break;
  19141. case 0:
  19142. /* extension case */
  19143. if (!ASN1PERDecSkipFragmented(dec, 8))
  19144. return 0;
  19145. break;
  19146. default:
  19147. /* impossible */
  19148. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  19149. return 0;
  19150. }
  19151. return 1;
  19152. }
  19153. static void ASN1CALL ASN1Free_RequestMessage(RequestMessage *val)
  19154. {
  19155. if (val) {
  19156. switch ((val)->choice) {
  19157. case 1:
  19158. ASN1Free_NonStandardMessage(&(val)->u.nonStandard);
  19159. break;
  19160. case 3:
  19161. ASN1Free_TerminalCapabilitySet(&(val)->u.terminalCapabilitySet);
  19162. break;
  19163. case 4:
  19164. ASN1Free_OpenLogicalChannel(&(val)->u.openLogicalChannel);
  19165. break;
  19166. case 6:
  19167. ASN1Free_RequestChannelClose(&(val)->u.requestChannelClose);
  19168. break;
  19169. case 7:
  19170. ASN1Free_MultiplexEntrySend(&(val)->u.multiplexEntrySend);
  19171. break;
  19172. case 8:
  19173. ASN1Free_RequestMultiplexEntry(&(val)->u.requestMultiplexEntry);
  19174. break;
  19175. case 9:
  19176. ASN1Free_RequestMode(&(val)->u.requestMode);
  19177. break;
  19178. case 13:
  19179. ASN1Free_ConferenceRequest(&(val)->u.conferenceRequest);
  19180. break;
  19181. }
  19182. }
  19183. }
  19184. static int ASN1CALL ASN1Enc_ResponseMessage(ASN1encoding_t enc, ResponseMessage *val)
  19185. {
  19186. ASN1encoding_t ee;
  19187. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 5, 19))
  19188. return 0;
  19189. switch ((val)->choice) {
  19190. case 1:
  19191. if (!ASN1Enc_NonStandardMessage(enc, &(val)->u.nonStandard))
  19192. return 0;
  19193. break;
  19194. case 2:
  19195. if (!ASN1Enc_MasterSlaveDeterminationAck(enc, &(val)->u.masterSlaveDeterminationAck))
  19196. return 0;
  19197. break;
  19198. case 3:
  19199. if (!ASN1Enc_MasterSlaveDeterminationReject(enc, &(val)->u.masterSlaveDeterminationReject))
  19200. return 0;
  19201. break;
  19202. case 4:
  19203. if (!ASN1Enc_TerminalCapabilitySetAck(enc, &(val)->u.terminalCapabilitySetAck))
  19204. return 0;
  19205. break;
  19206. case 5:
  19207. if (!ASN1Enc_TerminalCapabilitySetReject(enc, &(val)->u.terminalCapabilitySetReject))
  19208. return 0;
  19209. break;
  19210. case 6:
  19211. if (!ASN1Enc_OpenLogicalChannelAck(enc, &(val)->u.openLogicalChannelAck))
  19212. return 0;
  19213. break;
  19214. case 7:
  19215. if (!ASN1Enc_OpenLogicalChannelReject(enc, &(val)->u.openLogicalChannelReject))
  19216. return 0;
  19217. break;
  19218. case 8:
  19219. if (!ASN1Enc_CloseLogicalChannelAck(enc, &(val)->u.closeLogicalChannelAck))
  19220. return 0;
  19221. break;
  19222. case 9:
  19223. if (!ASN1Enc_RequestChannelCloseAck(enc, &(val)->u.requestChannelCloseAck))
  19224. return 0;
  19225. break;
  19226. case 10:
  19227. if (!ASN1Enc_RequestChannelCloseReject(enc, &(val)->u.requestChannelCloseReject))
  19228. return 0;
  19229. break;
  19230. case 11:
  19231. if (!ASN1Enc_MultiplexEntrySendAck(enc, &(val)->u.multiplexEntrySendAck))
  19232. return 0;
  19233. break;
  19234. case 12:
  19235. if (!ASN1Enc_MultiplexEntrySendReject(enc, &(val)->u.multiplexEntrySendReject))
  19236. return 0;
  19237. break;
  19238. case 13:
  19239. if (!ASN1Enc_RequestMultiplexEntryAck(enc, &(val)->u.requestMultiplexEntryAck))
  19240. return 0;
  19241. break;
  19242. case 14:
  19243. if (!ASN1Enc_RequestMultiplexEntryReject(enc, &(val)->u.requestMultiplexEntryReject))
  19244. return 0;
  19245. break;
  19246. case 15:
  19247. if (!ASN1Enc_RequestModeAck(enc, &(val)->u.requestModeAck))
  19248. return 0;
  19249. break;
  19250. case 16:
  19251. if (!ASN1Enc_RequestModeReject(enc, &(val)->u.requestModeReject))
  19252. return 0;
  19253. break;
  19254. case 17:
  19255. if (!ASN1Enc_RoundTripDelayResponse(enc, &(val)->u.roundTripDelayResponse))
  19256. return 0;
  19257. break;
  19258. case 18:
  19259. if (!ASN1Enc_MaintenanceLoopAck(enc, &(val)->u.maintenanceLoopAck))
  19260. return 0;
  19261. break;
  19262. case 19:
  19263. if (!ASN1Enc_MaintenanceLoopReject(enc, &(val)->u.maintenanceLoopReject))
  19264. return 0;
  19265. break;
  19266. case 20:
  19267. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  19268. return 0;
  19269. if (!ASN1Enc_CommunicationModeResponse(ee, &(val)->u.communicationModeResponse))
  19270. return 0;
  19271. if (!ASN1PEREncFlushFragmentedToParent(ee))
  19272. return 0;
  19273. ASN1_CloseEncoder2(ee);
  19274. break;
  19275. case 21:
  19276. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  19277. return 0;
  19278. if (!ASN1Enc_ConferenceResponse(ee, &(val)->u.conferenceResponse))
  19279. return 0;
  19280. if (!ASN1PEREncFlushFragmentedToParent(ee))
  19281. return 0;
  19282. ASN1_CloseEncoder2(ee);
  19283. break;
  19284. default:
  19285. /* impossible */
  19286. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  19287. return 0;
  19288. }
  19289. return 1;
  19290. }
  19291. static int ASN1CALL ASN1Dec_ResponseMessage(ASN1decoding_t dec, ResponseMessage *val)
  19292. {
  19293. ASN1decoding_t dd;
  19294. ASN1octet_t *db;
  19295. ASN1uint32_t ds;
  19296. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 5, 19))
  19297. return 0;
  19298. switch ((val)->choice) {
  19299. case 1:
  19300. if (!ASN1Dec_NonStandardMessage(dec, &(val)->u.nonStandard))
  19301. return 0;
  19302. break;
  19303. case 2:
  19304. if (!ASN1Dec_MasterSlaveDeterminationAck(dec, &(val)->u.masterSlaveDeterminationAck))
  19305. return 0;
  19306. break;
  19307. case 3:
  19308. if (!ASN1Dec_MasterSlaveDeterminationReject(dec, &(val)->u.masterSlaveDeterminationReject))
  19309. return 0;
  19310. break;
  19311. case 4:
  19312. if (!ASN1Dec_TerminalCapabilitySetAck(dec, &(val)->u.terminalCapabilitySetAck))
  19313. return 0;
  19314. break;
  19315. case 5:
  19316. if (!ASN1Dec_TerminalCapabilitySetReject(dec, &(val)->u.terminalCapabilitySetReject))
  19317. return 0;
  19318. break;
  19319. case 6:
  19320. if (!ASN1Dec_OpenLogicalChannelAck(dec, &(val)->u.openLogicalChannelAck))
  19321. return 0;
  19322. break;
  19323. case 7:
  19324. if (!ASN1Dec_OpenLogicalChannelReject(dec, &(val)->u.openLogicalChannelReject))
  19325. return 0;
  19326. break;
  19327. case 8:
  19328. if (!ASN1Dec_CloseLogicalChannelAck(dec, &(val)->u.closeLogicalChannelAck))
  19329. return 0;
  19330. break;
  19331. case 9:
  19332. if (!ASN1Dec_RequestChannelCloseAck(dec, &(val)->u.requestChannelCloseAck))
  19333. return 0;
  19334. break;
  19335. case 10:
  19336. if (!ASN1Dec_RequestChannelCloseReject(dec, &(val)->u.requestChannelCloseReject))
  19337. return 0;
  19338. break;
  19339. case 11:
  19340. if (!ASN1Dec_MultiplexEntrySendAck(dec, &(val)->u.multiplexEntrySendAck))
  19341. return 0;
  19342. break;
  19343. case 12:
  19344. if (!ASN1Dec_MultiplexEntrySendReject(dec, &(val)->u.multiplexEntrySendReject))
  19345. return 0;
  19346. break;
  19347. case 13:
  19348. if (!ASN1Dec_RequestMultiplexEntryAck(dec, &(val)->u.requestMultiplexEntryAck))
  19349. return 0;
  19350. break;
  19351. case 14:
  19352. if (!ASN1Dec_RequestMultiplexEntryReject(dec, &(val)->u.requestMultiplexEntryReject))
  19353. return 0;
  19354. break;
  19355. case 15:
  19356. if (!ASN1Dec_RequestModeAck(dec, &(val)->u.requestModeAck))
  19357. return 0;
  19358. break;
  19359. case 16:
  19360. if (!ASN1Dec_RequestModeReject(dec, &(val)->u.requestModeReject))
  19361. return 0;
  19362. break;
  19363. case 17:
  19364. if (!ASN1Dec_RoundTripDelayResponse(dec, &(val)->u.roundTripDelayResponse))
  19365. return 0;
  19366. break;
  19367. case 18:
  19368. if (!ASN1Dec_MaintenanceLoopAck(dec, &(val)->u.maintenanceLoopAck))
  19369. return 0;
  19370. break;
  19371. case 19:
  19372. if (!ASN1Dec_MaintenanceLoopReject(dec, &(val)->u.maintenanceLoopReject))
  19373. return 0;
  19374. break;
  19375. case 20:
  19376. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  19377. return 0;
  19378. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  19379. return 0;
  19380. if (!ASN1Dec_CommunicationModeResponse(dd, &(val)->u.communicationModeResponse))
  19381. return 0;
  19382. ASN1_CloseDecoder(dd);
  19383. ASN1Free(db);
  19384. break;
  19385. case 21:
  19386. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  19387. return 0;
  19388. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  19389. return 0;
  19390. if (!ASN1Dec_ConferenceResponse(dd, &(val)->u.conferenceResponse))
  19391. return 0;
  19392. ASN1_CloseDecoder(dd);
  19393. ASN1Free(db);
  19394. break;
  19395. case 0:
  19396. /* extension case */
  19397. if (!ASN1PERDecSkipFragmented(dec, 8))
  19398. return 0;
  19399. break;
  19400. default:
  19401. /* impossible */
  19402. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  19403. return 0;
  19404. }
  19405. return 1;
  19406. }
  19407. static void ASN1CALL ASN1Free_ResponseMessage(ResponseMessage *val)
  19408. {
  19409. if (val) {
  19410. switch ((val)->choice) {
  19411. case 1:
  19412. ASN1Free_NonStandardMessage(&(val)->u.nonStandard);
  19413. break;
  19414. case 6:
  19415. ASN1Free_OpenLogicalChannelAck(&(val)->u.openLogicalChannelAck);
  19416. break;
  19417. case 11:
  19418. ASN1Free_MultiplexEntrySendAck(&(val)->u.multiplexEntrySendAck);
  19419. break;
  19420. case 12:
  19421. ASN1Free_MultiplexEntrySendReject(&(val)->u.multiplexEntrySendReject);
  19422. break;
  19423. case 13:
  19424. ASN1Free_RequestMultiplexEntryAck(&(val)->u.requestMultiplexEntryAck);
  19425. break;
  19426. case 14:
  19427. ASN1Free_RequestMultiplexEntryReject(&(val)->u.requestMultiplexEntryReject);
  19428. break;
  19429. case 20:
  19430. ASN1Free_CommunicationModeResponse(&(val)->u.communicationModeResponse);
  19431. break;
  19432. case 21:
  19433. ASN1Free_ConferenceResponse(&(val)->u.conferenceResponse);
  19434. break;
  19435. }
  19436. }
  19437. }
  19438. static int ASN1CALL ASN1Enc_FastConnectOLC(ASN1encoding_t enc, FastConnectOLC *val)
  19439. {
  19440. if (!ASN1Enc_OpenLogicalChannel(enc, val))
  19441. return 0;
  19442. return 1;
  19443. }
  19444. static int ASN1CALL ASN1Dec_FastConnectOLC(ASN1decoding_t dec, FastConnectOLC *val)
  19445. {
  19446. if (!ASN1Dec_OpenLogicalChannel(dec, val))
  19447. return 0;
  19448. return 1;
  19449. }
  19450. static void ASN1CALL ASN1Free_FastConnectOLC(FastConnectOLC *val)
  19451. {
  19452. if (val) {
  19453. ASN1Free_OpenLogicalChannel(val);
  19454. }
  19455. }
  19456. static int ASN1CALL ASN1Enc_FunctionNotUnderstood(ASN1encoding_t enc, FunctionNotUnderstood *val)
  19457. {
  19458. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  19459. return 0;
  19460. switch ((val)->choice) {
  19461. case 1:
  19462. if (!ASN1Enc_RequestMessage(enc, &(val)->u.request))
  19463. return 0;
  19464. break;
  19465. case 2:
  19466. if (!ASN1Enc_ResponseMessage(enc, &(val)->u.response))
  19467. return 0;
  19468. break;
  19469. case 3:
  19470. if (!ASN1Enc_CommandMessage(enc, &(val)->u.command))
  19471. return 0;
  19472. break;
  19473. default:
  19474. /* impossible */
  19475. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  19476. return 0;
  19477. }
  19478. return 1;
  19479. }
  19480. static int ASN1CALL ASN1Dec_FunctionNotUnderstood(ASN1decoding_t dec, FunctionNotUnderstood *val)
  19481. {
  19482. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  19483. return 0;
  19484. switch ((val)->choice) {
  19485. case 1:
  19486. if (!ASN1Dec_RequestMessage(dec, &(val)->u.request))
  19487. return 0;
  19488. break;
  19489. case 2:
  19490. if (!ASN1Dec_ResponseMessage(dec, &(val)->u.response))
  19491. return 0;
  19492. break;
  19493. case 3:
  19494. if (!ASN1Dec_CommandMessage(dec, &(val)->u.command))
  19495. return 0;
  19496. break;
  19497. default:
  19498. /* impossible */
  19499. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  19500. return 0;
  19501. }
  19502. return 1;
  19503. }
  19504. static void ASN1CALL ASN1Free_FunctionNotUnderstood(FunctionNotUnderstood *val)
  19505. {
  19506. if (val) {
  19507. switch ((val)->choice) {
  19508. case 1:
  19509. ASN1Free_RequestMessage(&(val)->u.request);
  19510. break;
  19511. case 2:
  19512. ASN1Free_ResponseMessage(&(val)->u.response);
  19513. break;
  19514. case 3:
  19515. ASN1Free_CommandMessage(&(val)->u.command);
  19516. break;
  19517. }
  19518. }
  19519. }
  19520. static int ASN1CALL ASN1Enc_IndicationMessage(ASN1encoding_t enc, IndicationMessage *val)
  19521. {
  19522. ASN1encoding_t ee;
  19523. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 4, 14))
  19524. return 0;
  19525. switch ((val)->choice) {
  19526. case 1:
  19527. if (!ASN1Enc_NonStandardMessage(enc, &(val)->u.nonStandard))
  19528. return 0;
  19529. break;
  19530. case 2:
  19531. if (!ASN1Enc_FunctionNotUnderstood(enc, &(val)->u.functionNotUnderstood))
  19532. return 0;
  19533. break;
  19534. case 3:
  19535. if (!ASN1Enc_MasterSlaveDeterminationRelease(enc, &(val)->u.masterSlaveDeterminationRelease))
  19536. return 0;
  19537. break;
  19538. case 4:
  19539. if (!ASN1Enc_TerminalCapabilitySetRelease(enc, &(val)->u.terminalCapabilitySetRelease))
  19540. return 0;
  19541. break;
  19542. case 5:
  19543. if (!ASN1Enc_OpenLogicalChannelConfirm(enc, &(val)->u.openLogicalChannelConfirm))
  19544. return 0;
  19545. break;
  19546. case 6:
  19547. if (!ASN1Enc_RequestChannelCloseRelease(enc, &(val)->u.requestChannelCloseRelease))
  19548. return 0;
  19549. break;
  19550. case 7:
  19551. if (!ASN1Enc_MultiplexEntrySendRelease(enc, &(val)->u.multiplexEntrySendRelease))
  19552. return 0;
  19553. break;
  19554. case 8:
  19555. if (!ASN1Enc_RequestMultiplexEntryRelease(enc, &(val)->u.requestMultiplexEntryRelease))
  19556. return 0;
  19557. break;
  19558. case 9:
  19559. if (!ASN1Enc_RequestModeRelease(enc, &(val)->u.requestModeRelease))
  19560. return 0;
  19561. break;
  19562. case 10:
  19563. if (!ASN1Enc_MiscellaneousIndication(enc, &(val)->u.miscellaneousIndication))
  19564. return 0;
  19565. break;
  19566. case 11:
  19567. if (!ASN1Enc_JitterIndication(enc, &(val)->u.jitterIndication))
  19568. return 0;
  19569. break;
  19570. case 12:
  19571. if (!ASN1Enc_H223SkewIndication(enc, &(val)->u.h223SkewIndication))
  19572. return 0;
  19573. break;
  19574. case 13:
  19575. if (!ASN1Enc_NewATMVCIndication(enc, &(val)->u.newATMVCIndication))
  19576. return 0;
  19577. break;
  19578. case 14:
  19579. if (!ASN1Enc_UserInputIndication(enc, &(val)->u.userInput))
  19580. return 0;
  19581. break;
  19582. case 15:
  19583. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  19584. return 0;
  19585. if (!ASN1Enc_H2250MaximumSkewIndication(ee, &(val)->u.h2250MaximumSkewIndication))
  19586. return 0;
  19587. if (!ASN1PEREncFlushFragmentedToParent(ee))
  19588. return 0;
  19589. ASN1_CloseEncoder2(ee);
  19590. break;
  19591. case 16:
  19592. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  19593. return 0;
  19594. if (!ASN1Enc_MCLocationIndication(ee, &(val)->u.mcLocationIndication))
  19595. return 0;
  19596. if (!ASN1PEREncFlushFragmentedToParent(ee))
  19597. return 0;
  19598. ASN1_CloseEncoder2(ee);
  19599. break;
  19600. case 17:
  19601. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  19602. return 0;
  19603. if (!ASN1Enc_ConferenceIndication(ee, &(val)->u.conferenceIndication))
  19604. return 0;
  19605. if (!ASN1PEREncFlushFragmentedToParent(ee))
  19606. return 0;
  19607. ASN1_CloseEncoder2(ee);
  19608. break;
  19609. case 18:
  19610. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  19611. return 0;
  19612. if (!ASN1Enc_VendorIdentification(ee, &(val)->u.vendorIdentification))
  19613. return 0;
  19614. if (!ASN1PEREncFlushFragmentedToParent(ee))
  19615. return 0;
  19616. ASN1_CloseEncoder2(ee);
  19617. break;
  19618. case 19:
  19619. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  19620. return 0;
  19621. if (!ASN1Enc_FunctionNotSupported(ee, &(val)->u.functionNotSupported))
  19622. return 0;
  19623. if (!ASN1PEREncFlushFragmentedToParent(ee))
  19624. return 0;
  19625. ASN1_CloseEncoder2(ee);
  19626. break;
  19627. default:
  19628. /* impossible */
  19629. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  19630. return 0;
  19631. }
  19632. return 1;
  19633. }
  19634. static int ASN1CALL ASN1Dec_IndicationMessage(ASN1decoding_t dec, IndicationMessage *val)
  19635. {
  19636. ASN1decoding_t dd;
  19637. ASN1octet_t *db;
  19638. ASN1uint32_t ds;
  19639. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 4, 14))
  19640. return 0;
  19641. switch ((val)->choice) {
  19642. case 1:
  19643. if (!ASN1Dec_NonStandardMessage(dec, &(val)->u.nonStandard))
  19644. return 0;
  19645. break;
  19646. case 2:
  19647. if (!ASN1Dec_FunctionNotUnderstood(dec, &(val)->u.functionNotUnderstood))
  19648. return 0;
  19649. break;
  19650. case 3:
  19651. if (!ASN1Dec_MasterSlaveDeterminationRelease(dec, &(val)->u.masterSlaveDeterminationRelease))
  19652. return 0;
  19653. break;
  19654. case 4:
  19655. if (!ASN1Dec_TerminalCapabilitySetRelease(dec, &(val)->u.terminalCapabilitySetRelease))
  19656. return 0;
  19657. break;
  19658. case 5:
  19659. if (!ASN1Dec_OpenLogicalChannelConfirm(dec, &(val)->u.openLogicalChannelConfirm))
  19660. return 0;
  19661. break;
  19662. case 6:
  19663. if (!ASN1Dec_RequestChannelCloseRelease(dec, &(val)->u.requestChannelCloseRelease))
  19664. return 0;
  19665. break;
  19666. case 7:
  19667. if (!ASN1Dec_MultiplexEntrySendRelease(dec, &(val)->u.multiplexEntrySendRelease))
  19668. return 0;
  19669. break;
  19670. case 8:
  19671. if (!ASN1Dec_RequestMultiplexEntryRelease(dec, &(val)->u.requestMultiplexEntryRelease))
  19672. return 0;
  19673. break;
  19674. case 9:
  19675. if (!ASN1Dec_RequestModeRelease(dec, &(val)->u.requestModeRelease))
  19676. return 0;
  19677. break;
  19678. case 10:
  19679. if (!ASN1Dec_MiscellaneousIndication(dec, &(val)->u.miscellaneousIndication))
  19680. return 0;
  19681. break;
  19682. case 11:
  19683. if (!ASN1Dec_JitterIndication(dec, &(val)->u.jitterIndication))
  19684. return 0;
  19685. break;
  19686. case 12:
  19687. if (!ASN1Dec_H223SkewIndication(dec, &(val)->u.h223SkewIndication))
  19688. return 0;
  19689. break;
  19690. case 13:
  19691. if (!ASN1Dec_NewATMVCIndication(dec, &(val)->u.newATMVCIndication))
  19692. return 0;
  19693. break;
  19694. case 14:
  19695. if (!ASN1Dec_UserInputIndication(dec, &(val)->u.userInput))
  19696. return 0;
  19697. break;
  19698. case 15:
  19699. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  19700. return 0;
  19701. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  19702. return 0;
  19703. if (!ASN1Dec_H2250MaximumSkewIndication(dd, &(val)->u.h2250MaximumSkewIndication))
  19704. return 0;
  19705. ASN1_CloseDecoder(dd);
  19706. ASN1Free(db);
  19707. break;
  19708. case 16:
  19709. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  19710. return 0;
  19711. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  19712. return 0;
  19713. if (!ASN1Dec_MCLocationIndication(dd, &(val)->u.mcLocationIndication))
  19714. return 0;
  19715. ASN1_CloseDecoder(dd);
  19716. ASN1Free(db);
  19717. break;
  19718. case 17:
  19719. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  19720. return 0;
  19721. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  19722. return 0;
  19723. if (!ASN1Dec_ConferenceIndication(dd, &(val)->u.conferenceIndication))
  19724. return 0;
  19725. ASN1_CloseDecoder(dd);
  19726. ASN1Free(db);
  19727. break;
  19728. case 18:
  19729. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  19730. return 0;
  19731. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  19732. return 0;
  19733. if (!ASN1Dec_VendorIdentification(dd, &(val)->u.vendorIdentification))
  19734. return 0;
  19735. ASN1_CloseDecoder(dd);
  19736. ASN1Free(db);
  19737. break;
  19738. case 19:
  19739. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  19740. return 0;
  19741. if (ASN1_CreateDecoder(dec->module, &dd, db, ds, dec) < 0)
  19742. return 0;
  19743. if (!ASN1Dec_FunctionNotSupported(dd, &(val)->u.functionNotSupported))
  19744. return 0;
  19745. ASN1_CloseDecoder(dd);
  19746. ASN1Free(db);
  19747. break;
  19748. case 0:
  19749. /* extension case */
  19750. if (!ASN1PERDecSkipFragmented(dec, 8))
  19751. return 0;
  19752. break;
  19753. default:
  19754. /* impossible */
  19755. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  19756. return 0;
  19757. }
  19758. return 1;
  19759. }
  19760. static void ASN1CALL ASN1Free_IndicationMessage(IndicationMessage *val)
  19761. {
  19762. if (val) {
  19763. switch ((val)->choice) {
  19764. case 1:
  19765. ASN1Free_NonStandardMessage(&(val)->u.nonStandard);
  19766. break;
  19767. case 2:
  19768. ASN1Free_FunctionNotUnderstood(&(val)->u.functionNotUnderstood);
  19769. break;
  19770. case 7:
  19771. ASN1Free_MultiplexEntrySendRelease(&(val)->u.multiplexEntrySendRelease);
  19772. break;
  19773. case 8:
  19774. ASN1Free_RequestMultiplexEntryRelease(&(val)->u.requestMultiplexEntryRelease);
  19775. break;
  19776. case 10:
  19777. ASN1Free_MiscellaneousIndication(&(val)->u.miscellaneousIndication);
  19778. break;
  19779. case 14:
  19780. ASN1Free_UserInputIndication(&(val)->u.userInput);
  19781. break;
  19782. case 16:
  19783. ASN1Free_MCLocationIndication(&(val)->u.mcLocationIndication);
  19784. break;
  19785. case 18:
  19786. ASN1Free_VendorIdentification(&(val)->u.vendorIdentification);
  19787. break;
  19788. case 19:
  19789. ASN1Free_FunctionNotSupported(&(val)->u.functionNotSupported);
  19790. break;
  19791. }
  19792. }
  19793. }
  19794. static int ASN1CALL ASN1Enc_MultimediaSystemControlMessage(ASN1encoding_t enc, MultimediaSystemControlMessage *val)
  19795. {
  19796. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  19797. return 0;
  19798. switch ((val)->choice) {
  19799. case 1:
  19800. if (!ASN1Enc_RequestMessage(enc, &(val)->u.request))
  19801. return 0;
  19802. break;
  19803. case 2:
  19804. if (!ASN1Enc_ResponseMessage(enc, &(val)->u.response))
  19805. return 0;
  19806. break;
  19807. case 3:
  19808. if (!ASN1Enc_CommandMessage(enc, &(val)->u.command))
  19809. return 0;
  19810. break;
  19811. case 4:
  19812. if (!ASN1Enc_IndicationMessage(enc, &(val)->u.indication))
  19813. return 0;
  19814. break;
  19815. default:
  19816. /* impossible */
  19817. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  19818. return 0;
  19819. }
  19820. return 1;
  19821. }
  19822. static int ASN1CALL ASN1Dec_MultimediaSystemControlMessage(ASN1decoding_t dec, MultimediaSystemControlMessage *val)
  19823. {
  19824. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  19825. return 0;
  19826. switch ((val)->choice) {
  19827. case 1:
  19828. if (!ASN1Dec_RequestMessage(dec, &(val)->u.request))
  19829. return 0;
  19830. break;
  19831. case 2:
  19832. if (!ASN1Dec_ResponseMessage(dec, &(val)->u.response))
  19833. return 0;
  19834. break;
  19835. case 3:
  19836. if (!ASN1Dec_CommandMessage(dec, &(val)->u.command))
  19837. return 0;
  19838. break;
  19839. case 4:
  19840. if (!ASN1Dec_IndicationMessage(dec, &(val)->u.indication))
  19841. return 0;
  19842. break;
  19843. case 0:
  19844. /* extension case */
  19845. if (!ASN1PERDecSkipFragmented(dec, 8))
  19846. return 0;
  19847. break;
  19848. default:
  19849. /* impossible */
  19850. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  19851. return 0;
  19852. }
  19853. return 1;
  19854. }
  19855. static void ASN1CALL ASN1Free_MultimediaSystemControlMessage(MultimediaSystemControlMessage *val)
  19856. {
  19857. if (val) {
  19858. switch ((val)->choice) {
  19859. case 1:
  19860. ASN1Free_RequestMessage(&(val)->u.request);
  19861. break;
  19862. case 2:
  19863. ASN1Free_ResponseMessage(&(val)->u.response);
  19864. break;
  19865. case 3:
  19866. ASN1Free_CommandMessage(&(val)->u.command);
  19867. break;
  19868. case 4:
  19869. ASN1Free_IndicationMessage(&(val)->u.indication);
  19870. break;
  19871. }
  19872. }
  19873. }