Leaked source code of windows server 2003
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.

6803 lines
215 KiB

  1. #include <windows.h>
  2. #include "h4503pp.h"
  3. #pragma warning ( disable: 4133 )
  4. ASN1module_t H4503PP_Module = NULL;
  5. static int ASN1CALL ASN1Enc_TransportAddress_ipSourceRoute_routing(ASN1encoding_t enc, TransportAddress_ipSourceRoute_routing *val);
  6. static int ASN1CALL ASN1Enc_TransportAddress_ipSourceRoute_route(ASN1encoding_t enc, PTransportAddress_ipSourceRoute_route *val);
  7. static int ASN1CALL ASN1Enc_TransportAddress_ip6Address(ASN1encoding_t enc, TransportAddress_ip6Address *val);
  8. static int ASN1CALL ASN1Enc_TransportAddress_ipxAddress(ASN1encoding_t enc, TransportAddress_ipxAddress *val);
  9. static int ASN1CALL ASN1Enc_TransportAddress_ipSourceRoute(ASN1encoding_t enc, TransportAddress_ipSourceRoute *val);
  10. static int ASN1CALL ASN1Enc_TransportAddress_ipAddress(ASN1encoding_t enc, TransportAddress_ipAddress *val);
  11. static int ASN1CALL ASN1Enc_Reject_problem(ASN1encoding_t enc, Reject_problem *val);
  12. static int ASN1CALL ASN1Enc_EntityType(ASN1encoding_t enc, EntityType *val);
  13. static int ASN1CALL ASN1Enc_InterpretationApdu(ASN1encoding_t enc, InterpretationApdu *val);
  14. static int ASN1CALL ASN1Enc_ServiceApdus(ASN1encoding_t enc, ServiceApdus *val);
  15. static int ASN1CALL ASN1Enc_Reject(ASN1encoding_t enc, Reject *val);
  16. static int ASN1CALL ASN1Enc_EXTENSION(ASN1encoding_t enc, EXTENSION *val);
  17. static int ASN1CALL ASN1Enc_GroupIndicationOnRes(ASN1encoding_t enc, GroupIndicationOnRes *val);
  18. static int ASN1CALL ASN1Enc_GroupIndicationOffRes(ASN1encoding_t enc, GroupIndicationOffRes *val);
  19. static int ASN1CALL ASN1Enc_PickupRes(ASN1encoding_t enc, PickupRes *val);
  20. static int ASN1CALL ASN1Enc_PickExeRes(ASN1encoding_t enc, PickExeRes *val);
  21. static int ASN1CALL ASN1Enc_UserSpecifiedSubaddress(ASN1encoding_t enc, UserSpecifiedSubaddress *val);
  22. static int ASN1CALL ASN1Enc_CODE(ASN1encoding_t enc, CODE *val);
  23. static int ASN1CALL ASN1Enc_H221NonStandard(ASN1encoding_t enc, H221NonStandard *val);
  24. static int ASN1CALL ASN1Enc_H225NonStandardIdentifier(ASN1encoding_t enc, H225NonStandardIdentifier *val);
  25. static int ASN1CALL ASN1Enc_PublicTypeOfNumber(ASN1encoding_t enc, PublicTypeOfNumber *val);
  26. static int ASN1CALL ASN1Enc_PrivateTypeOfNumber(ASN1encoding_t enc, PrivateTypeOfNumber *val);
  27. static int ASN1CALL ASN1Enc_CallIdentifier(ASN1encoding_t enc, CallIdentifier *val);
  28. static int ASN1CALL ASN1Enc_ReturnResult_result(ASN1encoding_t enc, ReturnResult_result *val);
  29. static int ASN1CALL ASN1Enc_Invoke(ASN1encoding_t enc, Invoke *val);
  30. static int ASN1CALL ASN1Enc_ReturnResult(ASN1encoding_t enc, ReturnResult *val);
  31. static int ASN1CALL ASN1Enc_ReturnError(ASN1encoding_t enc, ReturnError *val);
  32. static int ASN1CALL ASN1Enc_ExtensionSeq(ASN1encoding_t enc, PExtensionSeq *val);
  33. static int ASN1CALL ASN1Enc_PickrequRes(ASN1encoding_t enc, PickrequRes *val);
  34. static int ASN1CALL ASN1Enc_PartySubaddress(ASN1encoding_t enc, PartySubaddress *val);
  35. static int ASN1CALL ASN1Enc_H225NonStandardParameter(ASN1encoding_t enc, H225NonStandardParameter *val);
  36. static int ASN1CALL ASN1Enc_PublicPartyNumber(ASN1encoding_t enc, PublicPartyNumber *val);
  37. static int ASN1CALL ASN1Enc_PrivatePartyNumber(ASN1encoding_t enc, PrivatePartyNumber *val);
  38. static int ASN1CALL ASN1Enc_TransportAddress(ASN1encoding_t enc, TransportAddress *val);
  39. static int ASN1CALL ASN1Enc_CTActiveArg_argumentExtension(ASN1encoding_t enc, CTActiveArg_argumentExtension *val);
  40. static int ASN1CALL ASN1Enc_CTCompleteArg_argumentExtension(ASN1encoding_t enc, CTCompleteArg_argumentExtension *val);
  41. static int ASN1CALL ASN1Enc_SubaddressTransferArg_argumentExtension(ASN1encoding_t enc, SubaddressTransferArg_argumentExtension *val);
  42. static int ASN1CALL ASN1Enc_CTUpdateArg_argumentExtension(ASN1encoding_t enc, CTUpdateArg_argumentExtension *val);
  43. static int ASN1CALL ASN1Enc_CTIdentifyRes_resultExtension(ASN1encoding_t enc, CTIdentifyRes_resultExtension *val);
  44. static int ASN1CALL ASN1Enc_CTSetupArg_argumentExtension(ASN1encoding_t enc, CTSetupArg_argumentExtension *val);
  45. static int ASN1CALL ASN1Enc_CTInitiateArg_argumentExtension(ASN1encoding_t enc, CTInitiateArg_argumentExtension *val);
  46. static int ASN1CALL ASN1Enc_IntResult_extension(ASN1encoding_t enc, IntResult_extension *val);
  47. static int ASN1CALL ASN1Enc_DivertingLegInformation4Argument_extension(ASN1encoding_t enc, DivertingLegInformation4Argument_extension *val);
  48. static int ASN1CALL ASN1Enc_DivertingLegInformation3Argument_extension(ASN1encoding_t enc, DivertingLegInformation3Argument_extension *val);
  49. static int ASN1CALL ASN1Enc_DivertingLegInformation2Argument_extension(ASN1encoding_t enc, DivertingLegInformation2Argument_extension *val);
  50. static int ASN1CALL ASN1Enc_DivertingLegInformation1Argument_extension(ASN1encoding_t enc, DivertingLegInformation1Argument_extension *val);
  51. static int ASN1CALL ASN1Enc_CallReroutingArgument_extension(ASN1encoding_t enc, CallReroutingArgument_extension *val);
  52. static int ASN1CALL ASN1Enc_CheckRestrictionArgument_extension(ASN1encoding_t enc, CheckRestrictionArgument_extension *val);
  53. static int ASN1CALL ASN1Enc_InterrogateDiversionQArgument_extension(ASN1encoding_t enc, InterrogateDiversionQArgument_extension *val);
  54. static int ASN1CALL ASN1Enc_DeactivateDiversionQArgument_extension(ASN1encoding_t enc, DeactivateDiversionQArgument_extension *val);
  55. static int ASN1CALL ASN1Enc_ActivateDiversionQArgument_extension(ASN1encoding_t enc, ActivateDiversionQArgument_extension *val);
  56. static int ASN1CALL ASN1Enc_H4503ROS(ASN1encoding_t enc, H4503ROS *val);
  57. static int ASN1CALL ASN1Enc_DummyArg(ASN1encoding_t enc, DummyArg *val);
  58. static int ASN1CALL ASN1Enc_DummyRes(ASN1encoding_t enc, DummyRes *val);
  59. static int ASN1CALL ASN1Enc_SubaddressTransferArg(ASN1encoding_t enc, SubaddressTransferArg *val);
  60. static int ASN1CALL ASN1Enc_MixedExtension(ASN1encoding_t enc, MixedExtension *val);
  61. static int ASN1CALL ASN1Enc_PartyNumber(ASN1encoding_t enc, PartyNumber *val);
  62. static int ASN1CALL ASN1Enc_CpickupNotifyArg_extensionArg(ASN1encoding_t enc, PCpickupNotifyArg_extensionArg *val);
  63. static int ASN1CALL ASN1Enc_CpNotifyArg_extensionArg(ASN1encoding_t enc, PCpNotifyArg_extensionArg *val);
  64. static int ASN1CALL ASN1Enc_PickExeRes_extensionRes(ASN1encoding_t enc, PPickExeRes_extensionRes *val);
  65. static int ASN1CALL ASN1Enc_PickExeArg_extensionArg(ASN1encoding_t enc, PPickExeArg_extensionArg *val);
  66. static int ASN1CALL ASN1Enc_PickupRes_extensionRes(ASN1encoding_t enc, PPickupRes_extensionRes *val);
  67. static int ASN1CALL ASN1Enc_PickupArg_extensionArg(ASN1encoding_t enc, PPickupArg_extensionArg *val);
  68. static int ASN1CALL ASN1Enc_PickrequRes_extensionRes(ASN1encoding_t enc, PPickrequRes_extensionRes *val);
  69. static int ASN1CALL ASN1Enc_PickrequArg_extensionArg(ASN1encoding_t enc, PPickrequArg_extensionArg *val);
  70. static int ASN1CALL ASN1Enc_GroupIndicationOffRes_extensionRes(ASN1encoding_t enc, PGroupIndicationOffRes_extensionRes *val);
  71. static int ASN1CALL ASN1Enc_GroupIndicationOffArg_extensionArg(ASN1encoding_t enc, PGroupIndicationOffArg_extensionArg *val);
  72. static int ASN1CALL ASN1Enc_GroupIndicationOnRes_extensionRes(ASN1encoding_t enc, PGroupIndicationOnRes_extensionRes *val);
  73. static int ASN1CALL ASN1Enc_GroupIndicationOnArg_extensionArg(ASN1encoding_t enc, PGroupIndicationOnArg_extensionArg *val);
  74. static int ASN1CALL ASN1Enc_CpSetupRes_extensionRes(ASN1encoding_t enc, PCpSetupRes_extensionRes *val);
  75. static int ASN1CALL ASN1Enc_CpSetupArg_extensionArg(ASN1encoding_t enc, PCpSetupArg_extensionArg *val);
  76. static int ASN1CALL ASN1Enc_CpRequestRes_extensionRes(ASN1encoding_t enc, PCpRequestRes_extensionRes *val);
  77. static int ASN1CALL ASN1Enc_CpRequestArg_extensionArg(ASN1encoding_t enc, PCpRequestArg_extensionArg *val);
  78. static int ASN1CALL ASN1Enc_ServiceApdus_rosApdus(ASN1encoding_t enc, PServiceApdus_rosApdus *val);
  79. static int ASN1CALL ASN1Enc_AliasAddress(ASN1encoding_t enc, AliasAddress *val);
  80. static int ASN1CALL ASN1Enc_EndpointAddress_destinationAddress(ASN1encoding_t enc, PEndpointAddress_destinationAddress *val);
  81. static int ASN1CALL ASN1Enc_AddressInformation(ASN1encoding_t enc, AddressInformation *val);
  82. static int ASN1CALL ASN1Enc_EndpointAddress(ASN1encoding_t enc, EndpointAddress *val);
  83. static int ASN1CALL ASN1Enc_NetworkFacilityExtension(ASN1encoding_t enc, NetworkFacilityExtension *val);
  84. static int ASN1CALL ASN1Enc_ActivateDiversionQArgument(ASN1encoding_t enc, ActivateDiversionQArgument *val);
  85. static int ASN1CALL ASN1Enc_DeactivateDiversionQArgument(ASN1encoding_t enc, DeactivateDiversionQArgument *val);
  86. static int ASN1CALL ASN1Enc_InterrogateDiversionQArgument(ASN1encoding_t enc, InterrogateDiversionQArgument *val);
  87. static int ASN1CALL ASN1Enc_CheckRestrictionArgument(ASN1encoding_t enc, CheckRestrictionArgument *val);
  88. static int ASN1CALL ASN1Enc_CallReroutingArgument(ASN1encoding_t enc, CallReroutingArgument *val);
  89. static int ASN1CALL ASN1Enc_DivertingLegInformation1Argument(ASN1encoding_t enc, DivertingLegInformation1Argument *val);
  90. static int ASN1CALL ASN1Enc_DivertingLegInformation2Argument(ASN1encoding_t enc, DivertingLegInformation2Argument *val);
  91. static int ASN1CALL ASN1Enc_DivertingLegInformation3Argument(ASN1encoding_t enc, DivertingLegInformation3Argument *val);
  92. static int ASN1CALL ASN1Enc_DivertingLegInformation4Argument(ASN1encoding_t enc, DivertingLegInformation4Argument *val);
  93. static int ASN1CALL ASN1Enc_IntResult(ASN1encoding_t enc, IntResult *val);
  94. static int ASN1CALL ASN1Enc_CTInitiateArg(ASN1encoding_t enc, CTInitiateArg *val);
  95. static int ASN1CALL ASN1Enc_CTSetupArg(ASN1encoding_t enc, CTSetupArg *val);
  96. static int ASN1CALL ASN1Enc_CTIdentifyRes(ASN1encoding_t enc, CTIdentifyRes *val);
  97. static int ASN1CALL ASN1Enc_CTUpdateArg(ASN1encoding_t enc, CTUpdateArg *val);
  98. static int ASN1CALL ASN1Enc_CTCompleteArg(ASN1encoding_t enc, CTCompleteArg *val);
  99. static int ASN1CALL ASN1Enc_CTActiveArg(ASN1encoding_t enc, CTActiveArg *val);
  100. static int ASN1CALL ASN1Enc_CpRequestArg(ASN1encoding_t enc, CpRequestArg *val);
  101. static int ASN1CALL ASN1Enc_CpRequestRes(ASN1encoding_t enc, CpRequestRes *val);
  102. static int ASN1CALL ASN1Enc_CpSetupArg(ASN1encoding_t enc, CpSetupArg *val);
  103. static int ASN1CALL ASN1Enc_CpSetupRes(ASN1encoding_t enc, CpSetupRes *val);
  104. static int ASN1CALL ASN1Enc_GroupIndicationOnArg(ASN1encoding_t enc, GroupIndicationOnArg *val);
  105. static int ASN1CALL ASN1Enc_GroupIndicationOffArg(ASN1encoding_t enc, GroupIndicationOffArg *val);
  106. static int ASN1CALL ASN1Enc_PickrequArg(ASN1encoding_t enc, PickrequArg *val);
  107. static int ASN1CALL ASN1Enc_PickupArg(ASN1encoding_t enc, PickupArg *val);
  108. static int ASN1CALL ASN1Enc_PickExeArg(ASN1encoding_t enc, PickExeArg *val);
  109. static int ASN1CALL ASN1Enc_CpNotifyArg(ASN1encoding_t enc, CpNotifyArg *val);
  110. static int ASN1CALL ASN1Enc_CpickupNotifyArg(ASN1encoding_t enc, CpickupNotifyArg *val);
  111. static int ASN1CALL ASN1Enc_H4501SupplementaryService(ASN1encoding_t enc, H4501SupplementaryService *val);
  112. static int ASN1CALL ASN1Enc_IntResultList(ASN1encoding_t enc, IntResultList *val);
  113. static int ASN1CALL ASN1Dec_TransportAddress_ipSourceRoute_routing(ASN1decoding_t dec, TransportAddress_ipSourceRoute_routing *val);
  114. static int ASN1CALL ASN1Dec_TransportAddress_ipSourceRoute_route(ASN1decoding_t dec, PTransportAddress_ipSourceRoute_route *val);
  115. static int ASN1CALL ASN1Dec_TransportAddress_ip6Address(ASN1decoding_t dec, TransportAddress_ip6Address *val);
  116. static int ASN1CALL ASN1Dec_TransportAddress_ipxAddress(ASN1decoding_t dec, TransportAddress_ipxAddress *val);
  117. static int ASN1CALL ASN1Dec_TransportAddress_ipSourceRoute(ASN1decoding_t dec, TransportAddress_ipSourceRoute *val);
  118. static int ASN1CALL ASN1Dec_TransportAddress_ipAddress(ASN1decoding_t dec, TransportAddress_ipAddress *val);
  119. static int ASN1CALL ASN1Dec_Reject_problem(ASN1decoding_t dec, Reject_problem *val);
  120. static int ASN1CALL ASN1Dec_EntityType(ASN1decoding_t dec, EntityType *val);
  121. static int ASN1CALL ASN1Dec_InterpretationApdu(ASN1decoding_t dec, InterpretationApdu *val);
  122. static int ASN1CALL ASN1Dec_ServiceApdus(ASN1decoding_t dec, ServiceApdus *val);
  123. static int ASN1CALL ASN1Dec_Reject(ASN1decoding_t dec, Reject *val);
  124. static int ASN1CALL ASN1Dec_EXTENSION(ASN1decoding_t dec, EXTENSION *val);
  125. static int ASN1CALL ASN1Dec_GroupIndicationOnRes(ASN1decoding_t dec, GroupIndicationOnRes *val);
  126. static int ASN1CALL ASN1Dec_GroupIndicationOffRes(ASN1decoding_t dec, GroupIndicationOffRes *val);
  127. static int ASN1CALL ASN1Dec_PickupRes(ASN1decoding_t dec, PickupRes *val);
  128. static int ASN1CALL ASN1Dec_PickExeRes(ASN1decoding_t dec, PickExeRes *val);
  129. static int ASN1CALL ASN1Dec_UserSpecifiedSubaddress(ASN1decoding_t dec, UserSpecifiedSubaddress *val);
  130. static int ASN1CALL ASN1Dec_CODE(ASN1decoding_t dec, CODE *val);
  131. static int ASN1CALL ASN1Dec_H221NonStandard(ASN1decoding_t dec, H221NonStandard *val);
  132. static int ASN1CALL ASN1Dec_H225NonStandardIdentifier(ASN1decoding_t dec, H225NonStandardIdentifier *val);
  133. static int ASN1CALL ASN1Dec_PublicTypeOfNumber(ASN1decoding_t dec, PublicTypeOfNumber *val);
  134. static int ASN1CALL ASN1Dec_PrivateTypeOfNumber(ASN1decoding_t dec, PrivateTypeOfNumber *val);
  135. static int ASN1CALL ASN1Dec_CallIdentifier(ASN1decoding_t dec, CallIdentifier *val);
  136. static int ASN1CALL ASN1Dec_ReturnResult_result(ASN1decoding_t dec, ReturnResult_result *val);
  137. static int ASN1CALL ASN1Dec_Invoke(ASN1decoding_t dec, Invoke *val);
  138. static int ASN1CALL ASN1Dec_ReturnResult(ASN1decoding_t dec, ReturnResult *val);
  139. static int ASN1CALL ASN1Dec_ReturnError(ASN1decoding_t dec, ReturnError *val);
  140. static int ASN1CALL ASN1Dec_ExtensionSeq(ASN1decoding_t dec, PExtensionSeq *val);
  141. static int ASN1CALL ASN1Dec_PickrequRes(ASN1decoding_t dec, PickrequRes *val);
  142. static int ASN1CALL ASN1Dec_PartySubaddress(ASN1decoding_t dec, PartySubaddress *val);
  143. static int ASN1CALL ASN1Dec_H225NonStandardParameter(ASN1decoding_t dec, H225NonStandardParameter *val);
  144. static int ASN1CALL ASN1Dec_PublicPartyNumber(ASN1decoding_t dec, PublicPartyNumber *val);
  145. static int ASN1CALL ASN1Dec_PrivatePartyNumber(ASN1decoding_t dec, PrivatePartyNumber *val);
  146. static int ASN1CALL ASN1Dec_TransportAddress(ASN1decoding_t dec, TransportAddress *val);
  147. static int ASN1CALL ASN1Dec_CTActiveArg_argumentExtension(ASN1decoding_t dec, CTActiveArg_argumentExtension *val);
  148. static int ASN1CALL ASN1Dec_CTCompleteArg_argumentExtension(ASN1decoding_t dec, CTCompleteArg_argumentExtension *val);
  149. static int ASN1CALL ASN1Dec_SubaddressTransferArg_argumentExtension(ASN1decoding_t dec, SubaddressTransferArg_argumentExtension *val);
  150. static int ASN1CALL ASN1Dec_CTUpdateArg_argumentExtension(ASN1decoding_t dec, CTUpdateArg_argumentExtension *val);
  151. static int ASN1CALL ASN1Dec_CTIdentifyRes_resultExtension(ASN1decoding_t dec, CTIdentifyRes_resultExtension *val);
  152. static int ASN1CALL ASN1Dec_CTSetupArg_argumentExtension(ASN1decoding_t dec, CTSetupArg_argumentExtension *val);
  153. static int ASN1CALL ASN1Dec_CTInitiateArg_argumentExtension(ASN1decoding_t dec, CTInitiateArg_argumentExtension *val);
  154. static int ASN1CALL ASN1Dec_IntResult_extension(ASN1decoding_t dec, IntResult_extension *val);
  155. static int ASN1CALL ASN1Dec_DivertingLegInformation4Argument_extension(ASN1decoding_t dec, DivertingLegInformation4Argument_extension *val);
  156. static int ASN1CALL ASN1Dec_DivertingLegInformation3Argument_extension(ASN1decoding_t dec, DivertingLegInformation3Argument_extension *val);
  157. static int ASN1CALL ASN1Dec_DivertingLegInformation2Argument_extension(ASN1decoding_t dec, DivertingLegInformation2Argument_extension *val);
  158. static int ASN1CALL ASN1Dec_DivertingLegInformation1Argument_extension(ASN1decoding_t dec, DivertingLegInformation1Argument_extension *val);
  159. static int ASN1CALL ASN1Dec_CallReroutingArgument_extension(ASN1decoding_t dec, CallReroutingArgument_extension *val);
  160. static int ASN1CALL ASN1Dec_CheckRestrictionArgument_extension(ASN1decoding_t dec, CheckRestrictionArgument_extension *val);
  161. static int ASN1CALL ASN1Dec_InterrogateDiversionQArgument_extension(ASN1decoding_t dec, InterrogateDiversionQArgument_extension *val);
  162. static int ASN1CALL ASN1Dec_DeactivateDiversionQArgument_extension(ASN1decoding_t dec, DeactivateDiversionQArgument_extension *val);
  163. static int ASN1CALL ASN1Dec_ActivateDiversionQArgument_extension(ASN1decoding_t dec, ActivateDiversionQArgument_extension *val);
  164. static int ASN1CALL ASN1Dec_H4503ROS(ASN1decoding_t dec, H4503ROS *val);
  165. static int ASN1CALL ASN1Dec_DummyArg(ASN1decoding_t dec, DummyArg *val);
  166. static int ASN1CALL ASN1Dec_DummyRes(ASN1decoding_t dec, DummyRes *val);
  167. static int ASN1CALL ASN1Dec_SubaddressTransferArg(ASN1decoding_t dec, SubaddressTransferArg *val);
  168. static int ASN1CALL ASN1Dec_MixedExtension(ASN1decoding_t dec, MixedExtension *val);
  169. static int ASN1CALL ASN1Dec_PartyNumber(ASN1decoding_t dec, PartyNumber *val);
  170. static int ASN1CALL ASN1Dec_CpickupNotifyArg_extensionArg(ASN1decoding_t dec, PCpickupNotifyArg_extensionArg *val);
  171. static int ASN1CALL ASN1Dec_CpNotifyArg_extensionArg(ASN1decoding_t dec, PCpNotifyArg_extensionArg *val);
  172. static int ASN1CALL ASN1Dec_PickExeRes_extensionRes(ASN1decoding_t dec, PPickExeRes_extensionRes *val);
  173. static int ASN1CALL ASN1Dec_PickExeArg_extensionArg(ASN1decoding_t dec, PPickExeArg_extensionArg *val);
  174. static int ASN1CALL ASN1Dec_PickupRes_extensionRes(ASN1decoding_t dec, PPickupRes_extensionRes *val);
  175. static int ASN1CALL ASN1Dec_PickupArg_extensionArg(ASN1decoding_t dec, PPickupArg_extensionArg *val);
  176. static int ASN1CALL ASN1Dec_PickrequRes_extensionRes(ASN1decoding_t dec, PPickrequRes_extensionRes *val);
  177. static int ASN1CALL ASN1Dec_PickrequArg_extensionArg(ASN1decoding_t dec, PPickrequArg_extensionArg *val);
  178. static int ASN1CALL ASN1Dec_GroupIndicationOffRes_extensionRes(ASN1decoding_t dec, PGroupIndicationOffRes_extensionRes *val);
  179. static int ASN1CALL ASN1Dec_GroupIndicationOffArg_extensionArg(ASN1decoding_t dec, PGroupIndicationOffArg_extensionArg *val);
  180. static int ASN1CALL ASN1Dec_GroupIndicationOnRes_extensionRes(ASN1decoding_t dec, PGroupIndicationOnRes_extensionRes *val);
  181. static int ASN1CALL ASN1Dec_GroupIndicationOnArg_extensionArg(ASN1decoding_t dec, PGroupIndicationOnArg_extensionArg *val);
  182. static int ASN1CALL ASN1Dec_CpSetupRes_extensionRes(ASN1decoding_t dec, PCpSetupRes_extensionRes *val);
  183. static int ASN1CALL ASN1Dec_CpSetupArg_extensionArg(ASN1decoding_t dec, PCpSetupArg_extensionArg *val);
  184. static int ASN1CALL ASN1Dec_CpRequestRes_extensionRes(ASN1decoding_t dec, PCpRequestRes_extensionRes *val);
  185. static int ASN1CALL ASN1Dec_CpRequestArg_extensionArg(ASN1decoding_t dec, PCpRequestArg_extensionArg *val);
  186. static int ASN1CALL ASN1Dec_ServiceApdus_rosApdus(ASN1decoding_t dec, PServiceApdus_rosApdus *val);
  187. static int ASN1CALL ASN1Dec_AliasAddress(ASN1decoding_t dec, AliasAddress *val);
  188. static int ASN1CALL ASN1Dec_EndpointAddress_destinationAddress(ASN1decoding_t dec, PEndpointAddress_destinationAddress *val);
  189. static int ASN1CALL ASN1Dec_AddressInformation(ASN1decoding_t dec, AddressInformation *val);
  190. static int ASN1CALL ASN1Dec_EndpointAddress(ASN1decoding_t dec, EndpointAddress *val);
  191. static int ASN1CALL ASN1Dec_NetworkFacilityExtension(ASN1decoding_t dec, NetworkFacilityExtension *val);
  192. static int ASN1CALL ASN1Dec_ActivateDiversionQArgument(ASN1decoding_t dec, ActivateDiversionQArgument *val);
  193. static int ASN1CALL ASN1Dec_DeactivateDiversionQArgument(ASN1decoding_t dec, DeactivateDiversionQArgument *val);
  194. static int ASN1CALL ASN1Dec_InterrogateDiversionQArgument(ASN1decoding_t dec, InterrogateDiversionQArgument *val);
  195. static int ASN1CALL ASN1Dec_CheckRestrictionArgument(ASN1decoding_t dec, CheckRestrictionArgument *val);
  196. static int ASN1CALL ASN1Dec_CallReroutingArgument(ASN1decoding_t dec, CallReroutingArgument *val);
  197. static int ASN1CALL ASN1Dec_DivertingLegInformation1Argument(ASN1decoding_t dec, DivertingLegInformation1Argument *val);
  198. static int ASN1CALL ASN1Dec_DivertingLegInformation2Argument(ASN1decoding_t dec, DivertingLegInformation2Argument *val);
  199. static int ASN1CALL ASN1Dec_DivertingLegInformation3Argument(ASN1decoding_t dec, DivertingLegInformation3Argument *val);
  200. static int ASN1CALL ASN1Dec_DivertingLegInformation4Argument(ASN1decoding_t dec, DivertingLegInformation4Argument *val);
  201. static int ASN1CALL ASN1Dec_IntResult(ASN1decoding_t dec, IntResult *val);
  202. static int ASN1CALL ASN1Dec_CTInitiateArg(ASN1decoding_t dec, CTInitiateArg *val);
  203. static int ASN1CALL ASN1Dec_CTSetupArg(ASN1decoding_t dec, CTSetupArg *val);
  204. static int ASN1CALL ASN1Dec_CTIdentifyRes(ASN1decoding_t dec, CTIdentifyRes *val);
  205. static int ASN1CALL ASN1Dec_CTUpdateArg(ASN1decoding_t dec, CTUpdateArg *val);
  206. static int ASN1CALL ASN1Dec_CTCompleteArg(ASN1decoding_t dec, CTCompleteArg *val);
  207. static int ASN1CALL ASN1Dec_CTActiveArg(ASN1decoding_t dec, CTActiveArg *val);
  208. static int ASN1CALL ASN1Dec_CpRequestArg(ASN1decoding_t dec, CpRequestArg *val);
  209. static int ASN1CALL ASN1Dec_CpRequestRes(ASN1decoding_t dec, CpRequestRes *val);
  210. static int ASN1CALL ASN1Dec_CpSetupArg(ASN1decoding_t dec, CpSetupArg *val);
  211. static int ASN1CALL ASN1Dec_CpSetupRes(ASN1decoding_t dec, CpSetupRes *val);
  212. static int ASN1CALL ASN1Dec_GroupIndicationOnArg(ASN1decoding_t dec, GroupIndicationOnArg *val);
  213. static int ASN1CALL ASN1Dec_GroupIndicationOffArg(ASN1decoding_t dec, GroupIndicationOffArg *val);
  214. static int ASN1CALL ASN1Dec_PickrequArg(ASN1decoding_t dec, PickrequArg *val);
  215. static int ASN1CALL ASN1Dec_PickupArg(ASN1decoding_t dec, PickupArg *val);
  216. static int ASN1CALL ASN1Dec_PickExeArg(ASN1decoding_t dec, PickExeArg *val);
  217. static int ASN1CALL ASN1Dec_CpNotifyArg(ASN1decoding_t dec, CpNotifyArg *val);
  218. static int ASN1CALL ASN1Dec_CpickupNotifyArg(ASN1decoding_t dec, CpickupNotifyArg *val);
  219. static int ASN1CALL ASN1Dec_H4501SupplementaryService(ASN1decoding_t dec, H4501SupplementaryService *val);
  220. static int ASN1CALL ASN1Dec_IntResultList(ASN1decoding_t dec, IntResultList *val);
  221. static void ASN1CALL ASN1Free_TransportAddress_ipSourceRoute_route(PTransportAddress_ipSourceRoute_route *val);
  222. static void ASN1CALL ASN1Free_TransportAddress_ip6Address(TransportAddress_ip6Address *val);
  223. static void ASN1CALL ASN1Free_TransportAddress_ipxAddress(TransportAddress_ipxAddress *val);
  224. static void ASN1CALL ASN1Free_TransportAddress_ipSourceRoute(TransportAddress_ipSourceRoute *val);
  225. static void ASN1CALL ASN1Free_TransportAddress_ipAddress(TransportAddress_ipAddress *val);
  226. static void ASN1CALL ASN1Free_ServiceApdus(ServiceApdus *val);
  227. static void ASN1CALL ASN1Free_EXTENSION(EXTENSION *val);
  228. static void ASN1CALL ASN1Free_GroupIndicationOnRes(GroupIndicationOnRes *val);
  229. static void ASN1CALL ASN1Free_GroupIndicationOffRes(GroupIndicationOffRes *val);
  230. static void ASN1CALL ASN1Free_PickupRes(PickupRes *val);
  231. static void ASN1CALL ASN1Free_PickExeRes(PickExeRes *val);
  232. static void ASN1CALL ASN1Free_UserSpecifiedSubaddress(UserSpecifiedSubaddress *val);
  233. static void ASN1CALL ASN1Free_CODE(CODE *val);
  234. static void ASN1CALL ASN1Free_H225NonStandardIdentifier(H225NonStandardIdentifier *val);
  235. static void ASN1CALL ASN1Free_CallIdentifier(CallIdentifier *val);
  236. static void ASN1CALL ASN1Free_ReturnResult_result(ReturnResult_result *val);
  237. static void ASN1CALL ASN1Free_Invoke(Invoke *val);
  238. static void ASN1CALL ASN1Free_ReturnResult(ReturnResult *val);
  239. static void ASN1CALL ASN1Free_ReturnError(ReturnError *val);
  240. static void ASN1CALL ASN1Free_ExtensionSeq(PExtensionSeq *val);
  241. static void ASN1CALL ASN1Free_PickrequRes(PickrequRes *val);
  242. static void ASN1CALL ASN1Free_PartySubaddress(PartySubaddress *val);
  243. static void ASN1CALL ASN1Free_H225NonStandardParameter(H225NonStandardParameter *val);
  244. static void ASN1CALL ASN1Free_PublicPartyNumber(PublicPartyNumber *val);
  245. static void ASN1CALL ASN1Free_PrivatePartyNumber(PrivatePartyNumber *val);
  246. static void ASN1CALL ASN1Free_TransportAddress(TransportAddress *val);
  247. static void ASN1CALL ASN1Free_CTActiveArg_argumentExtension(CTActiveArg_argumentExtension *val);
  248. static void ASN1CALL ASN1Free_CTCompleteArg_argumentExtension(CTCompleteArg_argumentExtension *val);
  249. static void ASN1CALL ASN1Free_SubaddressTransferArg_argumentExtension(SubaddressTransferArg_argumentExtension *val);
  250. static void ASN1CALL ASN1Free_CTUpdateArg_argumentExtension(CTUpdateArg_argumentExtension *val);
  251. static void ASN1CALL ASN1Free_CTIdentifyRes_resultExtension(CTIdentifyRes_resultExtension *val);
  252. static void ASN1CALL ASN1Free_CTSetupArg_argumentExtension(CTSetupArg_argumentExtension *val);
  253. static void ASN1CALL ASN1Free_CTInitiateArg_argumentExtension(CTInitiateArg_argumentExtension *val);
  254. static void ASN1CALL ASN1Free_IntResult_extension(IntResult_extension *val);
  255. static void ASN1CALL ASN1Free_DivertingLegInformation4Argument_extension(DivertingLegInformation4Argument_extension *val);
  256. static void ASN1CALL ASN1Free_DivertingLegInformation3Argument_extension(DivertingLegInformation3Argument_extension *val);
  257. static void ASN1CALL ASN1Free_DivertingLegInformation2Argument_extension(DivertingLegInformation2Argument_extension *val);
  258. static void ASN1CALL ASN1Free_DivertingLegInformation1Argument_extension(DivertingLegInformation1Argument_extension *val);
  259. static void ASN1CALL ASN1Free_CallReroutingArgument_extension(CallReroutingArgument_extension *val);
  260. static void ASN1CALL ASN1Free_CheckRestrictionArgument_extension(CheckRestrictionArgument_extension *val);
  261. static void ASN1CALL ASN1Free_InterrogateDiversionQArgument_extension(InterrogateDiversionQArgument_extension *val);
  262. static void ASN1CALL ASN1Free_DeactivateDiversionQArgument_extension(DeactivateDiversionQArgument_extension *val);
  263. static void ASN1CALL ASN1Free_ActivateDiversionQArgument_extension(ActivateDiversionQArgument_extension *val);
  264. static void ASN1CALL ASN1Free_H4503ROS(H4503ROS *val);
  265. static void ASN1CALL ASN1Free_DummyArg(DummyArg *val);
  266. static void ASN1CALL ASN1Free_DummyRes(DummyRes *val);
  267. static void ASN1CALL ASN1Free_SubaddressTransferArg(SubaddressTransferArg *val);
  268. static void ASN1CALL ASN1Free_MixedExtension(MixedExtension *val);
  269. static void ASN1CALL ASN1Free_PartyNumber(PartyNumber *val);
  270. static void ASN1CALL ASN1Free_CpickupNotifyArg_extensionArg(PCpickupNotifyArg_extensionArg *val);
  271. static void ASN1CALL ASN1Free_CpNotifyArg_extensionArg(PCpNotifyArg_extensionArg *val);
  272. static void ASN1CALL ASN1Free_PickExeRes_extensionRes(PPickExeRes_extensionRes *val);
  273. static void ASN1CALL ASN1Free_PickExeArg_extensionArg(PPickExeArg_extensionArg *val);
  274. static void ASN1CALL ASN1Free_PickupRes_extensionRes(PPickupRes_extensionRes *val);
  275. static void ASN1CALL ASN1Free_PickupArg_extensionArg(PPickupArg_extensionArg *val);
  276. static void ASN1CALL ASN1Free_PickrequRes_extensionRes(PPickrequRes_extensionRes *val);
  277. static void ASN1CALL ASN1Free_PickrequArg_extensionArg(PPickrequArg_extensionArg *val);
  278. static void ASN1CALL ASN1Free_GroupIndicationOffRes_extensionRes(PGroupIndicationOffRes_extensionRes *val);
  279. static void ASN1CALL ASN1Free_GroupIndicationOffArg_extensionArg(PGroupIndicationOffArg_extensionArg *val);
  280. static void ASN1CALL ASN1Free_GroupIndicationOnRes_extensionRes(PGroupIndicationOnRes_extensionRes *val);
  281. static void ASN1CALL ASN1Free_GroupIndicationOnArg_extensionArg(PGroupIndicationOnArg_extensionArg *val);
  282. static void ASN1CALL ASN1Free_CpSetupRes_extensionRes(PCpSetupRes_extensionRes *val);
  283. static void ASN1CALL ASN1Free_CpSetupArg_extensionArg(PCpSetupArg_extensionArg *val);
  284. static void ASN1CALL ASN1Free_CpRequestRes_extensionRes(PCpRequestRes_extensionRes *val);
  285. static void ASN1CALL ASN1Free_CpRequestArg_extensionArg(PCpRequestArg_extensionArg *val);
  286. static void ASN1CALL ASN1Free_ServiceApdus_rosApdus(PServiceApdus_rosApdus *val);
  287. static void ASN1CALL ASN1Free_AliasAddress(AliasAddress *val);
  288. static void ASN1CALL ASN1Free_EndpointAddress_destinationAddress(PEndpointAddress_destinationAddress *val);
  289. static void ASN1CALL ASN1Free_AddressInformation(AddressInformation *val);
  290. static void ASN1CALL ASN1Free_EndpointAddress(EndpointAddress *val);
  291. static void ASN1CALL ASN1Free_NetworkFacilityExtension(NetworkFacilityExtension *val);
  292. static void ASN1CALL ASN1Free_ActivateDiversionQArgument(ActivateDiversionQArgument *val);
  293. static void ASN1CALL ASN1Free_DeactivateDiversionQArgument(DeactivateDiversionQArgument *val);
  294. static void ASN1CALL ASN1Free_InterrogateDiversionQArgument(InterrogateDiversionQArgument *val);
  295. static void ASN1CALL ASN1Free_CheckRestrictionArgument(CheckRestrictionArgument *val);
  296. static void ASN1CALL ASN1Free_CallReroutingArgument(CallReroutingArgument *val);
  297. static void ASN1CALL ASN1Free_DivertingLegInformation1Argument(DivertingLegInformation1Argument *val);
  298. static void ASN1CALL ASN1Free_DivertingLegInformation2Argument(DivertingLegInformation2Argument *val);
  299. static void ASN1CALL ASN1Free_DivertingLegInformation3Argument(DivertingLegInformation3Argument *val);
  300. static void ASN1CALL ASN1Free_DivertingLegInformation4Argument(DivertingLegInformation4Argument *val);
  301. static void ASN1CALL ASN1Free_IntResult(IntResult *val);
  302. static void ASN1CALL ASN1Free_CTInitiateArg(CTInitiateArg *val);
  303. static void ASN1CALL ASN1Free_CTSetupArg(CTSetupArg *val);
  304. static void ASN1CALL ASN1Free_CTIdentifyRes(CTIdentifyRes *val);
  305. static void ASN1CALL ASN1Free_CTUpdateArg(CTUpdateArg *val);
  306. static void ASN1CALL ASN1Free_CTCompleteArg(CTCompleteArg *val);
  307. static void ASN1CALL ASN1Free_CTActiveArg(CTActiveArg *val);
  308. static void ASN1CALL ASN1Free_CpRequestArg(CpRequestArg *val);
  309. static void ASN1CALL ASN1Free_CpRequestRes(CpRequestRes *val);
  310. static void ASN1CALL ASN1Free_CpSetupArg(CpSetupArg *val);
  311. static void ASN1CALL ASN1Free_CpSetupRes(CpSetupRes *val);
  312. static void ASN1CALL ASN1Free_GroupIndicationOnArg(GroupIndicationOnArg *val);
  313. static void ASN1CALL ASN1Free_GroupIndicationOffArg(GroupIndicationOffArg *val);
  314. static void ASN1CALL ASN1Free_PickrequArg(PickrequArg *val);
  315. static void ASN1CALL ASN1Free_PickupArg(PickupArg *val);
  316. static void ASN1CALL ASN1Free_PickExeArg(PickExeArg *val);
  317. static void ASN1CALL ASN1Free_CpNotifyArg(CpNotifyArg *val);
  318. static void ASN1CALL ASN1Free_CpickupNotifyArg(CpickupNotifyArg *val);
  319. static void ASN1CALL ASN1Free_H4501SupplementaryService(H4501SupplementaryService *val);
  320. static void ASN1CALL ASN1Free_IntResultList(IntResultList *val);
  321. typedef ASN1PerEncFun_t ASN1EncFun_t;
  322. static const ASN1EncFun_t encfntab[36] = {
  323. (ASN1EncFun_t) ASN1Enc_GroupIndicationOnRes,
  324. (ASN1EncFun_t) ASN1Enc_GroupIndicationOffRes,
  325. (ASN1EncFun_t) ASN1Enc_PickupRes,
  326. (ASN1EncFun_t) ASN1Enc_PickExeRes,
  327. (ASN1EncFun_t) ASN1Enc_PickrequRes,
  328. (ASN1EncFun_t) ASN1Enc_DummyArg,
  329. (ASN1EncFun_t) ASN1Enc_DummyRes,
  330. (ASN1EncFun_t) ASN1Enc_SubaddressTransferArg,
  331. (ASN1EncFun_t) ASN1Enc_ActivateDiversionQArgument,
  332. (ASN1EncFun_t) ASN1Enc_DeactivateDiversionQArgument,
  333. (ASN1EncFun_t) ASN1Enc_InterrogateDiversionQArgument,
  334. (ASN1EncFun_t) ASN1Enc_CheckRestrictionArgument,
  335. (ASN1EncFun_t) ASN1Enc_CallReroutingArgument,
  336. (ASN1EncFun_t) ASN1Enc_DivertingLegInformation1Argument,
  337. (ASN1EncFun_t) ASN1Enc_DivertingLegInformation2Argument,
  338. (ASN1EncFun_t) ASN1Enc_DivertingLegInformation3Argument,
  339. (ASN1EncFun_t) ASN1Enc_DivertingLegInformation4Argument,
  340. (ASN1EncFun_t) ASN1Enc_CTInitiateArg,
  341. (ASN1EncFun_t) ASN1Enc_CTSetupArg,
  342. (ASN1EncFun_t) ASN1Enc_CTIdentifyRes,
  343. (ASN1EncFun_t) ASN1Enc_CTUpdateArg,
  344. (ASN1EncFun_t) ASN1Enc_CTCompleteArg,
  345. (ASN1EncFun_t) ASN1Enc_CTActiveArg,
  346. (ASN1EncFun_t) ASN1Enc_CpRequestArg,
  347. (ASN1EncFun_t) ASN1Enc_CpRequestRes,
  348. (ASN1EncFun_t) ASN1Enc_CpSetupArg,
  349. (ASN1EncFun_t) ASN1Enc_CpSetupRes,
  350. (ASN1EncFun_t) ASN1Enc_GroupIndicationOnArg,
  351. (ASN1EncFun_t) ASN1Enc_GroupIndicationOffArg,
  352. (ASN1EncFun_t) ASN1Enc_PickrequArg,
  353. (ASN1EncFun_t) ASN1Enc_PickupArg,
  354. (ASN1EncFun_t) ASN1Enc_PickExeArg,
  355. (ASN1EncFun_t) ASN1Enc_CpNotifyArg,
  356. (ASN1EncFun_t) ASN1Enc_CpickupNotifyArg,
  357. (ASN1EncFun_t) ASN1Enc_H4501SupplementaryService,
  358. (ASN1EncFun_t) ASN1Enc_IntResultList,
  359. };
  360. typedef ASN1PerDecFun_t ASN1DecFun_t;
  361. static const ASN1DecFun_t decfntab[36] = {
  362. (ASN1DecFun_t) ASN1Dec_GroupIndicationOnRes,
  363. (ASN1DecFun_t) ASN1Dec_GroupIndicationOffRes,
  364. (ASN1DecFun_t) ASN1Dec_PickupRes,
  365. (ASN1DecFun_t) ASN1Dec_PickExeRes,
  366. (ASN1DecFun_t) ASN1Dec_PickrequRes,
  367. (ASN1DecFun_t) ASN1Dec_DummyArg,
  368. (ASN1DecFun_t) ASN1Dec_DummyRes,
  369. (ASN1DecFun_t) ASN1Dec_SubaddressTransferArg,
  370. (ASN1DecFun_t) ASN1Dec_ActivateDiversionQArgument,
  371. (ASN1DecFun_t) ASN1Dec_DeactivateDiversionQArgument,
  372. (ASN1DecFun_t) ASN1Dec_InterrogateDiversionQArgument,
  373. (ASN1DecFun_t) ASN1Dec_CheckRestrictionArgument,
  374. (ASN1DecFun_t) ASN1Dec_CallReroutingArgument,
  375. (ASN1DecFun_t) ASN1Dec_DivertingLegInformation1Argument,
  376. (ASN1DecFun_t) ASN1Dec_DivertingLegInformation2Argument,
  377. (ASN1DecFun_t) ASN1Dec_DivertingLegInformation3Argument,
  378. (ASN1DecFun_t) ASN1Dec_DivertingLegInformation4Argument,
  379. (ASN1DecFun_t) ASN1Dec_CTInitiateArg,
  380. (ASN1DecFun_t) ASN1Dec_CTSetupArg,
  381. (ASN1DecFun_t) ASN1Dec_CTIdentifyRes,
  382. (ASN1DecFun_t) ASN1Dec_CTUpdateArg,
  383. (ASN1DecFun_t) ASN1Dec_CTCompleteArg,
  384. (ASN1DecFun_t) ASN1Dec_CTActiveArg,
  385. (ASN1DecFun_t) ASN1Dec_CpRequestArg,
  386. (ASN1DecFun_t) ASN1Dec_CpRequestRes,
  387. (ASN1DecFun_t) ASN1Dec_CpSetupArg,
  388. (ASN1DecFun_t) ASN1Dec_CpSetupRes,
  389. (ASN1DecFun_t) ASN1Dec_GroupIndicationOnArg,
  390. (ASN1DecFun_t) ASN1Dec_GroupIndicationOffArg,
  391. (ASN1DecFun_t) ASN1Dec_PickrequArg,
  392. (ASN1DecFun_t) ASN1Dec_PickupArg,
  393. (ASN1DecFun_t) ASN1Dec_PickExeArg,
  394. (ASN1DecFun_t) ASN1Dec_CpNotifyArg,
  395. (ASN1DecFun_t) ASN1Dec_CpickupNotifyArg,
  396. (ASN1DecFun_t) ASN1Dec_H4501SupplementaryService,
  397. (ASN1DecFun_t) ASN1Dec_IntResultList,
  398. };
  399. static const ASN1FreeFun_t freefntab[36] = {
  400. (ASN1FreeFun_t) ASN1Free_GroupIndicationOnRes,
  401. (ASN1FreeFun_t) ASN1Free_GroupIndicationOffRes,
  402. (ASN1FreeFun_t) ASN1Free_PickupRes,
  403. (ASN1FreeFun_t) ASN1Free_PickExeRes,
  404. (ASN1FreeFun_t) ASN1Free_PickrequRes,
  405. (ASN1FreeFun_t) ASN1Free_DummyArg,
  406. (ASN1FreeFun_t) ASN1Free_DummyRes,
  407. (ASN1FreeFun_t) ASN1Free_SubaddressTransferArg,
  408. (ASN1FreeFun_t) ASN1Free_ActivateDiversionQArgument,
  409. (ASN1FreeFun_t) ASN1Free_DeactivateDiversionQArgument,
  410. (ASN1FreeFun_t) ASN1Free_InterrogateDiversionQArgument,
  411. (ASN1FreeFun_t) ASN1Free_CheckRestrictionArgument,
  412. (ASN1FreeFun_t) ASN1Free_CallReroutingArgument,
  413. (ASN1FreeFun_t) ASN1Free_DivertingLegInformation1Argument,
  414. (ASN1FreeFun_t) ASN1Free_DivertingLegInformation2Argument,
  415. (ASN1FreeFun_t) ASN1Free_DivertingLegInformation3Argument,
  416. (ASN1FreeFun_t) ASN1Free_DivertingLegInformation4Argument,
  417. (ASN1FreeFun_t) ASN1Free_CTInitiateArg,
  418. (ASN1FreeFun_t) ASN1Free_CTSetupArg,
  419. (ASN1FreeFun_t) ASN1Free_CTIdentifyRes,
  420. (ASN1FreeFun_t) ASN1Free_CTUpdateArg,
  421. (ASN1FreeFun_t) ASN1Free_CTCompleteArg,
  422. (ASN1FreeFun_t) ASN1Free_CTActiveArg,
  423. (ASN1FreeFun_t) ASN1Free_CpRequestArg,
  424. (ASN1FreeFun_t) ASN1Free_CpRequestRes,
  425. (ASN1FreeFun_t) ASN1Free_CpSetupArg,
  426. (ASN1FreeFun_t) ASN1Free_CpSetupRes,
  427. (ASN1FreeFun_t) ASN1Free_GroupIndicationOnArg,
  428. (ASN1FreeFun_t) ASN1Free_GroupIndicationOffArg,
  429. (ASN1FreeFun_t) ASN1Free_PickrequArg,
  430. (ASN1FreeFun_t) ASN1Free_PickupArg,
  431. (ASN1FreeFun_t) ASN1Free_PickExeArg,
  432. (ASN1FreeFun_t) ASN1Free_CpNotifyArg,
  433. (ASN1FreeFun_t) ASN1Free_CpickupNotifyArg,
  434. (ASN1FreeFun_t) ASN1Free_H4501SupplementaryService,
  435. (ASN1FreeFun_t) ASN1Free_IntResultList,
  436. };
  437. static const ULONG sizetab[36] = {
  438. SIZE_H4503PP_Module_PDU_0,
  439. SIZE_H4503PP_Module_PDU_1,
  440. SIZE_H4503PP_Module_PDU_2,
  441. SIZE_H4503PP_Module_PDU_3,
  442. SIZE_H4503PP_Module_PDU_4,
  443. SIZE_H4503PP_Module_PDU_5,
  444. SIZE_H4503PP_Module_PDU_6,
  445. SIZE_H4503PP_Module_PDU_7,
  446. SIZE_H4503PP_Module_PDU_8,
  447. SIZE_H4503PP_Module_PDU_9,
  448. SIZE_H4503PP_Module_PDU_10,
  449. SIZE_H4503PP_Module_PDU_11,
  450. SIZE_H4503PP_Module_PDU_12,
  451. SIZE_H4503PP_Module_PDU_13,
  452. SIZE_H4503PP_Module_PDU_14,
  453. SIZE_H4503PP_Module_PDU_15,
  454. SIZE_H4503PP_Module_PDU_16,
  455. SIZE_H4503PP_Module_PDU_17,
  456. SIZE_H4503PP_Module_PDU_18,
  457. SIZE_H4503PP_Module_PDU_19,
  458. SIZE_H4503PP_Module_PDU_20,
  459. SIZE_H4503PP_Module_PDU_21,
  460. SIZE_H4503PP_Module_PDU_22,
  461. SIZE_H4503PP_Module_PDU_23,
  462. SIZE_H4503PP_Module_PDU_24,
  463. SIZE_H4503PP_Module_PDU_25,
  464. SIZE_H4503PP_Module_PDU_26,
  465. SIZE_H4503PP_Module_PDU_27,
  466. SIZE_H4503PP_Module_PDU_28,
  467. SIZE_H4503PP_Module_PDU_29,
  468. SIZE_H4503PP_Module_PDU_30,
  469. SIZE_H4503PP_Module_PDU_31,
  470. SIZE_H4503PP_Module_PDU_32,
  471. SIZE_H4503PP_Module_PDU_33,
  472. SIZE_H4503PP_Module_PDU_34,
  473. SIZE_H4503PP_Module_PDU_35,
  474. };
  475. /* forward declarations of values: */
  476. /* definitions of value components: */
  477. /* definitions of values: */
  478. CallStatus CTCompleteArg_callStatus_default = 0;
  479. ASN1bool_t IntResult_remoteEnabled_default = 0;
  480. BasicService InterrogateDiversionQArgument_basicService_default = 0;
  481. void ASN1CALL H4503PP_Module_Startup(void)
  482. {
  483. H4503PP_Module = ASN1_CreateModule(0x10000, ASN1_PER_RULE_ALIGNED, ASN1FLAGS_NONE, 36, (const ASN1GenericFun_t *) encfntab, (const ASN1GenericFun_t *) decfntab, freefntab, sizetab, 0x30353468);
  484. }
  485. void ASN1CALL H4503PP_Module_Cleanup(void)
  486. {
  487. ASN1_CloseModule(H4503PP_Module);
  488. H4503PP_Module = NULL;
  489. }
  490. static int ASN1CALL ASN1Enc_TransportAddress_ipSourceRoute_routing(ASN1encoding_t enc, TransportAddress_ipSourceRoute_routing *val)
  491. {
  492. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  493. return 0;
  494. return 1;
  495. }
  496. static int ASN1CALL ASN1Dec_TransportAddress_ipSourceRoute_routing(ASN1decoding_t dec, TransportAddress_ipSourceRoute_routing *val)
  497. {
  498. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  499. return 0;
  500. return 1;
  501. }
  502. static int ASN1CALL ASN1Enc_TransportAddress_ipSourceRoute_route(ASN1encoding_t enc, PTransportAddress_ipSourceRoute_route *val)
  503. {
  504. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_TransportAddress_ipSourceRoute_route_ElmFn);
  505. }
  506. static int ASN1CALL ASN1Enc_TransportAddress_ipSourceRoute_route_ElmFn(ASN1encoding_t enc, PTransportAddress_ipSourceRoute_route val)
  507. {
  508. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &val->value, 4))
  509. return 0;
  510. return 1;
  511. }
  512. static int ASN1CALL ASN1Dec_TransportAddress_ipSourceRoute_route(ASN1decoding_t dec, PTransportAddress_ipSourceRoute_route *val)
  513. {
  514. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_TransportAddress_ipSourceRoute_route_ElmFn, sizeof(**val));
  515. }
  516. static int ASN1CALL ASN1Dec_TransportAddress_ipSourceRoute_route_ElmFn(ASN1decoding_t dec, PTransportAddress_ipSourceRoute_route val)
  517. {
  518. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &val->value, 4))
  519. return 0;
  520. return 1;
  521. }
  522. static void ASN1CALL ASN1Free_TransportAddress_ipSourceRoute_route(PTransportAddress_ipSourceRoute_route *val)
  523. {
  524. if (val) {
  525. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_TransportAddress_ipSourceRoute_route_ElmFn);
  526. }
  527. }
  528. static void ASN1CALL ASN1Free_TransportAddress_ipSourceRoute_route_ElmFn(PTransportAddress_ipSourceRoute_route val)
  529. {
  530. if (val) {
  531. }
  532. }
  533. static int ASN1CALL ASN1Enc_TransportAddress_ip6Address(ASN1encoding_t enc, TransportAddress_ip6Address *val)
  534. {
  535. if (!ASN1PEREncExtensionBitClear(enc))
  536. return 0;
  537. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->ip, 16))
  538. return 0;
  539. if (!ASN1PEREncUnsignedShort(enc, (val)->port))
  540. return 0;
  541. return 1;
  542. }
  543. static int ASN1CALL ASN1Dec_TransportAddress_ip6Address(ASN1decoding_t dec, TransportAddress_ip6Address *val)
  544. {
  545. ASN1uint32_t y;
  546. if (!ASN1PERDecExtensionBit(dec, &y))
  547. return 0;
  548. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->ip, 16))
  549. return 0;
  550. if (!ASN1PERDecUnsignedShort(dec, &(val)->port))
  551. return 0;
  552. if (y) {
  553. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  554. return 0;
  555. }
  556. return 1;
  557. }
  558. static void ASN1CALL ASN1Free_TransportAddress_ip6Address(TransportAddress_ip6Address *val)
  559. {
  560. if (val) {
  561. }
  562. }
  563. static int ASN1CALL ASN1Enc_TransportAddress_ipxAddress(ASN1encoding_t enc, TransportAddress_ipxAddress *val)
  564. {
  565. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->node, 6))
  566. return 0;
  567. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->netnum, 4))
  568. return 0;
  569. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->port, 2))
  570. return 0;
  571. return 1;
  572. }
  573. static int ASN1CALL ASN1Dec_TransportAddress_ipxAddress(ASN1decoding_t dec, TransportAddress_ipxAddress *val)
  574. {
  575. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->node, 6))
  576. return 0;
  577. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->netnum, 4))
  578. return 0;
  579. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->port, 2))
  580. return 0;
  581. return 1;
  582. }
  583. static void ASN1CALL ASN1Free_TransportAddress_ipxAddress(TransportAddress_ipxAddress *val)
  584. {
  585. if (val) {
  586. }
  587. }
  588. static int ASN1CALL ASN1Enc_TransportAddress_ipSourceRoute(ASN1encoding_t enc, TransportAddress_ipSourceRoute *val)
  589. {
  590. if (!ASN1PEREncExtensionBitClear(enc))
  591. return 0;
  592. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->ip, 4))
  593. return 0;
  594. if (!ASN1PEREncUnsignedShort(enc, (val)->port))
  595. return 0;
  596. if (!ASN1Enc_TransportAddress_ipSourceRoute_route(enc, &(val)->route))
  597. return 0;
  598. if (!ASN1Enc_TransportAddress_ipSourceRoute_routing(enc, &(val)->routing))
  599. return 0;
  600. return 1;
  601. }
  602. static int ASN1CALL ASN1Dec_TransportAddress_ipSourceRoute(ASN1decoding_t dec, TransportAddress_ipSourceRoute *val)
  603. {
  604. ASN1uint32_t y;
  605. if (!ASN1PERDecExtensionBit(dec, &y))
  606. return 0;
  607. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->ip, 4))
  608. return 0;
  609. if (!ASN1PERDecUnsignedShort(dec, &(val)->port))
  610. return 0;
  611. if (!ASN1Dec_TransportAddress_ipSourceRoute_route(dec, &(val)->route))
  612. return 0;
  613. if (!ASN1Dec_TransportAddress_ipSourceRoute_routing(dec, &(val)->routing))
  614. return 0;
  615. if (y) {
  616. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  617. return 0;
  618. }
  619. return 1;
  620. }
  621. static void ASN1CALL ASN1Free_TransportAddress_ipSourceRoute(TransportAddress_ipSourceRoute *val)
  622. {
  623. if (val) {
  624. ASN1Free_TransportAddress_ipSourceRoute_route(&(val)->route);
  625. }
  626. }
  627. static int ASN1CALL ASN1Enc_TransportAddress_ipAddress(ASN1encoding_t enc, TransportAddress_ipAddress *val)
  628. {
  629. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->ip, 4))
  630. return 0;
  631. if (!ASN1PEREncUnsignedShort(enc, (val)->port))
  632. return 0;
  633. return 1;
  634. }
  635. static int ASN1CALL ASN1Dec_TransportAddress_ipAddress(ASN1decoding_t dec, TransportAddress_ipAddress *val)
  636. {
  637. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->ip, 4))
  638. return 0;
  639. if (!ASN1PERDecUnsignedShort(dec, &(val)->port))
  640. return 0;
  641. return 1;
  642. }
  643. static void ASN1CALL ASN1Free_TransportAddress_ipAddress(TransportAddress_ipAddress *val)
  644. {
  645. if (val) {
  646. }
  647. }
  648. static int ASN1CALL ASN1Enc_Reject_problem(ASN1encoding_t enc, Reject_problem *val)
  649. {
  650. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  651. return 0;
  652. switch ((val)->choice) {
  653. case 1:
  654. if (!ASN1PEREncInteger(enc, (val)->u.general))
  655. return 0;
  656. break;
  657. case 2:
  658. if (!ASN1PEREncInteger(enc, (val)->u.invoke))
  659. return 0;
  660. break;
  661. case 3:
  662. if (!ASN1PEREncInteger(enc, (val)->u.returnResult))
  663. return 0;
  664. break;
  665. case 4:
  666. if (!ASN1PEREncInteger(enc, (val)->u.returnError))
  667. return 0;
  668. break;
  669. default:
  670. /* impossible */
  671. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  672. return 0;
  673. }
  674. return 1;
  675. }
  676. static int ASN1CALL ASN1Dec_Reject_problem(ASN1decoding_t dec, Reject_problem *val)
  677. {
  678. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  679. return 0;
  680. switch ((val)->choice) {
  681. case 1:
  682. if (!ASN1PERDecInteger(dec, &(val)->u.general))
  683. return 0;
  684. break;
  685. case 2:
  686. if (!ASN1PERDecInteger(dec, &(val)->u.invoke))
  687. return 0;
  688. break;
  689. case 3:
  690. if (!ASN1PERDecInteger(dec, &(val)->u.returnResult))
  691. return 0;
  692. break;
  693. case 4:
  694. if (!ASN1PERDecInteger(dec, &(val)->u.returnError))
  695. return 0;
  696. break;
  697. default:
  698. /* impossible */
  699. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  700. return 0;
  701. }
  702. return 1;
  703. }
  704. static int ASN1CALL ASN1Enc_EntityType(ASN1encoding_t enc, EntityType *val)
  705. {
  706. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  707. return 0;
  708. return 1;
  709. }
  710. static int ASN1CALL ASN1Dec_EntityType(ASN1decoding_t dec, EntityType *val)
  711. {
  712. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  713. return 0;
  714. return 1;
  715. }
  716. static int ASN1CALL ASN1Enc_InterpretationApdu(ASN1encoding_t enc, InterpretationApdu *val)
  717. {
  718. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  719. return 0;
  720. return 1;
  721. }
  722. static int ASN1CALL ASN1Dec_InterpretationApdu(ASN1decoding_t dec, InterpretationApdu *val)
  723. {
  724. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  725. return 0;
  726. return 1;
  727. }
  728. static int ASN1CALL ASN1Enc_ServiceApdus(ASN1encoding_t enc, ServiceApdus *val)
  729. {
  730. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 0))
  731. return 0;
  732. switch ((val)->choice) {
  733. case 1:
  734. if (!ASN1Enc_ServiceApdus_rosApdus(enc, &(val)->u.rosApdus))
  735. return 0;
  736. break;
  737. default:
  738. /* impossible */
  739. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  740. return 0;
  741. }
  742. return 1;
  743. }
  744. static int ASN1CALL ASN1Dec_ServiceApdus(ASN1decoding_t dec, ServiceApdus *val)
  745. {
  746. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 0))
  747. return 0;
  748. switch ((val)->choice) {
  749. case 1:
  750. if (!ASN1Dec_ServiceApdus_rosApdus(dec, &(val)->u.rosApdus))
  751. return 0;
  752. break;
  753. case 0:
  754. /* extension case */
  755. if (!ASN1PERDecSkipFragmented(dec, 8))
  756. return 0;
  757. break;
  758. default:
  759. /* impossible */
  760. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  761. return 0;
  762. }
  763. return 1;
  764. }
  765. static void ASN1CALL ASN1Free_ServiceApdus(ServiceApdus *val)
  766. {
  767. if (val) {
  768. switch ((val)->choice) {
  769. case 1:
  770. ASN1Free_ServiceApdus_rosApdus(&(val)->u.rosApdus);
  771. break;
  772. }
  773. }
  774. }
  775. static int ASN1CALL ASN1Enc_Reject(ASN1encoding_t enc, Reject *val)
  776. {
  777. if (!ASN1PEREncInteger(enc, (val)->invokeId))
  778. return 0;
  779. if (!ASN1Enc_Reject_problem(enc, &(val)->problem))
  780. return 0;
  781. return 1;
  782. }
  783. static int ASN1CALL ASN1Dec_Reject(ASN1decoding_t dec, Reject *val)
  784. {
  785. if (!ASN1PERDecInteger(dec, &(val)->invokeId))
  786. return 0;
  787. if (!ASN1Dec_Reject_problem(dec, &(val)->problem))
  788. return 0;
  789. return 1;
  790. }
  791. static int ASN1CALL ASN1Enc_EXTENSION(ASN1encoding_t enc, EXTENSION *val)
  792. {
  793. if (!ASN1PEREncBits(enc, 1, (val)->o))
  794. return 0;
  795. if ((val)->o[0] & 0x80) {
  796. if (!ASN1PEREncUnsignedShort(enc, (val)->argumentType - 1))
  797. return 0;
  798. }
  799. if (!ASN1PEREncObjectIdentifier(enc, &(val)->extensionID))
  800. return 0;
  801. return 1;
  802. }
  803. static int ASN1CALL ASN1Dec_EXTENSION(ASN1decoding_t dec, EXTENSION *val)
  804. {
  805. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  806. return 0;
  807. if ((val)->o[0] & 0x80) {
  808. if (!ASN1PERDecUnsignedShort(dec, &(val)->argumentType))
  809. return 0;
  810. (val)->argumentType += 1;
  811. }
  812. if (!ASN1PERDecObjectIdentifier(dec, &(val)->extensionID))
  813. return 0;
  814. return 1;
  815. }
  816. static void ASN1CALL ASN1Free_EXTENSION(EXTENSION *val)
  817. {
  818. if (val) {
  819. ASN1objectidentifier_free(&(val)->extensionID);
  820. }
  821. }
  822. static int ASN1CALL ASN1Enc_GroupIndicationOnRes(ASN1encoding_t enc, GroupIndicationOnRes *val)
  823. {
  824. if (!ASN1PEREncExtensionBitClear(enc))
  825. return 0;
  826. if (!ASN1PEREncBits(enc, 1, (val)->o))
  827. return 0;
  828. if ((val)->o[0] & 0x80) {
  829. if (!ASN1Enc_GroupIndicationOnRes_extensionRes(enc, &(val)->extensionRes))
  830. return 0;
  831. }
  832. return 1;
  833. }
  834. static int ASN1CALL ASN1Dec_GroupIndicationOnRes(ASN1decoding_t dec, GroupIndicationOnRes *val)
  835. {
  836. ASN1uint32_t y;
  837. if (!ASN1PERDecExtensionBit(dec, &y))
  838. return 0;
  839. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  840. return 0;
  841. if ((val)->o[0] & 0x80) {
  842. if (!ASN1Dec_GroupIndicationOnRes_extensionRes(dec, &(val)->extensionRes))
  843. return 0;
  844. }
  845. if (y) {
  846. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  847. return 0;
  848. }
  849. return 1;
  850. }
  851. static void ASN1CALL ASN1Free_GroupIndicationOnRes(GroupIndicationOnRes *val)
  852. {
  853. if (val) {
  854. if ((val)->o[0] & 0x80) {
  855. ASN1Free_GroupIndicationOnRes_extensionRes(&(val)->extensionRes);
  856. }
  857. }
  858. }
  859. static int ASN1CALL ASN1Enc_GroupIndicationOffRes(ASN1encoding_t enc, GroupIndicationOffRes *val)
  860. {
  861. if (!ASN1PEREncExtensionBitClear(enc))
  862. return 0;
  863. if (!ASN1PEREncBits(enc, 1, (val)->o))
  864. return 0;
  865. if ((val)->o[0] & 0x80) {
  866. if (!ASN1Enc_GroupIndicationOffRes_extensionRes(enc, &(val)->extensionRes))
  867. return 0;
  868. }
  869. return 1;
  870. }
  871. static int ASN1CALL ASN1Dec_GroupIndicationOffRes(ASN1decoding_t dec, GroupIndicationOffRes *val)
  872. {
  873. ASN1uint32_t y;
  874. if (!ASN1PERDecExtensionBit(dec, &y))
  875. return 0;
  876. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  877. return 0;
  878. if ((val)->o[0] & 0x80) {
  879. if (!ASN1Dec_GroupIndicationOffRes_extensionRes(dec, &(val)->extensionRes))
  880. return 0;
  881. }
  882. if (y) {
  883. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  884. return 0;
  885. }
  886. return 1;
  887. }
  888. static void ASN1CALL ASN1Free_GroupIndicationOffRes(GroupIndicationOffRes *val)
  889. {
  890. if (val) {
  891. if ((val)->o[0] & 0x80) {
  892. ASN1Free_GroupIndicationOffRes_extensionRes(&(val)->extensionRes);
  893. }
  894. }
  895. }
  896. static int ASN1CALL ASN1Enc_PickupRes(ASN1encoding_t enc, PickupRes *val)
  897. {
  898. if (!ASN1PEREncExtensionBitClear(enc))
  899. return 0;
  900. if (!ASN1PEREncBits(enc, 1, (val)->o))
  901. return 0;
  902. if ((val)->o[0] & 0x80) {
  903. if (!ASN1Enc_PickupRes_extensionRes(enc, &(val)->extensionRes))
  904. return 0;
  905. }
  906. return 1;
  907. }
  908. static int ASN1CALL ASN1Dec_PickupRes(ASN1decoding_t dec, PickupRes *val)
  909. {
  910. ASN1uint32_t y;
  911. if (!ASN1PERDecExtensionBit(dec, &y))
  912. return 0;
  913. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  914. return 0;
  915. if ((val)->o[0] & 0x80) {
  916. if (!ASN1Dec_PickupRes_extensionRes(dec, &(val)->extensionRes))
  917. return 0;
  918. }
  919. if (y) {
  920. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  921. return 0;
  922. }
  923. return 1;
  924. }
  925. static void ASN1CALL ASN1Free_PickupRes(PickupRes *val)
  926. {
  927. if (val) {
  928. if ((val)->o[0] & 0x80) {
  929. ASN1Free_PickupRes_extensionRes(&(val)->extensionRes);
  930. }
  931. }
  932. }
  933. static int ASN1CALL ASN1Enc_PickExeRes(ASN1encoding_t enc, PickExeRes *val)
  934. {
  935. if (!ASN1PEREncExtensionBitClear(enc))
  936. return 0;
  937. if (!ASN1PEREncBits(enc, 1, (val)->o))
  938. return 0;
  939. if ((val)->o[0] & 0x80) {
  940. if (!ASN1Enc_PickExeRes_extensionRes(enc, &(val)->extensionRes))
  941. return 0;
  942. }
  943. return 1;
  944. }
  945. static int ASN1CALL ASN1Dec_PickExeRes(ASN1decoding_t dec, PickExeRes *val)
  946. {
  947. ASN1uint32_t y;
  948. if (!ASN1PERDecExtensionBit(dec, &y))
  949. return 0;
  950. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  951. return 0;
  952. if ((val)->o[0] & 0x80) {
  953. if (!ASN1Dec_PickExeRes_extensionRes(dec, &(val)->extensionRes))
  954. return 0;
  955. }
  956. if (y) {
  957. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  958. return 0;
  959. }
  960. return 1;
  961. }
  962. static void ASN1CALL ASN1Free_PickExeRes(PickExeRes *val)
  963. {
  964. if (val) {
  965. if ((val)->o[0] & 0x80) {
  966. ASN1Free_PickExeRes_extensionRes(&(val)->extensionRes);
  967. }
  968. }
  969. }
  970. static int ASN1CALL ASN1Enc_UserSpecifiedSubaddress(ASN1encoding_t enc, UserSpecifiedSubaddress *val)
  971. {
  972. if (!ASN1PEREncExtensionBitClear(enc))
  973. return 0;
  974. if (!ASN1PEREncBits(enc, 1, (val)->o))
  975. return 0;
  976. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->subaddressInformation, 1, 20, 5))
  977. return 0;
  978. if ((val)->o[0] & 0x80) {
  979. if (!ASN1PEREncBoolean(enc, (val)->oddCountIndicator))
  980. return 0;
  981. }
  982. return 1;
  983. }
  984. static int ASN1CALL ASN1Dec_UserSpecifiedSubaddress(ASN1decoding_t dec, UserSpecifiedSubaddress *val)
  985. {
  986. ASN1uint32_t y;
  987. if (!ASN1PERDecExtensionBit(dec, &y))
  988. return 0;
  989. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  990. return 0;
  991. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->subaddressInformation, 1, 20, 5))
  992. return 0;
  993. if ((val)->o[0] & 0x80) {
  994. if (!ASN1PERDecBoolean(dec, &(val)->oddCountIndicator))
  995. return 0;
  996. }
  997. if (y) {
  998. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  999. return 0;
  1000. }
  1001. return 1;
  1002. }
  1003. static void ASN1CALL ASN1Free_UserSpecifiedSubaddress(UserSpecifiedSubaddress *val)
  1004. {
  1005. if (val) {
  1006. }
  1007. }
  1008. static int ASN1CALL ASN1Enc_CODE(ASN1encoding_t enc, CODE *val)
  1009. {
  1010. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1011. return 0;
  1012. switch ((val)->choice) {
  1013. case 1:
  1014. if (!ASN1PEREncInteger(enc, (val)->u.local))
  1015. return 0;
  1016. break;
  1017. case 2:
  1018. if (!ASN1PEREncObjectIdentifier(enc, &(val)->u.global))
  1019. return 0;
  1020. break;
  1021. default:
  1022. /* impossible */
  1023. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1024. return 0;
  1025. }
  1026. return 1;
  1027. }
  1028. static int ASN1CALL ASN1Dec_CODE(ASN1decoding_t dec, CODE *val)
  1029. {
  1030. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1031. return 0;
  1032. switch ((val)->choice) {
  1033. case 1:
  1034. if (!ASN1PERDecInteger(dec, &(val)->u.local))
  1035. return 0;
  1036. break;
  1037. case 2:
  1038. if (!ASN1PERDecObjectIdentifier(dec, &(val)->u.global))
  1039. return 0;
  1040. break;
  1041. default:
  1042. /* impossible */
  1043. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1044. return 0;
  1045. }
  1046. return 1;
  1047. }
  1048. static void ASN1CALL ASN1Free_CODE(CODE *val)
  1049. {
  1050. if (val) {
  1051. switch ((val)->choice) {
  1052. case 2:
  1053. ASN1objectidentifier_free(&(val)->u.global);
  1054. break;
  1055. }
  1056. }
  1057. }
  1058. static int ASN1CALL ASN1Enc_H221NonStandard(ASN1encoding_t enc, H221NonStandard *val)
  1059. {
  1060. if (!ASN1PEREncExtensionBitClear(enc))
  1061. return 0;
  1062. ASN1PEREncAlignment(enc);
  1063. if (!ASN1PEREncBitVal(enc, 8, (val)->t35CountryCode))
  1064. return 0;
  1065. ASN1PEREncAlignment(enc);
  1066. if (!ASN1PEREncBitVal(enc, 8, (val)->t35Extension))
  1067. return 0;
  1068. if (!ASN1PEREncUnsignedShort(enc, (val)->manufacturerCode))
  1069. return 0;
  1070. return 1;
  1071. }
  1072. static int ASN1CALL ASN1Dec_H221NonStandard(ASN1decoding_t dec, H221NonStandard *val)
  1073. {
  1074. ASN1uint32_t y;
  1075. if (!ASN1PERDecExtensionBit(dec, &y))
  1076. return 0;
  1077. ASN1PERDecAlignment(dec);
  1078. if (!ASN1PERDecU16Val(dec, 8, &(val)->t35CountryCode))
  1079. return 0;
  1080. ASN1PERDecAlignment(dec);
  1081. if (!ASN1PERDecU16Val(dec, 8, &(val)->t35Extension))
  1082. return 0;
  1083. if (!ASN1PERDecUnsignedShort(dec, &(val)->manufacturerCode))
  1084. return 0;
  1085. if (y) {
  1086. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1087. return 0;
  1088. }
  1089. return 1;
  1090. }
  1091. static int ASN1CALL ASN1Enc_H225NonStandardIdentifier(ASN1encoding_t enc, H225NonStandardIdentifier *val)
  1092. {
  1093. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  1094. return 0;
  1095. switch ((val)->choice) {
  1096. case 1:
  1097. if (!ASN1PEREncObjectIdentifier(enc, &(val)->u.object))
  1098. return 0;
  1099. break;
  1100. case 2:
  1101. if (!ASN1Enc_H221NonStandard(enc, &(val)->u.h221NonStandard))
  1102. return 0;
  1103. break;
  1104. default:
  1105. /* impossible */
  1106. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1107. return 0;
  1108. }
  1109. return 1;
  1110. }
  1111. static int ASN1CALL ASN1Dec_H225NonStandardIdentifier(ASN1decoding_t dec, H225NonStandardIdentifier *val)
  1112. {
  1113. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  1114. return 0;
  1115. switch ((val)->choice) {
  1116. case 1:
  1117. if (!ASN1PERDecObjectIdentifier(dec, &(val)->u.object))
  1118. return 0;
  1119. break;
  1120. case 2:
  1121. if (!ASN1Dec_H221NonStandard(dec, &(val)->u.h221NonStandard))
  1122. return 0;
  1123. break;
  1124. case 0:
  1125. /* extension case */
  1126. if (!ASN1PERDecSkipFragmented(dec, 8))
  1127. return 0;
  1128. break;
  1129. default:
  1130. /* impossible */
  1131. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1132. return 0;
  1133. }
  1134. return 1;
  1135. }
  1136. static void ASN1CALL ASN1Free_H225NonStandardIdentifier(H225NonStandardIdentifier *val)
  1137. {
  1138. if (val) {
  1139. switch ((val)->choice) {
  1140. case 1:
  1141. ASN1objectidentifier_free(&(val)->u.object);
  1142. break;
  1143. }
  1144. }
  1145. }
  1146. static int ASN1CALL ASN1Enc_PublicTypeOfNumber(ASN1encoding_t enc, PublicTypeOfNumber *val)
  1147. {
  1148. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  1149. return 0;
  1150. return 1;
  1151. }
  1152. static int ASN1CALL ASN1Dec_PublicTypeOfNumber(ASN1decoding_t dec, PublicTypeOfNumber *val)
  1153. {
  1154. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  1155. return 0;
  1156. return 1;
  1157. }
  1158. static int ASN1CALL ASN1Enc_PrivateTypeOfNumber(ASN1encoding_t enc, PrivateTypeOfNumber *val)
  1159. {
  1160. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  1161. return 0;
  1162. return 1;
  1163. }
  1164. static int ASN1CALL ASN1Dec_PrivateTypeOfNumber(ASN1decoding_t dec, PrivateTypeOfNumber *val)
  1165. {
  1166. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  1167. return 0;
  1168. return 1;
  1169. }
  1170. static int ASN1CALL ASN1Enc_CallIdentifier(ASN1encoding_t enc, CallIdentifier *val)
  1171. {
  1172. if (!ASN1PEREncExtensionBitClear(enc))
  1173. return 0;
  1174. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->guid, 16))
  1175. return 0;
  1176. return 1;
  1177. }
  1178. static int ASN1CALL ASN1Dec_CallIdentifier(ASN1decoding_t dec, CallIdentifier *val)
  1179. {
  1180. ASN1uint32_t y;
  1181. if (!ASN1PERDecExtensionBit(dec, &y))
  1182. return 0;
  1183. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->guid, 16))
  1184. return 0;
  1185. if (y) {
  1186. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1187. return 0;
  1188. }
  1189. return 1;
  1190. }
  1191. static void ASN1CALL ASN1Free_CallIdentifier(CallIdentifier *val)
  1192. {
  1193. if (val) {
  1194. }
  1195. }
  1196. static int ASN1CALL ASN1Enc_ReturnResult_result(ASN1encoding_t enc, ReturnResult_result *val)
  1197. {
  1198. if (!ASN1Enc_CODE(enc, &(val)->opcode))
  1199. return 0;
  1200. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->result))
  1201. return 0;
  1202. return 1;
  1203. }
  1204. static int ASN1CALL ASN1Dec_ReturnResult_result(ASN1decoding_t dec, ReturnResult_result *val)
  1205. {
  1206. if (!ASN1Dec_CODE(dec, &(val)->opcode))
  1207. return 0;
  1208. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->result))
  1209. return 0;
  1210. return 1;
  1211. }
  1212. static void ASN1CALL ASN1Free_ReturnResult_result(ReturnResult_result *val)
  1213. {
  1214. if (val) {
  1215. ASN1Free_CODE(&(val)->opcode);
  1216. ASN1octetstring_free(&(val)->result);
  1217. }
  1218. }
  1219. static int ASN1CALL ASN1Enc_Invoke(ASN1encoding_t enc, Invoke *val)
  1220. {
  1221. if (!ASN1PEREncBits(enc, 2, (val)->o))
  1222. return 0;
  1223. if (!ASN1PEREncUnsignedShort(enc, (val)->invokeId))
  1224. return 0;
  1225. if ((val)->o[0] & 0x80) {
  1226. if (!ASN1PEREncInteger(enc, (val)->linkedId))
  1227. return 0;
  1228. }
  1229. if (!ASN1Enc_CODE(enc, &(val)->opcode))
  1230. return 0;
  1231. if ((val)->o[0] & 0x40) {
  1232. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->argument))
  1233. return 0;
  1234. }
  1235. return 1;
  1236. }
  1237. static int ASN1CALL ASN1Dec_Invoke(ASN1decoding_t dec, Invoke *val)
  1238. {
  1239. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  1240. return 0;
  1241. if (!ASN1PERDecUnsignedShort(dec, &(val)->invokeId))
  1242. return 0;
  1243. if ((val)->o[0] & 0x80) {
  1244. if (!ASN1PERDecInteger(dec, &(val)->linkedId))
  1245. return 0;
  1246. }
  1247. if (!ASN1Dec_CODE(dec, &(val)->opcode))
  1248. return 0;
  1249. if ((val)->o[0] & 0x40) {
  1250. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->argument))
  1251. return 0;
  1252. }
  1253. return 1;
  1254. }
  1255. static void ASN1CALL ASN1Free_Invoke(Invoke *val)
  1256. {
  1257. if (val) {
  1258. ASN1Free_CODE(&(val)->opcode);
  1259. if ((val)->o[0] & 0x40) {
  1260. ASN1octetstring_free(&(val)->argument);
  1261. }
  1262. }
  1263. }
  1264. static int ASN1CALL ASN1Enc_ReturnResult(ASN1encoding_t enc, ReturnResult *val)
  1265. {
  1266. if (!ASN1PEREncBits(enc, 1, (val)->o))
  1267. return 0;
  1268. if (!ASN1PEREncInteger(enc, (val)->invokeId))
  1269. return 0;
  1270. if ((val)->o[0] & 0x80) {
  1271. if (!ASN1Enc_ReturnResult_result(enc, &(val)->result))
  1272. return 0;
  1273. }
  1274. return 1;
  1275. }
  1276. static int ASN1CALL ASN1Dec_ReturnResult(ASN1decoding_t dec, ReturnResult *val)
  1277. {
  1278. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  1279. return 0;
  1280. if (!ASN1PERDecInteger(dec, &(val)->invokeId))
  1281. return 0;
  1282. if ((val)->o[0] & 0x80) {
  1283. if (!ASN1Dec_ReturnResult_result(dec, &(val)->result))
  1284. return 0;
  1285. }
  1286. return 1;
  1287. }
  1288. static void ASN1CALL ASN1Free_ReturnResult(ReturnResult *val)
  1289. {
  1290. if (val) {
  1291. if ((val)->o[0] & 0x80) {
  1292. ASN1Free_ReturnResult_result(&(val)->result);
  1293. }
  1294. }
  1295. }
  1296. static int ASN1CALL ASN1Enc_ReturnError(ASN1encoding_t enc, ReturnError *val)
  1297. {
  1298. if (!ASN1PEREncBits(enc, 1, (val)->o))
  1299. return 0;
  1300. if (!ASN1PEREncInteger(enc, (val)->invokeId))
  1301. return 0;
  1302. if (!ASN1Enc_CODE(enc, &(val)->errcode))
  1303. return 0;
  1304. if ((val)->o[0] & 0x80) {
  1305. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->parameter))
  1306. return 0;
  1307. }
  1308. return 1;
  1309. }
  1310. static int ASN1CALL ASN1Dec_ReturnError(ASN1decoding_t dec, ReturnError *val)
  1311. {
  1312. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  1313. return 0;
  1314. if (!ASN1PERDecInteger(dec, &(val)->invokeId))
  1315. return 0;
  1316. if (!ASN1Dec_CODE(dec, &(val)->errcode))
  1317. return 0;
  1318. if ((val)->o[0] & 0x80) {
  1319. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->parameter))
  1320. return 0;
  1321. }
  1322. return 1;
  1323. }
  1324. static void ASN1CALL ASN1Free_ReturnError(ReturnError *val)
  1325. {
  1326. if (val) {
  1327. ASN1Free_CODE(&(val)->errcode);
  1328. if ((val)->o[0] & 0x80) {
  1329. ASN1octetstring_free(&(val)->parameter);
  1330. }
  1331. }
  1332. }
  1333. static int ASN1CALL ASN1Enc_ExtensionSeq(ASN1encoding_t enc, PExtensionSeq *val)
  1334. {
  1335. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_ExtensionSeq_ElmFn);
  1336. }
  1337. static int ASN1CALL ASN1Enc_ExtensionSeq_ElmFn(ASN1encoding_t enc, PExtensionSeq val)
  1338. {
  1339. if (!ASN1Enc_EXTENSION(enc, &val->value))
  1340. return 0;
  1341. return 1;
  1342. }
  1343. static int ASN1CALL ASN1Dec_ExtensionSeq(ASN1decoding_t dec, PExtensionSeq *val)
  1344. {
  1345. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_ExtensionSeq_ElmFn, sizeof(**val));
  1346. }
  1347. static int ASN1CALL ASN1Dec_ExtensionSeq_ElmFn(ASN1decoding_t dec, PExtensionSeq val)
  1348. {
  1349. if (!ASN1Dec_EXTENSION(dec, &val->value))
  1350. return 0;
  1351. return 1;
  1352. }
  1353. static void ASN1CALL ASN1Free_ExtensionSeq(PExtensionSeq *val)
  1354. {
  1355. if (val) {
  1356. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_ExtensionSeq_ElmFn);
  1357. }
  1358. }
  1359. static void ASN1CALL ASN1Free_ExtensionSeq_ElmFn(PExtensionSeq val)
  1360. {
  1361. if (val) {
  1362. ASN1Free_EXTENSION(&val->value);
  1363. }
  1364. }
  1365. static int ASN1CALL ASN1Enc_PickrequRes(ASN1encoding_t enc, PickrequRes *val)
  1366. {
  1367. if (!ASN1PEREncExtensionBitClear(enc))
  1368. return 0;
  1369. if (!ASN1PEREncBits(enc, 1, (val)->o))
  1370. return 0;
  1371. if (!ASN1Enc_CallIdentifier(enc, &(val)->callPickupId))
  1372. return 0;
  1373. if ((val)->o[0] & 0x80) {
  1374. if (!ASN1Enc_PickrequRes_extensionRes(enc, &(val)->extensionRes))
  1375. return 0;
  1376. }
  1377. return 1;
  1378. }
  1379. static int ASN1CALL ASN1Dec_PickrequRes(ASN1decoding_t dec, PickrequRes *val)
  1380. {
  1381. ASN1uint32_t y;
  1382. if (!ASN1PERDecExtensionBit(dec, &y))
  1383. return 0;
  1384. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  1385. return 0;
  1386. if (!ASN1Dec_CallIdentifier(dec, &(val)->callPickupId))
  1387. return 0;
  1388. if ((val)->o[0] & 0x80) {
  1389. if (!ASN1Dec_PickrequRes_extensionRes(dec, &(val)->extensionRes))
  1390. return 0;
  1391. }
  1392. if (y) {
  1393. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1394. return 0;
  1395. }
  1396. return 1;
  1397. }
  1398. static void ASN1CALL ASN1Free_PickrequRes(PickrequRes *val)
  1399. {
  1400. if (val) {
  1401. ASN1Free_CallIdentifier(&(val)->callPickupId);
  1402. if ((val)->o[0] & 0x80) {
  1403. ASN1Free_PickrequRes_extensionRes(&(val)->extensionRes);
  1404. }
  1405. }
  1406. }
  1407. static int ASN1CALL ASN1Enc_PartySubaddress(ASN1encoding_t enc, PartySubaddress *val)
  1408. {
  1409. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  1410. return 0;
  1411. switch ((val)->choice) {
  1412. case 1:
  1413. if (!ASN1Enc_UserSpecifiedSubaddress(enc, &(val)->u.userSpecifiedSubaddress))
  1414. return 0;
  1415. break;
  1416. case 2:
  1417. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->u.nsapSubaddress, 1, 20, 5))
  1418. return 0;
  1419. break;
  1420. default:
  1421. /* impossible */
  1422. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1423. return 0;
  1424. }
  1425. return 1;
  1426. }
  1427. static int ASN1CALL ASN1Dec_PartySubaddress(ASN1decoding_t dec, PartySubaddress *val)
  1428. {
  1429. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  1430. return 0;
  1431. switch ((val)->choice) {
  1432. case 1:
  1433. if (!ASN1Dec_UserSpecifiedSubaddress(dec, &(val)->u.userSpecifiedSubaddress))
  1434. return 0;
  1435. break;
  1436. case 2:
  1437. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->u.nsapSubaddress, 1, 20, 5))
  1438. return 0;
  1439. break;
  1440. case 0:
  1441. /* extension case */
  1442. if (!ASN1PERDecSkipFragmented(dec, 8))
  1443. return 0;
  1444. break;
  1445. default:
  1446. /* impossible */
  1447. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1448. return 0;
  1449. }
  1450. return 1;
  1451. }
  1452. static void ASN1CALL ASN1Free_PartySubaddress(PartySubaddress *val)
  1453. {
  1454. if (val) {
  1455. switch ((val)->choice) {
  1456. case 1:
  1457. ASN1Free_UserSpecifiedSubaddress(&(val)->u.userSpecifiedSubaddress);
  1458. break;
  1459. case 2:
  1460. break;
  1461. }
  1462. }
  1463. }
  1464. static int ASN1CALL ASN1Enc_H225NonStandardParameter(ASN1encoding_t enc, H225NonStandardParameter *val)
  1465. {
  1466. if (!ASN1Enc_H225NonStandardIdentifier(enc, &(val)->nonStandardIdentifier))
  1467. return 0;
  1468. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->data))
  1469. return 0;
  1470. return 1;
  1471. }
  1472. static int ASN1CALL ASN1Dec_H225NonStandardParameter(ASN1decoding_t dec, H225NonStandardParameter *val)
  1473. {
  1474. if (!ASN1Dec_H225NonStandardIdentifier(dec, &(val)->nonStandardIdentifier))
  1475. return 0;
  1476. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->data))
  1477. return 0;
  1478. return 1;
  1479. }
  1480. static void ASN1CALL ASN1Free_H225NonStandardParameter(H225NonStandardParameter *val)
  1481. {
  1482. if (val) {
  1483. ASN1Free_H225NonStandardIdentifier(&(val)->nonStandardIdentifier);
  1484. ASN1octetstring_free(&(val)->data);
  1485. }
  1486. }
  1487. static ASN1stringtableentry_t PublicPartyNumber_publicNumberDigits_StringTableEntries[] = {
  1488. { 35, 35, 0 }, { 42, 42, 1 }, { 44, 44, 2 },
  1489. { 48, 57, 3 },
  1490. };
  1491. static ASN1stringtable_t PublicPartyNumber_publicNumberDigits_StringTable = {
  1492. 4, PublicPartyNumber_publicNumberDigits_StringTableEntries
  1493. };
  1494. static int ASN1CALL ASN1Enc_PublicPartyNumber(ASN1encoding_t enc, PublicPartyNumber *val)
  1495. {
  1496. ASN1uint32_t t;
  1497. if (!ASN1Enc_PublicTypeOfNumber(enc, &(val)->publicTypeOfNumber))
  1498. return 0;
  1499. t = lstrlenA((val)->publicNumberDigits);
  1500. if (!ASN1PEREncBitVal(enc, 7, t - 1))
  1501. return 0;
  1502. ASN1PEREncAlignment(enc);
  1503. if (!ASN1PEREncTableCharString(enc, t, (val)->publicNumberDigits, 4, &PublicPartyNumber_publicNumberDigits_StringTable))
  1504. return 0;
  1505. return 1;
  1506. }
  1507. static int ASN1CALL ASN1Dec_PublicPartyNumber(ASN1decoding_t dec, PublicPartyNumber *val)
  1508. {
  1509. ASN1uint32_t l;
  1510. if (!ASN1Dec_PublicTypeOfNumber(dec, &(val)->publicTypeOfNumber))
  1511. return 0;
  1512. if (!ASN1PERDecU32Val(dec, 7, &l))
  1513. return 0;
  1514. l += 1;
  1515. ASN1PERDecAlignment(dec);
  1516. //NikhilB: Fix for the overflow bug 03/02/27
  1517. if ( l >= sizeof((val)->publicNumberDigits) ) {
  1518. ASN1DecSetError(dec, ASN1_ERR_LARGE);
  1519. return 0;
  1520. }
  1521. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->publicNumberDigits, 4, &PublicPartyNumber_publicNumberDigits_StringTable))
  1522. return 0;
  1523. return 1;
  1524. }
  1525. static void ASN1CALL ASN1Free_PublicPartyNumber(PublicPartyNumber *val)
  1526. {
  1527. if (val) {
  1528. }
  1529. }
  1530. static ASN1stringtableentry_t PrivatePartyNumber_privateNumberDigits_StringTableEntries[] = {
  1531. { 35, 35, 0 }, { 42, 42, 1 }, { 44, 44, 2 },
  1532. { 48, 57, 3 },
  1533. };
  1534. static ASN1stringtable_t PrivatePartyNumber_privateNumberDigits_StringTable = {
  1535. 4, PrivatePartyNumber_privateNumberDigits_StringTableEntries
  1536. };
  1537. static int ASN1CALL ASN1Enc_PrivatePartyNumber(ASN1encoding_t enc, PrivatePartyNumber *val)
  1538. {
  1539. ASN1uint32_t t;
  1540. if (!ASN1Enc_PrivateTypeOfNumber(enc, &(val)->privateTypeOfNumber))
  1541. return 0;
  1542. t = lstrlenA((val)->privateNumberDigits);
  1543. if (!ASN1PEREncBitVal(enc, 7, t - 1))
  1544. return 0;
  1545. ASN1PEREncAlignment(enc);
  1546. if (!ASN1PEREncTableCharString(enc, t, (val)->privateNumberDigits, 4, &PrivatePartyNumber_privateNumberDigits_StringTable))
  1547. return 0;
  1548. return 1;
  1549. }
  1550. static int ASN1CALL ASN1Dec_PrivatePartyNumber(ASN1decoding_t dec, PrivatePartyNumber *val)
  1551. {
  1552. ASN1uint32_t l;
  1553. if (!ASN1Dec_PrivateTypeOfNumber(dec, &(val)->privateTypeOfNumber))
  1554. return 0;
  1555. if (!ASN1PERDecU32Val(dec, 7, &l))
  1556. return 0;
  1557. l += 1;
  1558. ASN1PERDecAlignment(dec);
  1559. //NikhilB: Fix for the overflow bug 03/02/27
  1560. if ( l >= sizeof((val)->privateNumberDigits) ) {
  1561. ASN1DecSetError(dec, ASN1_ERR_LARGE);
  1562. return 0;
  1563. }
  1564. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->privateNumberDigits, 4, &PrivatePartyNumber_privateNumberDigits_StringTable))
  1565. return 0;
  1566. return 1;
  1567. }
  1568. static void ASN1CALL ASN1Free_PrivatePartyNumber(PrivatePartyNumber *val)
  1569. {
  1570. if (val) {
  1571. }
  1572. }
  1573. static int ASN1CALL ASN1Enc_TransportAddress(ASN1encoding_t enc, TransportAddress *val)
  1574. {
  1575. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  1576. return 0;
  1577. switch ((val)->choice) {
  1578. case 1:
  1579. if (!ASN1Enc_TransportAddress_ipAddress(enc, &(val)->u.ipAddress))
  1580. return 0;
  1581. break;
  1582. case 2:
  1583. if (!ASN1Enc_TransportAddress_ipSourceRoute(enc, &(val)->u.ipSourceRoute))
  1584. return 0;
  1585. break;
  1586. case 3:
  1587. if (!ASN1Enc_TransportAddress_ipxAddress(enc, &(val)->u.ipxAddress))
  1588. return 0;
  1589. break;
  1590. case 4:
  1591. if (!ASN1Enc_TransportAddress_ip6Address(enc, &(val)->u.ip6Address))
  1592. return 0;
  1593. break;
  1594. case 5:
  1595. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->u.netBios, 16))
  1596. return 0;
  1597. break;
  1598. case 6:
  1599. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->u.nsap, 1, 20, 5))
  1600. return 0;
  1601. break;
  1602. case 7:
  1603. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardAddress))
  1604. return 0;
  1605. break;
  1606. default:
  1607. /* impossible */
  1608. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1609. return 0;
  1610. }
  1611. return 1;
  1612. }
  1613. static int ASN1CALL ASN1Dec_TransportAddress(ASN1decoding_t dec, TransportAddress *val)
  1614. {
  1615. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  1616. return 0;
  1617. switch ((val)->choice) {
  1618. case 1:
  1619. if (!ASN1Dec_TransportAddress_ipAddress(dec, &(val)->u.ipAddress))
  1620. return 0;
  1621. break;
  1622. case 2:
  1623. if (!ASN1Dec_TransportAddress_ipSourceRoute(dec, &(val)->u.ipSourceRoute))
  1624. return 0;
  1625. break;
  1626. case 3:
  1627. if (!ASN1Dec_TransportAddress_ipxAddress(dec, &(val)->u.ipxAddress))
  1628. return 0;
  1629. break;
  1630. case 4:
  1631. if (!ASN1Dec_TransportAddress_ip6Address(dec, &(val)->u.ip6Address))
  1632. return 0;
  1633. break;
  1634. case 5:
  1635. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->u.netBios, 16))
  1636. return 0;
  1637. break;
  1638. case 6:
  1639. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->u.nsap, 1, 20, 5))
  1640. return 0;
  1641. break;
  1642. case 7:
  1643. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardAddress))
  1644. return 0;
  1645. break;
  1646. case 0:
  1647. /* extension case */
  1648. if (!ASN1PERDecSkipFragmented(dec, 8))
  1649. return 0;
  1650. break;
  1651. default:
  1652. /* impossible */
  1653. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1654. return 0;
  1655. }
  1656. return 1;
  1657. }
  1658. static void ASN1CALL ASN1Free_TransportAddress(TransportAddress *val)
  1659. {
  1660. if (val) {
  1661. switch ((val)->choice) {
  1662. case 1:
  1663. ASN1Free_TransportAddress_ipAddress(&(val)->u.ipAddress);
  1664. break;
  1665. case 2:
  1666. ASN1Free_TransportAddress_ipSourceRoute(&(val)->u.ipSourceRoute);
  1667. break;
  1668. case 3:
  1669. ASN1Free_TransportAddress_ipxAddress(&(val)->u.ipxAddress);
  1670. break;
  1671. case 4:
  1672. ASN1Free_TransportAddress_ip6Address(&(val)->u.ip6Address);
  1673. break;
  1674. case 5:
  1675. break;
  1676. case 6:
  1677. break;
  1678. case 7:
  1679. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardAddress);
  1680. break;
  1681. }
  1682. }
  1683. }
  1684. static int ASN1CALL ASN1Enc_CTActiveArg_argumentExtension(ASN1encoding_t enc, CTActiveArg_argumentExtension *val)
  1685. {
  1686. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1687. return 0;
  1688. switch ((val)->choice) {
  1689. case 1:
  1690. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  1691. return 0;
  1692. break;
  1693. case 2:
  1694. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  1695. return 0;
  1696. break;
  1697. default:
  1698. /* impossible */
  1699. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1700. return 0;
  1701. }
  1702. return 1;
  1703. }
  1704. static int ASN1CALL ASN1Dec_CTActiveArg_argumentExtension(ASN1decoding_t dec, CTActiveArg_argumentExtension *val)
  1705. {
  1706. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1707. return 0;
  1708. switch ((val)->choice) {
  1709. case 1:
  1710. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  1711. return 0;
  1712. break;
  1713. case 2:
  1714. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  1715. return 0;
  1716. break;
  1717. default:
  1718. /* impossible */
  1719. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1720. return 0;
  1721. }
  1722. return 1;
  1723. }
  1724. static void ASN1CALL ASN1Free_CTActiveArg_argumentExtension(CTActiveArg_argumentExtension *val)
  1725. {
  1726. if (val) {
  1727. switch ((val)->choice) {
  1728. case 1:
  1729. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  1730. break;
  1731. case 2:
  1732. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  1733. break;
  1734. }
  1735. }
  1736. }
  1737. static int ASN1CALL ASN1Enc_CTCompleteArg_argumentExtension(ASN1encoding_t enc, CTCompleteArg_argumentExtension *val)
  1738. {
  1739. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1740. return 0;
  1741. switch ((val)->choice) {
  1742. case 1:
  1743. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  1744. return 0;
  1745. break;
  1746. case 2:
  1747. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  1748. return 0;
  1749. break;
  1750. default:
  1751. /* impossible */
  1752. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1753. return 0;
  1754. }
  1755. return 1;
  1756. }
  1757. static int ASN1CALL ASN1Dec_CTCompleteArg_argumentExtension(ASN1decoding_t dec, CTCompleteArg_argumentExtension *val)
  1758. {
  1759. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1760. return 0;
  1761. switch ((val)->choice) {
  1762. case 1:
  1763. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  1764. return 0;
  1765. break;
  1766. case 2:
  1767. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  1768. return 0;
  1769. break;
  1770. default:
  1771. /* impossible */
  1772. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1773. return 0;
  1774. }
  1775. return 1;
  1776. }
  1777. static void ASN1CALL ASN1Free_CTCompleteArg_argumentExtension(CTCompleteArg_argumentExtension *val)
  1778. {
  1779. if (val) {
  1780. switch ((val)->choice) {
  1781. case 1:
  1782. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  1783. break;
  1784. case 2:
  1785. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  1786. break;
  1787. }
  1788. }
  1789. }
  1790. static int ASN1CALL ASN1Enc_SubaddressTransferArg_argumentExtension(ASN1encoding_t enc, SubaddressTransferArg_argumentExtension *val)
  1791. {
  1792. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1793. return 0;
  1794. switch ((val)->choice) {
  1795. case 1:
  1796. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  1797. return 0;
  1798. break;
  1799. case 2:
  1800. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  1801. return 0;
  1802. break;
  1803. default:
  1804. /* impossible */
  1805. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1806. return 0;
  1807. }
  1808. return 1;
  1809. }
  1810. static int ASN1CALL ASN1Dec_SubaddressTransferArg_argumentExtension(ASN1decoding_t dec, SubaddressTransferArg_argumentExtension *val)
  1811. {
  1812. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1813. return 0;
  1814. switch ((val)->choice) {
  1815. case 1:
  1816. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  1817. return 0;
  1818. break;
  1819. case 2:
  1820. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  1821. return 0;
  1822. break;
  1823. default:
  1824. /* impossible */
  1825. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1826. return 0;
  1827. }
  1828. return 1;
  1829. }
  1830. static void ASN1CALL ASN1Free_SubaddressTransferArg_argumentExtension(SubaddressTransferArg_argumentExtension *val)
  1831. {
  1832. if (val) {
  1833. switch ((val)->choice) {
  1834. case 1:
  1835. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  1836. break;
  1837. case 2:
  1838. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  1839. break;
  1840. }
  1841. }
  1842. }
  1843. static int ASN1CALL ASN1Enc_CTUpdateArg_argumentExtension(ASN1encoding_t enc, CTUpdateArg_argumentExtension *val)
  1844. {
  1845. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1846. return 0;
  1847. switch ((val)->choice) {
  1848. case 1:
  1849. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  1850. return 0;
  1851. break;
  1852. case 2:
  1853. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  1854. return 0;
  1855. break;
  1856. default:
  1857. /* impossible */
  1858. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1859. return 0;
  1860. }
  1861. return 1;
  1862. }
  1863. static int ASN1CALL ASN1Dec_CTUpdateArg_argumentExtension(ASN1decoding_t dec, CTUpdateArg_argumentExtension *val)
  1864. {
  1865. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1866. return 0;
  1867. switch ((val)->choice) {
  1868. case 1:
  1869. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  1870. return 0;
  1871. break;
  1872. case 2:
  1873. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  1874. return 0;
  1875. break;
  1876. default:
  1877. /* impossible */
  1878. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1879. return 0;
  1880. }
  1881. return 1;
  1882. }
  1883. static void ASN1CALL ASN1Free_CTUpdateArg_argumentExtension(CTUpdateArg_argumentExtension *val)
  1884. {
  1885. if (val) {
  1886. switch ((val)->choice) {
  1887. case 1:
  1888. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  1889. break;
  1890. case 2:
  1891. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  1892. break;
  1893. }
  1894. }
  1895. }
  1896. static int ASN1CALL ASN1Enc_CTIdentifyRes_resultExtension(ASN1encoding_t enc, CTIdentifyRes_resultExtension *val)
  1897. {
  1898. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1899. return 0;
  1900. switch ((val)->choice) {
  1901. case 1:
  1902. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  1903. return 0;
  1904. break;
  1905. case 2:
  1906. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  1907. return 0;
  1908. break;
  1909. default:
  1910. /* impossible */
  1911. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1912. return 0;
  1913. }
  1914. return 1;
  1915. }
  1916. static int ASN1CALL ASN1Dec_CTIdentifyRes_resultExtension(ASN1decoding_t dec, CTIdentifyRes_resultExtension *val)
  1917. {
  1918. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1919. return 0;
  1920. switch ((val)->choice) {
  1921. case 1:
  1922. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  1923. return 0;
  1924. break;
  1925. case 2:
  1926. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  1927. return 0;
  1928. break;
  1929. default:
  1930. /* impossible */
  1931. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1932. return 0;
  1933. }
  1934. return 1;
  1935. }
  1936. static void ASN1CALL ASN1Free_CTIdentifyRes_resultExtension(CTIdentifyRes_resultExtension *val)
  1937. {
  1938. if (val) {
  1939. switch ((val)->choice) {
  1940. case 1:
  1941. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  1942. break;
  1943. case 2:
  1944. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  1945. break;
  1946. }
  1947. }
  1948. }
  1949. static int ASN1CALL ASN1Enc_CTSetupArg_argumentExtension(ASN1encoding_t enc, CTSetupArg_argumentExtension *val)
  1950. {
  1951. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1952. return 0;
  1953. switch ((val)->choice) {
  1954. case 1:
  1955. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  1956. return 0;
  1957. break;
  1958. case 2:
  1959. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  1960. return 0;
  1961. break;
  1962. default:
  1963. /* impossible */
  1964. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1965. return 0;
  1966. }
  1967. return 1;
  1968. }
  1969. static int ASN1CALL ASN1Dec_CTSetupArg_argumentExtension(ASN1decoding_t dec, CTSetupArg_argumentExtension *val)
  1970. {
  1971. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1972. return 0;
  1973. switch ((val)->choice) {
  1974. case 1:
  1975. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  1976. return 0;
  1977. break;
  1978. case 2:
  1979. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  1980. return 0;
  1981. break;
  1982. default:
  1983. /* impossible */
  1984. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1985. return 0;
  1986. }
  1987. return 1;
  1988. }
  1989. static void ASN1CALL ASN1Free_CTSetupArg_argumentExtension(CTSetupArg_argumentExtension *val)
  1990. {
  1991. if (val) {
  1992. switch ((val)->choice) {
  1993. case 1:
  1994. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  1995. break;
  1996. case 2:
  1997. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  1998. break;
  1999. }
  2000. }
  2001. }
  2002. static int ASN1CALL ASN1Enc_CTInitiateArg_argumentExtension(ASN1encoding_t enc, CTInitiateArg_argumentExtension *val)
  2003. {
  2004. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2005. return 0;
  2006. switch ((val)->choice) {
  2007. case 1:
  2008. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2009. return 0;
  2010. break;
  2011. case 2:
  2012. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2013. return 0;
  2014. break;
  2015. default:
  2016. /* impossible */
  2017. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2018. return 0;
  2019. }
  2020. return 1;
  2021. }
  2022. static int ASN1CALL ASN1Dec_CTInitiateArg_argumentExtension(ASN1decoding_t dec, CTInitiateArg_argumentExtension *val)
  2023. {
  2024. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2025. return 0;
  2026. switch ((val)->choice) {
  2027. case 1:
  2028. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2029. return 0;
  2030. break;
  2031. case 2:
  2032. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2033. return 0;
  2034. break;
  2035. default:
  2036. /* impossible */
  2037. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2038. return 0;
  2039. }
  2040. return 1;
  2041. }
  2042. static void ASN1CALL ASN1Free_CTInitiateArg_argumentExtension(CTInitiateArg_argumentExtension *val)
  2043. {
  2044. if (val) {
  2045. switch ((val)->choice) {
  2046. case 1:
  2047. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2048. break;
  2049. case 2:
  2050. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2051. break;
  2052. }
  2053. }
  2054. }
  2055. static int ASN1CALL ASN1Enc_IntResult_extension(ASN1encoding_t enc, IntResult_extension *val)
  2056. {
  2057. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2058. return 0;
  2059. switch ((val)->choice) {
  2060. case 1:
  2061. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2062. return 0;
  2063. break;
  2064. case 2:
  2065. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2066. return 0;
  2067. break;
  2068. default:
  2069. /* impossible */
  2070. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2071. return 0;
  2072. }
  2073. return 1;
  2074. }
  2075. static int ASN1CALL ASN1Dec_IntResult_extension(ASN1decoding_t dec, IntResult_extension *val)
  2076. {
  2077. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2078. return 0;
  2079. switch ((val)->choice) {
  2080. case 1:
  2081. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2082. return 0;
  2083. break;
  2084. case 2:
  2085. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2086. return 0;
  2087. break;
  2088. default:
  2089. /* impossible */
  2090. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2091. return 0;
  2092. }
  2093. return 1;
  2094. }
  2095. static void ASN1CALL ASN1Free_IntResult_extension(IntResult_extension *val)
  2096. {
  2097. if (val) {
  2098. switch ((val)->choice) {
  2099. case 1:
  2100. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2101. break;
  2102. case 2:
  2103. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2104. break;
  2105. }
  2106. }
  2107. }
  2108. static int ASN1CALL ASN1Enc_DivertingLegInformation4Argument_extension(ASN1encoding_t enc, DivertingLegInformation4Argument_extension *val)
  2109. {
  2110. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2111. return 0;
  2112. switch ((val)->choice) {
  2113. case 1:
  2114. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2115. return 0;
  2116. break;
  2117. case 2:
  2118. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2119. return 0;
  2120. break;
  2121. default:
  2122. /* impossible */
  2123. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2124. return 0;
  2125. }
  2126. return 1;
  2127. }
  2128. static int ASN1CALL ASN1Dec_DivertingLegInformation4Argument_extension(ASN1decoding_t dec, DivertingLegInformation4Argument_extension *val)
  2129. {
  2130. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2131. return 0;
  2132. switch ((val)->choice) {
  2133. case 1:
  2134. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2135. return 0;
  2136. break;
  2137. case 2:
  2138. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2139. return 0;
  2140. break;
  2141. default:
  2142. /* impossible */
  2143. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2144. return 0;
  2145. }
  2146. return 1;
  2147. }
  2148. static void ASN1CALL ASN1Free_DivertingLegInformation4Argument_extension(DivertingLegInformation4Argument_extension *val)
  2149. {
  2150. if (val) {
  2151. switch ((val)->choice) {
  2152. case 1:
  2153. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2154. break;
  2155. case 2:
  2156. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2157. break;
  2158. }
  2159. }
  2160. }
  2161. static int ASN1CALL ASN1Enc_DivertingLegInformation3Argument_extension(ASN1encoding_t enc, DivertingLegInformation3Argument_extension *val)
  2162. {
  2163. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2164. return 0;
  2165. switch ((val)->choice) {
  2166. case 1:
  2167. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2168. return 0;
  2169. break;
  2170. case 2:
  2171. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2172. return 0;
  2173. break;
  2174. default:
  2175. /* impossible */
  2176. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2177. return 0;
  2178. }
  2179. return 1;
  2180. }
  2181. static int ASN1CALL ASN1Dec_DivertingLegInformation3Argument_extension(ASN1decoding_t dec, DivertingLegInformation3Argument_extension *val)
  2182. {
  2183. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2184. return 0;
  2185. switch ((val)->choice) {
  2186. case 1:
  2187. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2188. return 0;
  2189. break;
  2190. case 2:
  2191. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2192. return 0;
  2193. break;
  2194. default:
  2195. /* impossible */
  2196. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2197. return 0;
  2198. }
  2199. return 1;
  2200. }
  2201. static void ASN1CALL ASN1Free_DivertingLegInformation3Argument_extension(DivertingLegInformation3Argument_extension *val)
  2202. {
  2203. if (val) {
  2204. switch ((val)->choice) {
  2205. case 1:
  2206. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2207. break;
  2208. case 2:
  2209. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2210. break;
  2211. }
  2212. }
  2213. }
  2214. static int ASN1CALL ASN1Enc_DivertingLegInformation2Argument_extension(ASN1encoding_t enc, DivertingLegInformation2Argument_extension *val)
  2215. {
  2216. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2217. return 0;
  2218. switch ((val)->choice) {
  2219. case 1:
  2220. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2221. return 0;
  2222. break;
  2223. case 2:
  2224. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2225. return 0;
  2226. break;
  2227. default:
  2228. /* impossible */
  2229. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2230. return 0;
  2231. }
  2232. return 1;
  2233. }
  2234. static int ASN1CALL ASN1Dec_DivertingLegInformation2Argument_extension(ASN1decoding_t dec, DivertingLegInformation2Argument_extension *val)
  2235. {
  2236. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2237. return 0;
  2238. switch ((val)->choice) {
  2239. case 1:
  2240. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2241. return 0;
  2242. break;
  2243. case 2:
  2244. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2245. return 0;
  2246. break;
  2247. default:
  2248. /* impossible */
  2249. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2250. return 0;
  2251. }
  2252. return 1;
  2253. }
  2254. static void ASN1CALL ASN1Free_DivertingLegInformation2Argument_extension(DivertingLegInformation2Argument_extension *val)
  2255. {
  2256. if (val) {
  2257. switch ((val)->choice) {
  2258. case 1:
  2259. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2260. break;
  2261. case 2:
  2262. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2263. break;
  2264. }
  2265. }
  2266. }
  2267. static int ASN1CALL ASN1Enc_DivertingLegInformation1Argument_extension(ASN1encoding_t enc, DivertingLegInformation1Argument_extension *val)
  2268. {
  2269. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2270. return 0;
  2271. switch ((val)->choice) {
  2272. case 1:
  2273. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2274. return 0;
  2275. break;
  2276. case 2:
  2277. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2278. return 0;
  2279. break;
  2280. default:
  2281. /* impossible */
  2282. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2283. return 0;
  2284. }
  2285. return 1;
  2286. }
  2287. static int ASN1CALL ASN1Dec_DivertingLegInformation1Argument_extension(ASN1decoding_t dec, DivertingLegInformation1Argument_extension *val)
  2288. {
  2289. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2290. return 0;
  2291. switch ((val)->choice) {
  2292. case 1:
  2293. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2294. return 0;
  2295. break;
  2296. case 2:
  2297. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2298. return 0;
  2299. break;
  2300. default:
  2301. /* impossible */
  2302. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2303. return 0;
  2304. }
  2305. return 1;
  2306. }
  2307. static void ASN1CALL ASN1Free_DivertingLegInformation1Argument_extension(DivertingLegInformation1Argument_extension *val)
  2308. {
  2309. if (val) {
  2310. switch ((val)->choice) {
  2311. case 1:
  2312. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2313. break;
  2314. case 2:
  2315. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2316. break;
  2317. }
  2318. }
  2319. }
  2320. static int ASN1CALL ASN1Enc_CallReroutingArgument_extension(ASN1encoding_t enc, CallReroutingArgument_extension *val)
  2321. {
  2322. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2323. return 0;
  2324. switch ((val)->choice) {
  2325. case 1:
  2326. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2327. return 0;
  2328. break;
  2329. case 2:
  2330. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2331. return 0;
  2332. break;
  2333. default:
  2334. /* impossible */
  2335. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2336. return 0;
  2337. }
  2338. return 1;
  2339. }
  2340. static int ASN1CALL ASN1Dec_CallReroutingArgument_extension(ASN1decoding_t dec, CallReroutingArgument_extension *val)
  2341. {
  2342. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2343. return 0;
  2344. switch ((val)->choice) {
  2345. case 1:
  2346. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2347. return 0;
  2348. break;
  2349. case 2:
  2350. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2351. return 0;
  2352. break;
  2353. default:
  2354. /* impossible */
  2355. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2356. return 0;
  2357. }
  2358. return 1;
  2359. }
  2360. static void ASN1CALL ASN1Free_CallReroutingArgument_extension(CallReroutingArgument_extension *val)
  2361. {
  2362. if (val) {
  2363. switch ((val)->choice) {
  2364. case 1:
  2365. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2366. break;
  2367. case 2:
  2368. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2369. break;
  2370. }
  2371. }
  2372. }
  2373. static int ASN1CALL ASN1Enc_CheckRestrictionArgument_extension(ASN1encoding_t enc, CheckRestrictionArgument_extension *val)
  2374. {
  2375. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2376. return 0;
  2377. switch ((val)->choice) {
  2378. case 1:
  2379. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2380. return 0;
  2381. break;
  2382. case 2:
  2383. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2384. return 0;
  2385. break;
  2386. default:
  2387. /* impossible */
  2388. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2389. return 0;
  2390. }
  2391. return 1;
  2392. }
  2393. static int ASN1CALL ASN1Dec_CheckRestrictionArgument_extension(ASN1decoding_t dec, CheckRestrictionArgument_extension *val)
  2394. {
  2395. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2396. return 0;
  2397. switch ((val)->choice) {
  2398. case 1:
  2399. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2400. return 0;
  2401. break;
  2402. case 2:
  2403. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2404. return 0;
  2405. break;
  2406. default:
  2407. /* impossible */
  2408. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2409. return 0;
  2410. }
  2411. return 1;
  2412. }
  2413. static void ASN1CALL ASN1Free_CheckRestrictionArgument_extension(CheckRestrictionArgument_extension *val)
  2414. {
  2415. if (val) {
  2416. switch ((val)->choice) {
  2417. case 1:
  2418. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2419. break;
  2420. case 2:
  2421. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2422. break;
  2423. }
  2424. }
  2425. }
  2426. static int ASN1CALL ASN1Enc_InterrogateDiversionQArgument_extension(ASN1encoding_t enc, InterrogateDiversionQArgument_extension *val)
  2427. {
  2428. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2429. return 0;
  2430. switch ((val)->choice) {
  2431. case 1:
  2432. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2433. return 0;
  2434. break;
  2435. case 2:
  2436. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2437. return 0;
  2438. break;
  2439. default:
  2440. /* impossible */
  2441. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2442. return 0;
  2443. }
  2444. return 1;
  2445. }
  2446. static int ASN1CALL ASN1Dec_InterrogateDiversionQArgument_extension(ASN1decoding_t dec, InterrogateDiversionQArgument_extension *val)
  2447. {
  2448. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2449. return 0;
  2450. switch ((val)->choice) {
  2451. case 1:
  2452. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2453. return 0;
  2454. break;
  2455. case 2:
  2456. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2457. return 0;
  2458. break;
  2459. default:
  2460. /* impossible */
  2461. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2462. return 0;
  2463. }
  2464. return 1;
  2465. }
  2466. static void ASN1CALL ASN1Free_InterrogateDiversionQArgument_extension(InterrogateDiversionQArgument_extension *val)
  2467. {
  2468. if (val) {
  2469. switch ((val)->choice) {
  2470. case 1:
  2471. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2472. break;
  2473. case 2:
  2474. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2475. break;
  2476. }
  2477. }
  2478. }
  2479. static int ASN1CALL ASN1Enc_DeactivateDiversionQArgument_extension(ASN1encoding_t enc, DeactivateDiversionQArgument_extension *val)
  2480. {
  2481. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2482. return 0;
  2483. switch ((val)->choice) {
  2484. case 1:
  2485. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2486. return 0;
  2487. break;
  2488. case 2:
  2489. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2490. return 0;
  2491. break;
  2492. default:
  2493. /* impossible */
  2494. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2495. return 0;
  2496. }
  2497. return 1;
  2498. }
  2499. static int ASN1CALL ASN1Dec_DeactivateDiversionQArgument_extension(ASN1decoding_t dec, DeactivateDiversionQArgument_extension *val)
  2500. {
  2501. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2502. return 0;
  2503. switch ((val)->choice) {
  2504. case 1:
  2505. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2506. return 0;
  2507. break;
  2508. case 2:
  2509. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2510. return 0;
  2511. break;
  2512. default:
  2513. /* impossible */
  2514. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2515. return 0;
  2516. }
  2517. return 1;
  2518. }
  2519. static void ASN1CALL ASN1Free_DeactivateDiversionQArgument_extension(DeactivateDiversionQArgument_extension *val)
  2520. {
  2521. if (val) {
  2522. switch ((val)->choice) {
  2523. case 1:
  2524. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2525. break;
  2526. case 2:
  2527. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2528. break;
  2529. }
  2530. }
  2531. }
  2532. static int ASN1CALL ASN1Enc_ActivateDiversionQArgument_extension(ASN1encoding_t enc, ActivateDiversionQArgument_extension *val)
  2533. {
  2534. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2535. return 0;
  2536. switch ((val)->choice) {
  2537. case 1:
  2538. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2539. return 0;
  2540. break;
  2541. case 2:
  2542. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2543. return 0;
  2544. break;
  2545. default:
  2546. /* impossible */
  2547. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2548. return 0;
  2549. }
  2550. return 1;
  2551. }
  2552. static int ASN1CALL ASN1Dec_ActivateDiversionQArgument_extension(ASN1decoding_t dec, ActivateDiversionQArgument_extension *val)
  2553. {
  2554. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2555. return 0;
  2556. switch ((val)->choice) {
  2557. case 1:
  2558. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2559. return 0;
  2560. break;
  2561. case 2:
  2562. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2563. return 0;
  2564. break;
  2565. default:
  2566. /* impossible */
  2567. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2568. return 0;
  2569. }
  2570. return 1;
  2571. }
  2572. static void ASN1CALL ASN1Free_ActivateDiversionQArgument_extension(ActivateDiversionQArgument_extension *val)
  2573. {
  2574. if (val) {
  2575. switch ((val)->choice) {
  2576. case 1:
  2577. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2578. break;
  2579. case 2:
  2580. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2581. break;
  2582. }
  2583. }
  2584. }
  2585. static int ASN1CALL ASN1Enc_H4503ROS(ASN1encoding_t enc, H4503ROS *val)
  2586. {
  2587. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  2588. return 0;
  2589. switch ((val)->choice) {
  2590. case 1:
  2591. if (!ASN1Enc_Invoke(enc, &(val)->u.invoke))
  2592. return 0;
  2593. break;
  2594. case 2:
  2595. if (!ASN1Enc_ReturnResult(enc, &(val)->u.returnResult))
  2596. return 0;
  2597. break;
  2598. case 3:
  2599. if (!ASN1Enc_ReturnError(enc, &(val)->u.returnError))
  2600. return 0;
  2601. break;
  2602. case 4:
  2603. if (!ASN1Enc_Reject(enc, &(val)->u.reject))
  2604. return 0;
  2605. break;
  2606. default:
  2607. /* impossible */
  2608. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2609. return 0;
  2610. }
  2611. return 1;
  2612. }
  2613. static int ASN1CALL ASN1Dec_H4503ROS(ASN1decoding_t dec, H4503ROS *val)
  2614. {
  2615. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  2616. return 0;
  2617. switch ((val)->choice) {
  2618. case 1:
  2619. if (!ASN1Dec_Invoke(dec, &(val)->u.invoke))
  2620. return 0;
  2621. break;
  2622. case 2:
  2623. if (!ASN1Dec_ReturnResult(dec, &(val)->u.returnResult))
  2624. return 0;
  2625. break;
  2626. case 3:
  2627. if (!ASN1Dec_ReturnError(dec, &(val)->u.returnError))
  2628. return 0;
  2629. break;
  2630. case 4:
  2631. if (!ASN1Dec_Reject(dec, &(val)->u.reject))
  2632. return 0;
  2633. break;
  2634. default:
  2635. /* impossible */
  2636. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2637. return 0;
  2638. }
  2639. return 1;
  2640. }
  2641. static void ASN1CALL ASN1Free_H4503ROS(H4503ROS *val)
  2642. {
  2643. if (val) {
  2644. switch ((val)->choice) {
  2645. case 1:
  2646. ASN1Free_Invoke(&(val)->u.invoke);
  2647. break;
  2648. case 2:
  2649. ASN1Free_ReturnResult(&(val)->u.returnResult);
  2650. break;
  2651. case 3:
  2652. ASN1Free_ReturnError(&(val)->u.returnError);
  2653. break;
  2654. }
  2655. }
  2656. }
  2657. static int ASN1CALL ASN1Enc_DummyArg(ASN1encoding_t enc, DummyArg *val)
  2658. {
  2659. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2660. return 0;
  2661. switch ((val)->choice) {
  2662. case 1:
  2663. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2664. return 0;
  2665. break;
  2666. case 2:
  2667. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2668. return 0;
  2669. break;
  2670. default:
  2671. /* impossible */
  2672. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2673. return 0;
  2674. }
  2675. return 1;
  2676. }
  2677. static int ASN1CALL ASN1Dec_DummyArg(ASN1decoding_t dec, DummyArg *val)
  2678. {
  2679. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2680. return 0;
  2681. switch ((val)->choice) {
  2682. case 1:
  2683. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2684. return 0;
  2685. break;
  2686. case 2:
  2687. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2688. return 0;
  2689. break;
  2690. default:
  2691. /* impossible */
  2692. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2693. return 0;
  2694. }
  2695. return 1;
  2696. }
  2697. static void ASN1CALL ASN1Free_DummyArg(DummyArg *val)
  2698. {
  2699. if (val) {
  2700. switch ((val)->choice) {
  2701. case 1:
  2702. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2703. break;
  2704. case 2:
  2705. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2706. break;
  2707. }
  2708. }
  2709. }
  2710. static int ASN1CALL ASN1Enc_DummyRes(ASN1encoding_t enc, DummyRes *val)
  2711. {
  2712. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2713. return 0;
  2714. switch ((val)->choice) {
  2715. case 1:
  2716. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2717. return 0;
  2718. break;
  2719. case 2:
  2720. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2721. return 0;
  2722. break;
  2723. default:
  2724. /* impossible */
  2725. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2726. return 0;
  2727. }
  2728. return 1;
  2729. }
  2730. static int ASN1CALL ASN1Dec_DummyRes(ASN1decoding_t dec, DummyRes *val)
  2731. {
  2732. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2733. return 0;
  2734. switch ((val)->choice) {
  2735. case 1:
  2736. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2737. return 0;
  2738. break;
  2739. case 2:
  2740. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2741. return 0;
  2742. break;
  2743. default:
  2744. /* impossible */
  2745. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2746. return 0;
  2747. }
  2748. return 1;
  2749. }
  2750. static void ASN1CALL ASN1Free_DummyRes(DummyRes *val)
  2751. {
  2752. if (val) {
  2753. switch ((val)->choice) {
  2754. case 1:
  2755. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2756. break;
  2757. case 2:
  2758. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2759. break;
  2760. }
  2761. }
  2762. }
  2763. static int ASN1CALL ASN1Enc_SubaddressTransferArg(ASN1encoding_t enc, SubaddressTransferArg *val)
  2764. {
  2765. if (!ASN1PEREncExtensionBitClear(enc))
  2766. return 0;
  2767. if (!ASN1PEREncBits(enc, 1, (val)->o))
  2768. return 0;
  2769. if (!ASN1Enc_PartySubaddress(enc, &(val)->redirectionSubaddress))
  2770. return 0;
  2771. if ((val)->o[0] & 0x80) {
  2772. if (!ASN1Enc_SubaddressTransferArg_argumentExtension(enc, &(val)->argumentExtension))
  2773. return 0;
  2774. }
  2775. return 1;
  2776. }
  2777. static int ASN1CALL ASN1Dec_SubaddressTransferArg(ASN1decoding_t dec, SubaddressTransferArg *val)
  2778. {
  2779. ASN1uint32_t y;
  2780. if (!ASN1PERDecExtensionBit(dec, &y))
  2781. return 0;
  2782. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  2783. return 0;
  2784. if (!ASN1Dec_PartySubaddress(dec, &(val)->redirectionSubaddress))
  2785. return 0;
  2786. if ((val)->o[0] & 0x80) {
  2787. if (!ASN1Dec_SubaddressTransferArg_argumentExtension(dec, &(val)->argumentExtension))
  2788. return 0;
  2789. }
  2790. if (y) {
  2791. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2792. return 0;
  2793. }
  2794. return 1;
  2795. }
  2796. static void ASN1CALL ASN1Free_SubaddressTransferArg(SubaddressTransferArg *val)
  2797. {
  2798. if (val) {
  2799. ASN1Free_PartySubaddress(&(val)->redirectionSubaddress);
  2800. if ((val)->o[0] & 0x80) {
  2801. ASN1Free_SubaddressTransferArg_argumentExtension(&(val)->argumentExtension);
  2802. }
  2803. }
  2804. }
  2805. static int ASN1CALL ASN1Enc_MixedExtension(ASN1encoding_t enc, MixedExtension *val)
  2806. {
  2807. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2808. return 0;
  2809. switch ((val)->choice) {
  2810. case 1:
  2811. if (!ASN1Enc_ExtensionSeq(enc, &(val)->u.extensionSeq))
  2812. return 0;
  2813. break;
  2814. case 2:
  2815. if (!ASN1Enc_H225NonStandardParameter(enc, &(val)->u.nonStandardData))
  2816. return 0;
  2817. break;
  2818. default:
  2819. /* impossible */
  2820. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2821. return 0;
  2822. }
  2823. return 1;
  2824. }
  2825. static int ASN1CALL ASN1Dec_MixedExtension(ASN1decoding_t dec, MixedExtension *val)
  2826. {
  2827. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2828. return 0;
  2829. switch ((val)->choice) {
  2830. case 1:
  2831. if (!ASN1Dec_ExtensionSeq(dec, &(val)->u.extensionSeq))
  2832. return 0;
  2833. break;
  2834. case 2:
  2835. if (!ASN1Dec_H225NonStandardParameter(dec, &(val)->u.nonStandardData))
  2836. return 0;
  2837. break;
  2838. default:
  2839. /* impossible */
  2840. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2841. return 0;
  2842. }
  2843. return 1;
  2844. }
  2845. static void ASN1CALL ASN1Free_MixedExtension(MixedExtension *val)
  2846. {
  2847. if (val) {
  2848. switch ((val)->choice) {
  2849. case 1:
  2850. ASN1Free_ExtensionSeq(&(val)->u.extensionSeq);
  2851. break;
  2852. case 2:
  2853. ASN1Free_H225NonStandardParameter(&(val)->u.nonStandardData);
  2854. break;
  2855. }
  2856. }
  2857. }
  2858. static ASN1stringtableentry_t PartyNumber_dataPartyNumber_StringTableEntries[] = {
  2859. { 35, 35, 0 }, { 42, 42, 1 }, { 44, 44, 2 },
  2860. { 48, 57, 3 },
  2861. };
  2862. static ASN1stringtable_t PartyNumber_dataPartyNumber_StringTable = {
  2863. 4, PartyNumber_dataPartyNumber_StringTableEntries
  2864. };
  2865. static ASN1stringtableentry_t PartyNumber_telexPartyNumber_StringTableEntries[] = {
  2866. { 35, 35, 0 }, { 42, 42, 1 }, { 44, 44, 2 },
  2867. { 48, 57, 3 },
  2868. };
  2869. static ASN1stringtable_t PartyNumber_telexPartyNumber_StringTable = {
  2870. 4, PartyNumber_telexPartyNumber_StringTableEntries
  2871. };
  2872. static ASN1stringtableentry_t PartyNumber_nationalStandardPartyNumber_StringTableEntries[] = {
  2873. { 35, 35, 0 }, { 42, 42, 1 }, { 44, 44, 2 },
  2874. { 48, 57, 3 },
  2875. };
  2876. static ASN1stringtable_t PartyNumber_nationalStandardPartyNumber_StringTable = {
  2877. 4, PartyNumber_nationalStandardPartyNumber_StringTableEntries
  2878. };
  2879. static int ASN1CALL ASN1Enc_PartyNumber(ASN1encoding_t enc, PartyNumber *val)
  2880. {
  2881. ASN1uint32_t t;
  2882. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  2883. return 0;
  2884. switch ((val)->choice) {
  2885. case 1:
  2886. if (!ASN1Enc_PublicPartyNumber(enc, &(val)->u.publicNumber))
  2887. return 0;
  2888. break;
  2889. case 2:
  2890. t = lstrlenA((val)->u.dataPartyNumber);
  2891. if (!ASN1PEREncBitVal(enc, 7, t - 1))
  2892. return 0;
  2893. ASN1PEREncAlignment(enc);
  2894. if (!ASN1PEREncTableCharString(enc, t, (val)->u.dataPartyNumber, 4, &PartyNumber_dataPartyNumber_StringTable))
  2895. return 0;
  2896. break;
  2897. case 3:
  2898. t = lstrlenA((val)->u.telexPartyNumber);
  2899. if (!ASN1PEREncBitVal(enc, 7, t - 1))
  2900. return 0;
  2901. ASN1PEREncAlignment(enc);
  2902. if (!ASN1PEREncTableCharString(enc, t, (val)->u.telexPartyNumber, 4, &PartyNumber_telexPartyNumber_StringTable))
  2903. return 0;
  2904. break;
  2905. case 4:
  2906. if (!ASN1Enc_PrivatePartyNumber(enc, &(val)->u.privateNumber))
  2907. return 0;
  2908. break;
  2909. case 5:
  2910. t = lstrlenA((val)->u.nationalStandardPartyNumber);
  2911. if (!ASN1PEREncBitVal(enc, 7, t - 1))
  2912. return 0;
  2913. ASN1PEREncAlignment(enc);
  2914. if (!ASN1PEREncTableCharString(enc, t, (val)->u.nationalStandardPartyNumber, 4, &PartyNumber_nationalStandardPartyNumber_StringTable))
  2915. return 0;
  2916. break;
  2917. default:
  2918. /* impossible */
  2919. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2920. return 0;
  2921. }
  2922. return 1;
  2923. }
  2924. static int ASN1CALL ASN1Dec_PartyNumber(ASN1decoding_t dec, PartyNumber *val)
  2925. {
  2926. ASN1uint32_t l;
  2927. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  2928. return 0;
  2929. switch ((val)->choice) {
  2930. case 1:
  2931. if (!ASN1Dec_PublicPartyNumber(dec, &(val)->u.publicNumber))
  2932. return 0;
  2933. break;
  2934. case 2:
  2935. if (!ASN1PERDecU32Val(dec, 7, &l))
  2936. return 0;
  2937. l += 1;
  2938. ASN1PERDecAlignment(dec);
  2939. //NikhilB: Fix for the overflow bug 03/02/27
  2940. if ( l >= sizeof((val)->u.dataPartyNumber) ) {
  2941. ASN1DecSetError(dec, ASN1_ERR_LARGE);
  2942. return 0;
  2943. }
  2944. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->u.dataPartyNumber, 4, &PartyNumber_dataPartyNumber_StringTable))
  2945. return 0;
  2946. break;
  2947. case 3:
  2948. if (!ASN1PERDecU32Val(dec, 7, &l))
  2949. return 0;
  2950. l += 1;
  2951. ASN1PERDecAlignment(dec);
  2952. //NikhilB: Fix for the overflow bug 03/02/27
  2953. if ( l >= sizeof((val)->u.telexPartyNumber) ) {
  2954. ASN1DecSetError(dec, ASN1_ERR_LARGE);
  2955. return 0;
  2956. }
  2957. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->u.telexPartyNumber, 4, &PartyNumber_telexPartyNumber_StringTable))
  2958. return 0;
  2959. break;
  2960. case 4:
  2961. if (!ASN1Dec_PrivatePartyNumber(dec, &(val)->u.privateNumber))
  2962. return 0;
  2963. break;
  2964. case 5:
  2965. if (!ASN1PERDecU32Val(dec, 7, &l))
  2966. return 0;
  2967. l += 1;
  2968. ASN1PERDecAlignment(dec);
  2969. //NikhilB: Fix for the overflow bug 03/02/27
  2970. if ( l >= sizeof((val)->u.nationalStandardPartyNumber) ) {
  2971. ASN1DecSetError(dec, ASN1_ERR_LARGE);
  2972. return 0;
  2973. }
  2974. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->u.nationalStandardPartyNumber, 4, &PartyNumber_nationalStandardPartyNumber_StringTable))
  2975. return 0;
  2976. break;
  2977. case 0:
  2978. /* extension case */
  2979. if (!ASN1PERDecSkipFragmented(dec, 8))
  2980. return 0;
  2981. break;
  2982. default:
  2983. /* impossible */
  2984. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2985. return 0;
  2986. }
  2987. return 1;
  2988. }
  2989. static void ASN1CALL ASN1Free_PartyNumber(PartyNumber *val)
  2990. {
  2991. if (val) {
  2992. switch ((val)->choice) {
  2993. case 1:
  2994. ASN1Free_PublicPartyNumber(&(val)->u.publicNumber);
  2995. break;
  2996. case 2:
  2997. break;
  2998. case 3:
  2999. break;
  3000. case 4:
  3001. ASN1Free_PrivatePartyNumber(&(val)->u.privateNumber);
  3002. break;
  3003. case 5:
  3004. break;
  3005. }
  3006. }
  3007. }
  3008. static int ASN1CALL ASN1Enc_CpickupNotifyArg_extensionArg(ASN1encoding_t enc, PCpickupNotifyArg_extensionArg *val)
  3009. {
  3010. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CpickupNotifyArg_extensionArg_ElmFn);
  3011. }
  3012. static int ASN1CALL ASN1Enc_CpickupNotifyArg_extensionArg_ElmFn(ASN1encoding_t enc, PCpickupNotifyArg_extensionArg val)
  3013. {
  3014. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3015. return 0;
  3016. return 1;
  3017. }
  3018. static int ASN1CALL ASN1Dec_CpickupNotifyArg_extensionArg(ASN1decoding_t dec, PCpickupNotifyArg_extensionArg *val)
  3019. {
  3020. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CpickupNotifyArg_extensionArg_ElmFn, sizeof(**val));
  3021. }
  3022. static int ASN1CALL ASN1Dec_CpickupNotifyArg_extensionArg_ElmFn(ASN1decoding_t dec, PCpickupNotifyArg_extensionArg val)
  3023. {
  3024. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3025. return 0;
  3026. return 1;
  3027. }
  3028. static void ASN1CALL ASN1Free_CpickupNotifyArg_extensionArg(PCpickupNotifyArg_extensionArg *val)
  3029. {
  3030. if (val) {
  3031. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CpickupNotifyArg_extensionArg_ElmFn);
  3032. }
  3033. }
  3034. static void ASN1CALL ASN1Free_CpickupNotifyArg_extensionArg_ElmFn(PCpickupNotifyArg_extensionArg val)
  3035. {
  3036. if (val) {
  3037. ASN1Free_MixedExtension(&val->value);
  3038. }
  3039. }
  3040. static int ASN1CALL ASN1Enc_CpNotifyArg_extensionArg(ASN1encoding_t enc, PCpNotifyArg_extensionArg *val)
  3041. {
  3042. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CpNotifyArg_extensionArg_ElmFn);
  3043. }
  3044. static int ASN1CALL ASN1Enc_CpNotifyArg_extensionArg_ElmFn(ASN1encoding_t enc, PCpNotifyArg_extensionArg val)
  3045. {
  3046. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3047. return 0;
  3048. return 1;
  3049. }
  3050. static int ASN1CALL ASN1Dec_CpNotifyArg_extensionArg(ASN1decoding_t dec, PCpNotifyArg_extensionArg *val)
  3051. {
  3052. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CpNotifyArg_extensionArg_ElmFn, sizeof(**val));
  3053. }
  3054. static int ASN1CALL ASN1Dec_CpNotifyArg_extensionArg_ElmFn(ASN1decoding_t dec, PCpNotifyArg_extensionArg val)
  3055. {
  3056. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3057. return 0;
  3058. return 1;
  3059. }
  3060. static void ASN1CALL ASN1Free_CpNotifyArg_extensionArg(PCpNotifyArg_extensionArg *val)
  3061. {
  3062. if (val) {
  3063. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CpNotifyArg_extensionArg_ElmFn);
  3064. }
  3065. }
  3066. static void ASN1CALL ASN1Free_CpNotifyArg_extensionArg_ElmFn(PCpNotifyArg_extensionArg val)
  3067. {
  3068. if (val) {
  3069. ASN1Free_MixedExtension(&val->value);
  3070. }
  3071. }
  3072. static int ASN1CALL ASN1Enc_PickExeRes_extensionRes(ASN1encoding_t enc, PPickExeRes_extensionRes *val)
  3073. {
  3074. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_PickExeRes_extensionRes_ElmFn);
  3075. }
  3076. static int ASN1CALL ASN1Enc_PickExeRes_extensionRes_ElmFn(ASN1encoding_t enc, PPickExeRes_extensionRes val)
  3077. {
  3078. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3079. return 0;
  3080. return 1;
  3081. }
  3082. static int ASN1CALL ASN1Dec_PickExeRes_extensionRes(ASN1decoding_t dec, PPickExeRes_extensionRes *val)
  3083. {
  3084. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_PickExeRes_extensionRes_ElmFn, sizeof(**val));
  3085. }
  3086. static int ASN1CALL ASN1Dec_PickExeRes_extensionRes_ElmFn(ASN1decoding_t dec, PPickExeRes_extensionRes val)
  3087. {
  3088. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3089. return 0;
  3090. return 1;
  3091. }
  3092. static void ASN1CALL ASN1Free_PickExeRes_extensionRes(PPickExeRes_extensionRes *val)
  3093. {
  3094. if (val) {
  3095. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_PickExeRes_extensionRes_ElmFn);
  3096. }
  3097. }
  3098. static void ASN1CALL ASN1Free_PickExeRes_extensionRes_ElmFn(PPickExeRes_extensionRes val)
  3099. {
  3100. if (val) {
  3101. ASN1Free_MixedExtension(&val->value);
  3102. }
  3103. }
  3104. static int ASN1CALL ASN1Enc_PickExeArg_extensionArg(ASN1encoding_t enc, PPickExeArg_extensionArg *val)
  3105. {
  3106. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_PickExeArg_extensionArg_ElmFn);
  3107. }
  3108. static int ASN1CALL ASN1Enc_PickExeArg_extensionArg_ElmFn(ASN1encoding_t enc, PPickExeArg_extensionArg val)
  3109. {
  3110. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3111. return 0;
  3112. return 1;
  3113. }
  3114. static int ASN1CALL ASN1Dec_PickExeArg_extensionArg(ASN1decoding_t dec, PPickExeArg_extensionArg *val)
  3115. {
  3116. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_PickExeArg_extensionArg_ElmFn, sizeof(**val));
  3117. }
  3118. static int ASN1CALL ASN1Dec_PickExeArg_extensionArg_ElmFn(ASN1decoding_t dec, PPickExeArg_extensionArg val)
  3119. {
  3120. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3121. return 0;
  3122. return 1;
  3123. }
  3124. static void ASN1CALL ASN1Free_PickExeArg_extensionArg(PPickExeArg_extensionArg *val)
  3125. {
  3126. if (val) {
  3127. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_PickExeArg_extensionArg_ElmFn);
  3128. }
  3129. }
  3130. static void ASN1CALL ASN1Free_PickExeArg_extensionArg_ElmFn(PPickExeArg_extensionArg val)
  3131. {
  3132. if (val) {
  3133. ASN1Free_MixedExtension(&val->value);
  3134. }
  3135. }
  3136. static int ASN1CALL ASN1Enc_PickupRes_extensionRes(ASN1encoding_t enc, PPickupRes_extensionRes *val)
  3137. {
  3138. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_PickupRes_extensionRes_ElmFn);
  3139. }
  3140. static int ASN1CALL ASN1Enc_PickupRes_extensionRes_ElmFn(ASN1encoding_t enc, PPickupRes_extensionRes val)
  3141. {
  3142. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3143. return 0;
  3144. return 1;
  3145. }
  3146. static int ASN1CALL ASN1Dec_PickupRes_extensionRes(ASN1decoding_t dec, PPickupRes_extensionRes *val)
  3147. {
  3148. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_PickupRes_extensionRes_ElmFn, sizeof(**val));
  3149. }
  3150. static int ASN1CALL ASN1Dec_PickupRes_extensionRes_ElmFn(ASN1decoding_t dec, PPickupRes_extensionRes val)
  3151. {
  3152. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3153. return 0;
  3154. return 1;
  3155. }
  3156. static void ASN1CALL ASN1Free_PickupRes_extensionRes(PPickupRes_extensionRes *val)
  3157. {
  3158. if (val) {
  3159. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_PickupRes_extensionRes_ElmFn);
  3160. }
  3161. }
  3162. static void ASN1CALL ASN1Free_PickupRes_extensionRes_ElmFn(PPickupRes_extensionRes val)
  3163. {
  3164. if (val) {
  3165. ASN1Free_MixedExtension(&val->value);
  3166. }
  3167. }
  3168. static int ASN1CALL ASN1Enc_PickupArg_extensionArg(ASN1encoding_t enc, PPickupArg_extensionArg *val)
  3169. {
  3170. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_PickupArg_extensionArg_ElmFn);
  3171. }
  3172. static int ASN1CALL ASN1Enc_PickupArg_extensionArg_ElmFn(ASN1encoding_t enc, PPickupArg_extensionArg val)
  3173. {
  3174. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3175. return 0;
  3176. return 1;
  3177. }
  3178. static int ASN1CALL ASN1Dec_PickupArg_extensionArg(ASN1decoding_t dec, PPickupArg_extensionArg *val)
  3179. {
  3180. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_PickupArg_extensionArg_ElmFn, sizeof(**val));
  3181. }
  3182. static int ASN1CALL ASN1Dec_PickupArg_extensionArg_ElmFn(ASN1decoding_t dec, PPickupArg_extensionArg val)
  3183. {
  3184. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3185. return 0;
  3186. return 1;
  3187. }
  3188. static void ASN1CALL ASN1Free_PickupArg_extensionArg(PPickupArg_extensionArg *val)
  3189. {
  3190. if (val) {
  3191. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_PickupArg_extensionArg_ElmFn);
  3192. }
  3193. }
  3194. static void ASN1CALL ASN1Free_PickupArg_extensionArg_ElmFn(PPickupArg_extensionArg val)
  3195. {
  3196. if (val) {
  3197. ASN1Free_MixedExtension(&val->value);
  3198. }
  3199. }
  3200. static int ASN1CALL ASN1Enc_PickrequRes_extensionRes(ASN1encoding_t enc, PPickrequRes_extensionRes *val)
  3201. {
  3202. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_PickrequRes_extensionRes_ElmFn);
  3203. }
  3204. static int ASN1CALL ASN1Enc_PickrequRes_extensionRes_ElmFn(ASN1encoding_t enc, PPickrequRes_extensionRes val)
  3205. {
  3206. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3207. return 0;
  3208. return 1;
  3209. }
  3210. static int ASN1CALL ASN1Dec_PickrequRes_extensionRes(ASN1decoding_t dec, PPickrequRes_extensionRes *val)
  3211. {
  3212. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_PickrequRes_extensionRes_ElmFn, sizeof(**val));
  3213. }
  3214. static int ASN1CALL ASN1Dec_PickrequRes_extensionRes_ElmFn(ASN1decoding_t dec, PPickrequRes_extensionRes val)
  3215. {
  3216. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3217. return 0;
  3218. return 1;
  3219. }
  3220. static void ASN1CALL ASN1Free_PickrequRes_extensionRes(PPickrequRes_extensionRes *val)
  3221. {
  3222. if (val) {
  3223. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_PickrequRes_extensionRes_ElmFn);
  3224. }
  3225. }
  3226. static void ASN1CALL ASN1Free_PickrequRes_extensionRes_ElmFn(PPickrequRes_extensionRes val)
  3227. {
  3228. if (val) {
  3229. ASN1Free_MixedExtension(&val->value);
  3230. }
  3231. }
  3232. static int ASN1CALL ASN1Enc_PickrequArg_extensionArg(ASN1encoding_t enc, PPickrequArg_extensionArg *val)
  3233. {
  3234. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_PickrequArg_extensionArg_ElmFn);
  3235. }
  3236. static int ASN1CALL ASN1Enc_PickrequArg_extensionArg_ElmFn(ASN1encoding_t enc, PPickrequArg_extensionArg val)
  3237. {
  3238. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3239. return 0;
  3240. return 1;
  3241. }
  3242. static int ASN1CALL ASN1Dec_PickrequArg_extensionArg(ASN1decoding_t dec, PPickrequArg_extensionArg *val)
  3243. {
  3244. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_PickrequArg_extensionArg_ElmFn, sizeof(**val));
  3245. }
  3246. static int ASN1CALL ASN1Dec_PickrequArg_extensionArg_ElmFn(ASN1decoding_t dec, PPickrequArg_extensionArg val)
  3247. {
  3248. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3249. return 0;
  3250. return 1;
  3251. }
  3252. static void ASN1CALL ASN1Free_PickrequArg_extensionArg(PPickrequArg_extensionArg *val)
  3253. {
  3254. if (val) {
  3255. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_PickrequArg_extensionArg_ElmFn);
  3256. }
  3257. }
  3258. static void ASN1CALL ASN1Free_PickrequArg_extensionArg_ElmFn(PPickrequArg_extensionArg val)
  3259. {
  3260. if (val) {
  3261. ASN1Free_MixedExtension(&val->value);
  3262. }
  3263. }
  3264. static int ASN1CALL ASN1Enc_GroupIndicationOffRes_extensionRes(ASN1encoding_t enc, PGroupIndicationOffRes_extensionRes *val)
  3265. {
  3266. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_GroupIndicationOffRes_extensionRes_ElmFn);
  3267. }
  3268. static int ASN1CALL ASN1Enc_GroupIndicationOffRes_extensionRes_ElmFn(ASN1encoding_t enc, PGroupIndicationOffRes_extensionRes val)
  3269. {
  3270. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3271. return 0;
  3272. return 1;
  3273. }
  3274. static int ASN1CALL ASN1Dec_GroupIndicationOffRes_extensionRes(ASN1decoding_t dec, PGroupIndicationOffRes_extensionRes *val)
  3275. {
  3276. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_GroupIndicationOffRes_extensionRes_ElmFn, sizeof(**val));
  3277. }
  3278. static int ASN1CALL ASN1Dec_GroupIndicationOffRes_extensionRes_ElmFn(ASN1decoding_t dec, PGroupIndicationOffRes_extensionRes val)
  3279. {
  3280. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3281. return 0;
  3282. return 1;
  3283. }
  3284. static void ASN1CALL ASN1Free_GroupIndicationOffRes_extensionRes(PGroupIndicationOffRes_extensionRes *val)
  3285. {
  3286. if (val) {
  3287. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_GroupIndicationOffRes_extensionRes_ElmFn);
  3288. }
  3289. }
  3290. static void ASN1CALL ASN1Free_GroupIndicationOffRes_extensionRes_ElmFn(PGroupIndicationOffRes_extensionRes val)
  3291. {
  3292. if (val) {
  3293. ASN1Free_MixedExtension(&val->value);
  3294. }
  3295. }
  3296. static int ASN1CALL ASN1Enc_GroupIndicationOffArg_extensionArg(ASN1encoding_t enc, PGroupIndicationOffArg_extensionArg *val)
  3297. {
  3298. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_GroupIndicationOffArg_extensionArg_ElmFn);
  3299. }
  3300. static int ASN1CALL ASN1Enc_GroupIndicationOffArg_extensionArg_ElmFn(ASN1encoding_t enc, PGroupIndicationOffArg_extensionArg val)
  3301. {
  3302. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3303. return 0;
  3304. return 1;
  3305. }
  3306. static int ASN1CALL ASN1Dec_GroupIndicationOffArg_extensionArg(ASN1decoding_t dec, PGroupIndicationOffArg_extensionArg *val)
  3307. {
  3308. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_GroupIndicationOffArg_extensionArg_ElmFn, sizeof(**val));
  3309. }
  3310. static int ASN1CALL ASN1Dec_GroupIndicationOffArg_extensionArg_ElmFn(ASN1decoding_t dec, PGroupIndicationOffArg_extensionArg val)
  3311. {
  3312. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3313. return 0;
  3314. return 1;
  3315. }
  3316. static void ASN1CALL ASN1Free_GroupIndicationOffArg_extensionArg(PGroupIndicationOffArg_extensionArg *val)
  3317. {
  3318. if (val) {
  3319. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_GroupIndicationOffArg_extensionArg_ElmFn);
  3320. }
  3321. }
  3322. static void ASN1CALL ASN1Free_GroupIndicationOffArg_extensionArg_ElmFn(PGroupIndicationOffArg_extensionArg val)
  3323. {
  3324. if (val) {
  3325. ASN1Free_MixedExtension(&val->value);
  3326. }
  3327. }
  3328. static int ASN1CALL ASN1Enc_GroupIndicationOnRes_extensionRes(ASN1encoding_t enc, PGroupIndicationOnRes_extensionRes *val)
  3329. {
  3330. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_GroupIndicationOnRes_extensionRes_ElmFn);
  3331. }
  3332. static int ASN1CALL ASN1Enc_GroupIndicationOnRes_extensionRes_ElmFn(ASN1encoding_t enc, PGroupIndicationOnRes_extensionRes val)
  3333. {
  3334. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3335. return 0;
  3336. return 1;
  3337. }
  3338. static int ASN1CALL ASN1Dec_GroupIndicationOnRes_extensionRes(ASN1decoding_t dec, PGroupIndicationOnRes_extensionRes *val)
  3339. {
  3340. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_GroupIndicationOnRes_extensionRes_ElmFn, sizeof(**val));
  3341. }
  3342. static int ASN1CALL ASN1Dec_GroupIndicationOnRes_extensionRes_ElmFn(ASN1decoding_t dec, PGroupIndicationOnRes_extensionRes val)
  3343. {
  3344. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3345. return 0;
  3346. return 1;
  3347. }
  3348. static void ASN1CALL ASN1Free_GroupIndicationOnRes_extensionRes(PGroupIndicationOnRes_extensionRes *val)
  3349. {
  3350. if (val) {
  3351. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_GroupIndicationOnRes_extensionRes_ElmFn);
  3352. }
  3353. }
  3354. static void ASN1CALL ASN1Free_GroupIndicationOnRes_extensionRes_ElmFn(PGroupIndicationOnRes_extensionRes val)
  3355. {
  3356. if (val) {
  3357. ASN1Free_MixedExtension(&val->value);
  3358. }
  3359. }
  3360. static int ASN1CALL ASN1Enc_GroupIndicationOnArg_extensionArg(ASN1encoding_t enc, PGroupIndicationOnArg_extensionArg *val)
  3361. {
  3362. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_GroupIndicationOnArg_extensionArg_ElmFn);
  3363. }
  3364. static int ASN1CALL ASN1Enc_GroupIndicationOnArg_extensionArg_ElmFn(ASN1encoding_t enc, PGroupIndicationOnArg_extensionArg val)
  3365. {
  3366. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3367. return 0;
  3368. return 1;
  3369. }
  3370. static int ASN1CALL ASN1Dec_GroupIndicationOnArg_extensionArg(ASN1decoding_t dec, PGroupIndicationOnArg_extensionArg *val)
  3371. {
  3372. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_GroupIndicationOnArg_extensionArg_ElmFn, sizeof(**val));
  3373. }
  3374. static int ASN1CALL ASN1Dec_GroupIndicationOnArg_extensionArg_ElmFn(ASN1decoding_t dec, PGroupIndicationOnArg_extensionArg val)
  3375. {
  3376. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3377. return 0;
  3378. return 1;
  3379. }
  3380. static void ASN1CALL ASN1Free_GroupIndicationOnArg_extensionArg(PGroupIndicationOnArg_extensionArg *val)
  3381. {
  3382. if (val) {
  3383. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_GroupIndicationOnArg_extensionArg_ElmFn);
  3384. }
  3385. }
  3386. static void ASN1CALL ASN1Free_GroupIndicationOnArg_extensionArg_ElmFn(PGroupIndicationOnArg_extensionArg val)
  3387. {
  3388. if (val) {
  3389. ASN1Free_MixedExtension(&val->value);
  3390. }
  3391. }
  3392. static int ASN1CALL ASN1Enc_CpSetupRes_extensionRes(ASN1encoding_t enc, PCpSetupRes_extensionRes *val)
  3393. {
  3394. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CpSetupRes_extensionRes_ElmFn);
  3395. }
  3396. static int ASN1CALL ASN1Enc_CpSetupRes_extensionRes_ElmFn(ASN1encoding_t enc, PCpSetupRes_extensionRes val)
  3397. {
  3398. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3399. return 0;
  3400. return 1;
  3401. }
  3402. static int ASN1CALL ASN1Dec_CpSetupRes_extensionRes(ASN1decoding_t dec, PCpSetupRes_extensionRes *val)
  3403. {
  3404. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CpSetupRes_extensionRes_ElmFn, sizeof(**val));
  3405. }
  3406. static int ASN1CALL ASN1Dec_CpSetupRes_extensionRes_ElmFn(ASN1decoding_t dec, PCpSetupRes_extensionRes val)
  3407. {
  3408. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3409. return 0;
  3410. return 1;
  3411. }
  3412. static void ASN1CALL ASN1Free_CpSetupRes_extensionRes(PCpSetupRes_extensionRes *val)
  3413. {
  3414. if (val) {
  3415. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CpSetupRes_extensionRes_ElmFn);
  3416. }
  3417. }
  3418. static void ASN1CALL ASN1Free_CpSetupRes_extensionRes_ElmFn(PCpSetupRes_extensionRes val)
  3419. {
  3420. if (val) {
  3421. ASN1Free_MixedExtension(&val->value);
  3422. }
  3423. }
  3424. static int ASN1CALL ASN1Enc_CpSetupArg_extensionArg(ASN1encoding_t enc, PCpSetupArg_extensionArg *val)
  3425. {
  3426. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CpSetupArg_extensionArg_ElmFn);
  3427. }
  3428. static int ASN1CALL ASN1Enc_CpSetupArg_extensionArg_ElmFn(ASN1encoding_t enc, PCpSetupArg_extensionArg val)
  3429. {
  3430. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3431. return 0;
  3432. return 1;
  3433. }
  3434. static int ASN1CALL ASN1Dec_CpSetupArg_extensionArg(ASN1decoding_t dec, PCpSetupArg_extensionArg *val)
  3435. {
  3436. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CpSetupArg_extensionArg_ElmFn, sizeof(**val));
  3437. }
  3438. static int ASN1CALL ASN1Dec_CpSetupArg_extensionArg_ElmFn(ASN1decoding_t dec, PCpSetupArg_extensionArg val)
  3439. {
  3440. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3441. return 0;
  3442. return 1;
  3443. }
  3444. static void ASN1CALL ASN1Free_CpSetupArg_extensionArg(PCpSetupArg_extensionArg *val)
  3445. {
  3446. if (val) {
  3447. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CpSetupArg_extensionArg_ElmFn);
  3448. }
  3449. }
  3450. static void ASN1CALL ASN1Free_CpSetupArg_extensionArg_ElmFn(PCpSetupArg_extensionArg val)
  3451. {
  3452. if (val) {
  3453. ASN1Free_MixedExtension(&val->value);
  3454. }
  3455. }
  3456. static int ASN1CALL ASN1Enc_CpRequestRes_extensionRes(ASN1encoding_t enc, PCpRequestRes_extensionRes *val)
  3457. {
  3458. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CpRequestRes_extensionRes_ElmFn);
  3459. }
  3460. static int ASN1CALL ASN1Enc_CpRequestRes_extensionRes_ElmFn(ASN1encoding_t enc, PCpRequestRes_extensionRes val)
  3461. {
  3462. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3463. return 0;
  3464. return 1;
  3465. }
  3466. static int ASN1CALL ASN1Dec_CpRequestRes_extensionRes(ASN1decoding_t dec, PCpRequestRes_extensionRes *val)
  3467. {
  3468. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CpRequestRes_extensionRes_ElmFn, sizeof(**val));
  3469. }
  3470. static int ASN1CALL ASN1Dec_CpRequestRes_extensionRes_ElmFn(ASN1decoding_t dec, PCpRequestRes_extensionRes val)
  3471. {
  3472. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3473. return 0;
  3474. return 1;
  3475. }
  3476. static void ASN1CALL ASN1Free_CpRequestRes_extensionRes(PCpRequestRes_extensionRes *val)
  3477. {
  3478. if (val) {
  3479. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CpRequestRes_extensionRes_ElmFn);
  3480. }
  3481. }
  3482. static void ASN1CALL ASN1Free_CpRequestRes_extensionRes_ElmFn(PCpRequestRes_extensionRes val)
  3483. {
  3484. if (val) {
  3485. ASN1Free_MixedExtension(&val->value);
  3486. }
  3487. }
  3488. static int ASN1CALL ASN1Enc_CpRequestArg_extensionArg(ASN1encoding_t enc, PCpRequestArg_extensionArg *val)
  3489. {
  3490. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_CpRequestArg_extensionArg_ElmFn);
  3491. }
  3492. static int ASN1CALL ASN1Enc_CpRequestArg_extensionArg_ElmFn(ASN1encoding_t enc, PCpRequestArg_extensionArg val)
  3493. {
  3494. if (!ASN1Enc_MixedExtension(enc, &val->value))
  3495. return 0;
  3496. return 1;
  3497. }
  3498. static int ASN1CALL ASN1Dec_CpRequestArg_extensionArg(ASN1decoding_t dec, PCpRequestArg_extensionArg *val)
  3499. {
  3500. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_CpRequestArg_extensionArg_ElmFn, sizeof(**val));
  3501. }
  3502. static int ASN1CALL ASN1Dec_CpRequestArg_extensionArg_ElmFn(ASN1decoding_t dec, PCpRequestArg_extensionArg val)
  3503. {
  3504. if (!ASN1Dec_MixedExtension(dec, &val->value))
  3505. return 0;
  3506. return 1;
  3507. }
  3508. static void ASN1CALL ASN1Free_CpRequestArg_extensionArg(PCpRequestArg_extensionArg *val)
  3509. {
  3510. if (val) {
  3511. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_CpRequestArg_extensionArg_ElmFn);
  3512. }
  3513. }
  3514. static void ASN1CALL ASN1Free_CpRequestArg_extensionArg_ElmFn(PCpRequestArg_extensionArg val)
  3515. {
  3516. if (val) {
  3517. ASN1Free_MixedExtension(&val->value);
  3518. }
  3519. }
  3520. static int ASN1CALL ASN1Enc_ServiceApdus_rosApdus(ASN1encoding_t enc, PServiceApdus_rosApdus *val)
  3521. {
  3522. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_ServiceApdus_rosApdus_ElmFn);
  3523. }
  3524. static int ASN1CALL ASN1Enc_ServiceApdus_rosApdus_ElmFn(ASN1encoding_t enc, PServiceApdus_rosApdus val)
  3525. {
  3526. if (!ASN1Enc_H4503ROS(enc, &val->value))
  3527. return 0;
  3528. return 1;
  3529. }
  3530. static int ASN1CALL ASN1Dec_ServiceApdus_rosApdus(ASN1decoding_t dec, PServiceApdus_rosApdus *val)
  3531. {
  3532. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_ServiceApdus_rosApdus_ElmFn, sizeof(**val));
  3533. }
  3534. static int ASN1CALL ASN1Dec_ServiceApdus_rosApdus_ElmFn(ASN1decoding_t dec, PServiceApdus_rosApdus val)
  3535. {
  3536. if (!ASN1Dec_H4503ROS(dec, &val->value))
  3537. return 0;
  3538. return 1;
  3539. }
  3540. static void ASN1CALL ASN1Free_ServiceApdus_rosApdus(PServiceApdus_rosApdus *val)
  3541. {
  3542. if (val) {
  3543. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_ServiceApdus_rosApdus_ElmFn);
  3544. }
  3545. }
  3546. static void ASN1CALL ASN1Free_ServiceApdus_rosApdus_ElmFn(PServiceApdus_rosApdus val)
  3547. {
  3548. if (val) {
  3549. ASN1Free_H4503ROS(&val->value);
  3550. }
  3551. }
  3552. static ASN1stringtableentry_t AliasAddress_e164_StringTableEntries[] = {
  3553. { 35, 35, 0 }, { 42, 42, 1 }, { 44, 44, 2 },
  3554. { 48, 57, 3 },
  3555. };
  3556. static ASN1stringtable_t AliasAddress_e164_StringTable = {
  3557. 4, AliasAddress_e164_StringTableEntries
  3558. };
  3559. static int ASN1CALL ASN1Enc_AliasAddress(ASN1encoding_t enc, AliasAddress *val)
  3560. {
  3561. ASN1uint32_t t;
  3562. ASN1encoding_t ee;
  3563. if (!ASN1PEREncComplexChoice(enc, (val)->choice, 1, 2))
  3564. return 0;
  3565. switch ((val)->choice) {
  3566. case 1:
  3567. t = lstrlenA((val)->u.e164);
  3568. if (!ASN1PEREncBitVal(enc, 7, t - 1))
  3569. return 0;
  3570. ASN1PEREncAlignment(enc);
  3571. if (!ASN1PEREncTableCharString(enc, t, (val)->u.e164, 4, &AliasAddress_e164_StringTable))
  3572. return 0;
  3573. break;
  3574. case 2:
  3575. ASN1PEREncAlignment(enc);
  3576. if (!ASN1PEREncBitVal(enc, 8, ((val)->u.h323_ID).length - 1))
  3577. return 0;
  3578. if (!ASN1PEREncChar16String(enc, ((val)->u.h323_ID).length, ((val)->u.h323_ID).value, 16))
  3579. return 0;
  3580. break;
  3581. case 3:
  3582. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  3583. return 0;
  3584. t = lstrlenA((val)->u.url_ID);
  3585. ASN1PEREncAlignment(ee);
  3586. if (!ASN1PEREncBitVal(ee, 16, t - 1))
  3587. return 0;
  3588. if (!ASN1PEREncCharString(ee, t, (val)->u.url_ID, 8))
  3589. return 0;
  3590. if (!ASN1PEREncFlushFragmentedToParent(ee))
  3591. return 0;
  3592. ASN1_CloseEncoder2(ee);
  3593. break;
  3594. case 4:
  3595. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  3596. return 0;
  3597. if (!ASN1Enc_TransportAddress(ee, &(val)->u.transportID))
  3598. return 0;
  3599. if (!ASN1PEREncFlushFragmentedToParent(ee))
  3600. return 0;
  3601. ASN1_CloseEncoder2(ee);
  3602. break;
  3603. case 5:
  3604. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  3605. return 0;
  3606. t = lstrlenA((val)->u.email_ID);
  3607. ASN1PEREncAlignment(ee);
  3608. if (!ASN1PEREncBitVal(ee, 16, t - 1))
  3609. return 0;
  3610. if (!ASN1PEREncCharString(ee, t, (val)->u.email_ID, 8))
  3611. return 0;
  3612. if (!ASN1PEREncFlushFragmentedToParent(ee))
  3613. return 0;
  3614. ASN1_CloseEncoder2(ee);
  3615. break;
  3616. case 6:
  3617. if (ASN1_CreateEncoder(enc->module, &ee, NULL, 0, enc) < 0)
  3618. return 0;
  3619. if (!ASN1Enc_PartyNumber(ee, &(val)->u.partyNumber))
  3620. return 0;
  3621. if (!ASN1PEREncFlushFragmentedToParent(ee))
  3622. return 0;
  3623. ASN1_CloseEncoder2(ee);
  3624. break;
  3625. default:
  3626. /* impossible */
  3627. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  3628. return 0;
  3629. }
  3630. return 1;
  3631. }
  3632. static int ASN1CALL ASN1Dec_AliasAddress(ASN1decoding_t dec, AliasAddress *val)
  3633. {
  3634. ASN1uint32_t l;
  3635. ASN1decoding_t dd;
  3636. ASN1octet_t *db;
  3637. ASN1uint32_t ds;
  3638. if (!ASN1PERDecComplexChoice(dec, &(val)->choice, 1, 2))
  3639. return 0;
  3640. switch ((val)->choice) {
  3641. case 1:
  3642. if (!ASN1PERDecU32Val(dec, 7, &l))
  3643. return 0;
  3644. l += 1;
  3645. ASN1PERDecAlignment(dec);
  3646. //NikhilB: Fix for the overflow bug 03/02/27
  3647. if ( l >= sizeof((val)->u.e164) ) {
  3648. ASN1DecSetError(dec, ASN1_ERR_LARGE);
  3649. return 0;
  3650. }
  3651. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->u.e164, 4, &AliasAddress_e164_StringTable))
  3652. return 0;
  3653. break;
  3654. case 2:
  3655. ASN1PERDecAlignment(dec);
  3656. if (!ASN1PERDecU32Val(dec, 8, &((val)->u.h323_ID).length))
  3657. return 0;
  3658. ((val)->u.h323_ID).length += 1;
  3659. if (!ASN1PERDecChar16String(dec, ((val)->u.h323_ID).length, &((val)->u.h323_ID).value, 16))
  3660. return 0;
  3661. break;
  3662. case 3:
  3663. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  3664. return 0;
  3665. if (ASN1_CreateDecoderEx(dec->module, &dd, db, ds, dec, ASN1DECODE_AUTOFREEBUFFER) < 0)
  3666. return 0;
  3667. ASN1PERDecAlignment(dd);
  3668. if (!ASN1PERDecU32Val(dd, 16, &l))
  3669. return 0;
  3670. l += 1;
  3671. //NikhilB: Fix for the overflow bug 03/02/26
  3672. if (l >= sizeof((val)->u.url_ID)) {
  3673. ASN1DecSetError(dd, ASN1_ERR_LARGE);
  3674. return 0;
  3675. }
  3676. if (!ASN1PERDecZeroCharStringNoAlloc(dd, l, (val)->u.url_ID, 8))
  3677. return 0;
  3678. ASN1_CloseDecoder(dd);
  3679. break;
  3680. case 4:
  3681. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  3682. return 0;
  3683. if (ASN1_CreateDecoderEx(dec->module, &dd, db, ds, dec, ASN1DECODE_AUTOFREEBUFFER) < 0)
  3684. return 0;
  3685. if (!ASN1Dec_TransportAddress(dd, &(val)->u.transportID))
  3686. return 0;
  3687. ASN1_CloseDecoder(dd);
  3688. break;
  3689. case 5:
  3690. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  3691. return 0;
  3692. if (ASN1_CreateDecoderEx(dec->module, &dd, db, ds, dec, ASN1DECODE_AUTOFREEBUFFER) < 0)
  3693. return 0;
  3694. ASN1PERDecAlignment(dd);
  3695. if (!ASN1PERDecU32Val(dd, 16, &l))
  3696. return 0;
  3697. l += 1;
  3698. //NikhilB: Fix for the overflow bug 03/02/26
  3699. if (l >= sizeof((val)->u.email_ID)) {
  3700. ASN1DecSetError(dd, ASN1_ERR_LARGE);
  3701. return 0;
  3702. }
  3703. if (!ASN1PERDecZeroCharStringNoAlloc(dd, l, (val)->u.email_ID, 8))
  3704. return 0;
  3705. ASN1_CloseDecoder(dd);
  3706. break;
  3707. case 6:
  3708. if (!ASN1PERDecFragmented(dec, &ds, &db, 8))
  3709. return 0;
  3710. if (ASN1_CreateDecoderEx(dec->module, &dd, db, ds, dec, ASN1DECODE_AUTOFREEBUFFER) < 0)
  3711. return 0;
  3712. if (!ASN1Dec_PartyNumber(dd, &(val)->u.partyNumber))
  3713. return 0;
  3714. ASN1_CloseDecoder(dd);
  3715. break;
  3716. case 0:
  3717. /* extension case */
  3718. if (!ASN1PERDecSkipFragmented(dec, 8))
  3719. return 0;
  3720. break;
  3721. default:
  3722. /* impossible */
  3723. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  3724. return 0;
  3725. }
  3726. return 1;
  3727. }
  3728. static void ASN1CALL ASN1Free_AliasAddress(AliasAddress *val)
  3729. {
  3730. if (val) {
  3731. switch ((val)->choice) {
  3732. case 1:
  3733. break;
  3734. case 2:
  3735. ASN1char16string_free(&(val)->u.h323_ID);
  3736. break;
  3737. case 3:
  3738. break;
  3739. case 4:
  3740. ASN1Free_TransportAddress(&(val)->u.transportID);
  3741. break;
  3742. case 5:
  3743. break;
  3744. case 6:
  3745. ASN1Free_PartyNumber(&(val)->u.partyNumber);
  3746. break;
  3747. }
  3748. }
  3749. }
  3750. static int ASN1CALL ASN1Enc_EndpointAddress_destinationAddress(ASN1encoding_t enc, PEndpointAddress_destinationAddress *val)
  3751. {
  3752. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_EndpointAddress_destinationAddress_ElmFn);
  3753. }
  3754. static int ASN1CALL ASN1Enc_EndpointAddress_destinationAddress_ElmFn(ASN1encoding_t enc, PEndpointAddress_destinationAddress val)
  3755. {
  3756. if (!ASN1Enc_AliasAddress(enc, &val->value))
  3757. return 0;
  3758. return 1;
  3759. }
  3760. static int ASN1CALL ASN1Dec_EndpointAddress_destinationAddress(ASN1decoding_t dec, PEndpointAddress_destinationAddress *val)
  3761. {
  3762. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_EndpointAddress_destinationAddress_ElmFn, sizeof(**val));
  3763. }
  3764. static int ASN1CALL ASN1Dec_EndpointAddress_destinationAddress_ElmFn(ASN1decoding_t dec, PEndpointAddress_destinationAddress val)
  3765. {
  3766. if (!ASN1Dec_AliasAddress(dec, &val->value))
  3767. return 0;
  3768. return 1;
  3769. }
  3770. static void ASN1CALL ASN1Free_EndpointAddress_destinationAddress(PEndpointAddress_destinationAddress *val)
  3771. {
  3772. if (val) {
  3773. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_EndpointAddress_destinationAddress_ElmFn);
  3774. }
  3775. }
  3776. static void ASN1CALL ASN1Free_EndpointAddress_destinationAddress_ElmFn(PEndpointAddress_destinationAddress val)
  3777. {
  3778. if (val) {
  3779. ASN1Free_AliasAddress(&val->value);
  3780. }
  3781. }
  3782. static int ASN1CALL ASN1Enc_AddressInformation(ASN1encoding_t enc, AddressInformation *val)
  3783. {
  3784. if (!ASN1Enc_AliasAddress(enc, val))
  3785. return 0;
  3786. return 1;
  3787. }
  3788. static int ASN1CALL ASN1Dec_AddressInformation(ASN1decoding_t dec, AddressInformation *val)
  3789. {
  3790. if (!ASN1Dec_AliasAddress(dec, val))
  3791. return 0;
  3792. return 1;
  3793. }
  3794. static void ASN1CALL ASN1Free_AddressInformation(AddressInformation *val)
  3795. {
  3796. if (val) {
  3797. ASN1Free_AliasAddress(val);
  3798. }
  3799. }
  3800. static int ASN1CALL ASN1Enc_EndpointAddress(ASN1encoding_t enc, EndpointAddress *val)
  3801. {
  3802. if (!ASN1PEREncExtensionBitClear(enc))
  3803. return 0;
  3804. if (!ASN1PEREncBits(enc, 1, (val)->o))
  3805. return 0;
  3806. if (!ASN1Enc_EndpointAddress_destinationAddress(enc, &(val)->destinationAddress))
  3807. return 0;
  3808. if ((val)->o[0] & 0x80) {
  3809. if (!ASN1Enc_AliasAddress(enc, &(val)->remoteExtensionAddress))
  3810. return 0;
  3811. }
  3812. return 1;
  3813. }
  3814. static int ASN1CALL ASN1Dec_EndpointAddress(ASN1decoding_t dec, EndpointAddress *val)
  3815. {
  3816. ASN1uint32_t y;
  3817. if (!ASN1PERDecExtensionBit(dec, &y))
  3818. return 0;
  3819. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  3820. return 0;
  3821. if (!ASN1Dec_EndpointAddress_destinationAddress(dec, &(val)->destinationAddress))
  3822. return 0;
  3823. if ((val)->o[0] & 0x80) {
  3824. if (!ASN1Dec_AliasAddress(dec, &(val)->remoteExtensionAddress))
  3825. return 0;
  3826. }
  3827. if (y) {
  3828. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3829. return 0;
  3830. }
  3831. return 1;
  3832. }
  3833. static void ASN1CALL ASN1Free_EndpointAddress(EndpointAddress *val)
  3834. {
  3835. if (val) {
  3836. ASN1Free_EndpointAddress_destinationAddress(&(val)->destinationAddress);
  3837. if ((val)->o[0] & 0x80) {
  3838. ASN1Free_AliasAddress(&(val)->remoteExtensionAddress);
  3839. }
  3840. }
  3841. }
  3842. static int ASN1CALL ASN1Enc_NetworkFacilityExtension(ASN1encoding_t enc, NetworkFacilityExtension *val)
  3843. {
  3844. if (!ASN1PEREncExtensionBitClear(enc))
  3845. return 0;
  3846. if (!ASN1PEREncBits(enc, 2, (val)->o))
  3847. return 0;
  3848. if (!ASN1Enc_EntityType(enc, &(val)->sourceEntity))
  3849. return 0;
  3850. if ((val)->o[0] & 0x80) {
  3851. if (!ASN1Enc_AddressInformation(enc, &(val)->sourceEntityAddress))
  3852. return 0;
  3853. }
  3854. if (!ASN1Enc_EntityType(enc, &(val)->destinationEntity))
  3855. return 0;
  3856. if ((val)->o[0] & 0x40) {
  3857. if (!ASN1Enc_AddressInformation(enc, &(val)->destinationEntityAddress))
  3858. return 0;
  3859. }
  3860. return 1;
  3861. }
  3862. static int ASN1CALL ASN1Dec_NetworkFacilityExtension(ASN1decoding_t dec, NetworkFacilityExtension *val)
  3863. {
  3864. ASN1uint32_t y;
  3865. if (!ASN1PERDecExtensionBit(dec, &y))
  3866. return 0;
  3867. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  3868. return 0;
  3869. if (!ASN1Dec_EntityType(dec, &(val)->sourceEntity))
  3870. return 0;
  3871. if ((val)->o[0] & 0x80) {
  3872. if (!ASN1Dec_AddressInformation(dec, &(val)->sourceEntityAddress))
  3873. return 0;
  3874. }
  3875. if (!ASN1Dec_EntityType(dec, &(val)->destinationEntity))
  3876. return 0;
  3877. if ((val)->o[0] & 0x40) {
  3878. if (!ASN1Dec_AddressInformation(dec, &(val)->destinationEntityAddress))
  3879. return 0;
  3880. }
  3881. if (y) {
  3882. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3883. return 0;
  3884. }
  3885. return 1;
  3886. }
  3887. static void ASN1CALL ASN1Free_NetworkFacilityExtension(NetworkFacilityExtension *val)
  3888. {
  3889. if (val) {
  3890. if ((val)->o[0] & 0x80) {
  3891. ASN1Free_AddressInformation(&(val)->sourceEntityAddress);
  3892. }
  3893. if ((val)->o[0] & 0x40) {
  3894. ASN1Free_AddressInformation(&(val)->destinationEntityAddress);
  3895. }
  3896. }
  3897. }
  3898. static int ASN1CALL ASN1Enc_ActivateDiversionQArgument(ASN1encoding_t enc, ActivateDiversionQArgument *val)
  3899. {
  3900. ASN1uint32_t u;
  3901. if (!ASN1PEREncExtensionBitClear(enc))
  3902. return 0;
  3903. if (!ASN1PEREncBits(enc, 1, (val)->o))
  3904. return 0;
  3905. if (!ASN1PEREncExtensionBitClear(enc))
  3906. return 0;
  3907. if (!ASN1PEREncBitVal(enc, 2, (val)->procedure))
  3908. return 0;
  3909. switch ((val)->basicService) {
  3910. case 0:
  3911. u = 0;
  3912. break;
  3913. case 1:
  3914. u = 1;
  3915. break;
  3916. case 2:
  3917. u = 2;
  3918. break;
  3919. case 3:
  3920. u = 3;
  3921. break;
  3922. case 32:
  3923. u = 4;
  3924. break;
  3925. case 33:
  3926. u = 5;
  3927. break;
  3928. case 34:
  3929. u = 6;
  3930. break;
  3931. case 35:
  3932. u = 7;
  3933. break;
  3934. case 36:
  3935. u = 8;
  3936. break;
  3937. }
  3938. if (!ASN1PEREncExtensionBitClear(enc))
  3939. return 0;
  3940. if (!ASN1PEREncBitVal(enc, 4, u))
  3941. return 0;
  3942. if (!ASN1Enc_EndpointAddress(enc, &(val)->divertedToAddress))
  3943. return 0;
  3944. if (!ASN1Enc_EndpointAddress(enc, &(val)->servedUserNr))
  3945. return 0;
  3946. if (!ASN1Enc_EndpointAddress(enc, &(val)->activatingUserNr))
  3947. return 0;
  3948. if ((val)->o[0] & 0x80) {
  3949. if (!ASN1Enc_ActivateDiversionQArgument_extension(enc, &(val)->extension))
  3950. return 0;
  3951. }
  3952. return 1;
  3953. }
  3954. static int ASN1CALL ASN1Dec_ActivateDiversionQArgument(ASN1decoding_t dec, ActivateDiversionQArgument *val)
  3955. {
  3956. ASN1uint32_t y;
  3957. ASN1uint32_t x;
  3958. ASN1uint32_t u;
  3959. if (!ASN1PERDecExtensionBit(dec, &y))
  3960. return 0;
  3961. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  3962. return 0;
  3963. if (!ASN1PERDecExtensionBit(dec, &x))
  3964. return 0;
  3965. if (!x) {
  3966. if (!ASN1PERDecU32Val(dec, 2, &(val)->procedure))
  3967. return 0;
  3968. } else {
  3969. if (!ASN1PERDecSkipNormallySmall(dec))
  3970. return 0;
  3971. }
  3972. if (!ASN1PERDecExtensionBit(dec, &x))
  3973. return 0;
  3974. if (!x) {
  3975. if (!ASN1PERDecU32Val(dec, 4, &u))
  3976. return 0;
  3977. switch (u) {
  3978. case 0:
  3979. (val)->basicService = 0;
  3980. break;
  3981. case 1:
  3982. (val)->basicService = 1;
  3983. break;
  3984. case 2:
  3985. (val)->basicService = 2;
  3986. break;
  3987. case 3:
  3988. (val)->basicService = 3;
  3989. break;
  3990. case 4:
  3991. (val)->basicService = 32;
  3992. break;
  3993. case 5:
  3994. (val)->basicService = 33;
  3995. break;
  3996. case 6:
  3997. (val)->basicService = 34;
  3998. break;
  3999. case 7:
  4000. (val)->basicService = 35;
  4001. break;
  4002. case 8:
  4003. (val)->basicService = 36;
  4004. break;
  4005. }
  4006. } else {
  4007. if (!ASN1PERDecSkipNormallySmall(dec))
  4008. return 0;
  4009. }
  4010. if (!ASN1Dec_EndpointAddress(dec, &(val)->divertedToAddress))
  4011. return 0;
  4012. if (!ASN1Dec_EndpointAddress(dec, &(val)->servedUserNr))
  4013. return 0;
  4014. if (!ASN1Dec_EndpointAddress(dec, &(val)->activatingUserNr))
  4015. return 0;
  4016. if ((val)->o[0] & 0x80) {
  4017. if (!ASN1Dec_ActivateDiversionQArgument_extension(dec, &(val)->extension))
  4018. return 0;
  4019. }
  4020. if (y) {
  4021. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4022. return 0;
  4023. }
  4024. return 1;
  4025. }
  4026. static void ASN1CALL ASN1Free_ActivateDiversionQArgument(ActivateDiversionQArgument *val)
  4027. {
  4028. if (val) {
  4029. ASN1Free_EndpointAddress(&(val)->divertedToAddress);
  4030. ASN1Free_EndpointAddress(&(val)->servedUserNr);
  4031. ASN1Free_EndpointAddress(&(val)->activatingUserNr);
  4032. if ((val)->o[0] & 0x80) {
  4033. ASN1Free_ActivateDiversionQArgument_extension(&(val)->extension);
  4034. }
  4035. }
  4036. }
  4037. static int ASN1CALL ASN1Enc_DeactivateDiversionQArgument(ASN1encoding_t enc, DeactivateDiversionQArgument *val)
  4038. {
  4039. ASN1uint32_t u;
  4040. if (!ASN1PEREncExtensionBitClear(enc))
  4041. return 0;
  4042. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4043. return 0;
  4044. if (!ASN1PEREncExtensionBitClear(enc))
  4045. return 0;
  4046. if (!ASN1PEREncBitVal(enc, 2, (val)->procedure))
  4047. return 0;
  4048. switch ((val)->basicService) {
  4049. case 0:
  4050. u = 0;
  4051. break;
  4052. case 1:
  4053. u = 1;
  4054. break;
  4055. case 2:
  4056. u = 2;
  4057. break;
  4058. case 3:
  4059. u = 3;
  4060. break;
  4061. case 32:
  4062. u = 4;
  4063. break;
  4064. case 33:
  4065. u = 5;
  4066. break;
  4067. case 34:
  4068. u = 6;
  4069. break;
  4070. case 35:
  4071. u = 7;
  4072. break;
  4073. case 36:
  4074. u = 8;
  4075. break;
  4076. }
  4077. if (!ASN1PEREncExtensionBitClear(enc))
  4078. return 0;
  4079. if (!ASN1PEREncBitVal(enc, 4, u))
  4080. return 0;
  4081. if (!ASN1Enc_EndpointAddress(enc, &(val)->servedUserNr))
  4082. return 0;
  4083. if (!ASN1Enc_EndpointAddress(enc, &(val)->deactivatingUserNr))
  4084. return 0;
  4085. if ((val)->o[0] & 0x80) {
  4086. if (!ASN1Enc_DeactivateDiversionQArgument_extension(enc, &(val)->extension))
  4087. return 0;
  4088. }
  4089. return 1;
  4090. }
  4091. static int ASN1CALL ASN1Dec_DeactivateDiversionQArgument(ASN1decoding_t dec, DeactivateDiversionQArgument *val)
  4092. {
  4093. ASN1uint32_t y;
  4094. ASN1uint32_t x;
  4095. ASN1uint32_t u;
  4096. if (!ASN1PERDecExtensionBit(dec, &y))
  4097. return 0;
  4098. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4099. return 0;
  4100. if (!ASN1PERDecExtensionBit(dec, &x))
  4101. return 0;
  4102. if (!x) {
  4103. if (!ASN1PERDecU32Val(dec, 2, &(val)->procedure))
  4104. return 0;
  4105. } else {
  4106. if (!ASN1PERDecSkipNormallySmall(dec))
  4107. return 0;
  4108. }
  4109. if (!ASN1PERDecExtensionBit(dec, &x))
  4110. return 0;
  4111. if (!x) {
  4112. if (!ASN1PERDecU32Val(dec, 4, &u))
  4113. return 0;
  4114. switch (u) {
  4115. case 0:
  4116. (val)->basicService = 0;
  4117. break;
  4118. case 1:
  4119. (val)->basicService = 1;
  4120. break;
  4121. case 2:
  4122. (val)->basicService = 2;
  4123. break;
  4124. case 3:
  4125. (val)->basicService = 3;
  4126. break;
  4127. case 4:
  4128. (val)->basicService = 32;
  4129. break;
  4130. case 5:
  4131. (val)->basicService = 33;
  4132. break;
  4133. case 6:
  4134. (val)->basicService = 34;
  4135. break;
  4136. case 7:
  4137. (val)->basicService = 35;
  4138. break;
  4139. case 8:
  4140. (val)->basicService = 36;
  4141. break;
  4142. }
  4143. } else {
  4144. if (!ASN1PERDecSkipNormallySmall(dec))
  4145. return 0;
  4146. }
  4147. if (!ASN1Dec_EndpointAddress(dec, &(val)->servedUserNr))
  4148. return 0;
  4149. if (!ASN1Dec_EndpointAddress(dec, &(val)->deactivatingUserNr))
  4150. return 0;
  4151. if ((val)->o[0] & 0x80) {
  4152. if (!ASN1Dec_DeactivateDiversionQArgument_extension(dec, &(val)->extension))
  4153. return 0;
  4154. }
  4155. if (y) {
  4156. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4157. return 0;
  4158. }
  4159. return 1;
  4160. }
  4161. static void ASN1CALL ASN1Free_DeactivateDiversionQArgument(DeactivateDiversionQArgument *val)
  4162. {
  4163. if (val) {
  4164. ASN1Free_EndpointAddress(&(val)->servedUserNr);
  4165. ASN1Free_EndpointAddress(&(val)->deactivatingUserNr);
  4166. if ((val)->o[0] & 0x80) {
  4167. ASN1Free_DeactivateDiversionQArgument_extension(&(val)->extension);
  4168. }
  4169. }
  4170. }
  4171. static int ASN1CALL ASN1Enc_InterrogateDiversionQArgument(ASN1encoding_t enc, InterrogateDiversionQArgument *val)
  4172. {
  4173. ASN1octet_t o[1];
  4174. ASN1uint32_t u;
  4175. CopyMemory(o, (val)->o, 1);
  4176. if ((val)->basicService == 0)
  4177. o[0] &= ~0x80;
  4178. if (!ASN1PEREncExtensionBitClear(enc))
  4179. return 0;
  4180. if (!ASN1PEREncBits(enc, 2, o))
  4181. return 0;
  4182. if (!ASN1PEREncExtensionBitClear(enc))
  4183. return 0;
  4184. if (!ASN1PEREncBitVal(enc, 2, (val)->procedure))
  4185. return 0;
  4186. if (o[0] & 0x80) {
  4187. switch ((val)->basicService) {
  4188. case 0:
  4189. u = 0;
  4190. break;
  4191. case 1:
  4192. u = 1;
  4193. break;
  4194. case 2:
  4195. u = 2;
  4196. break;
  4197. case 3:
  4198. u = 3;
  4199. break;
  4200. case 32:
  4201. u = 4;
  4202. break;
  4203. case 33:
  4204. u = 5;
  4205. break;
  4206. case 34:
  4207. u = 6;
  4208. break;
  4209. case 35:
  4210. u = 7;
  4211. break;
  4212. case 36:
  4213. u = 8;
  4214. break;
  4215. }
  4216. if (!ASN1PEREncExtensionBitClear(enc))
  4217. return 0;
  4218. if (!ASN1PEREncBitVal(enc, 4, u))
  4219. return 0;
  4220. }
  4221. if (!ASN1Enc_EndpointAddress(enc, &(val)->servedUserNr))
  4222. return 0;
  4223. if (!ASN1Enc_EndpointAddress(enc, &(val)->interrogatingUserNr))
  4224. return 0;
  4225. if (o[0] & 0x40) {
  4226. if (!ASN1Enc_InterrogateDiversionQArgument_extension(enc, &(val)->extension))
  4227. return 0;
  4228. }
  4229. return 1;
  4230. }
  4231. static int ASN1CALL ASN1Dec_InterrogateDiversionQArgument(ASN1decoding_t dec, InterrogateDiversionQArgument *val)
  4232. {
  4233. ASN1uint32_t y;
  4234. ASN1uint32_t x;
  4235. ASN1uint32_t u;
  4236. if (!ASN1PERDecExtensionBit(dec, &y))
  4237. return 0;
  4238. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  4239. return 0;
  4240. if (!ASN1PERDecExtensionBit(dec, &x))
  4241. return 0;
  4242. if (!x) {
  4243. if (!ASN1PERDecU32Val(dec, 2, &(val)->procedure))
  4244. return 0;
  4245. } else {
  4246. if (!ASN1PERDecSkipNormallySmall(dec))
  4247. return 0;
  4248. }
  4249. if ((val)->o[0] & 0x80) {
  4250. if (!ASN1PERDecExtensionBit(dec, &x))
  4251. return 0;
  4252. if (!x) {
  4253. if (!ASN1PERDecU32Val(dec, 4, &u))
  4254. return 0;
  4255. switch (u) {
  4256. case 0:
  4257. (val)->basicService = 0;
  4258. break;
  4259. case 1:
  4260. (val)->basicService = 1;
  4261. break;
  4262. case 2:
  4263. (val)->basicService = 2;
  4264. break;
  4265. case 3:
  4266. (val)->basicService = 3;
  4267. break;
  4268. case 4:
  4269. (val)->basicService = 32;
  4270. break;
  4271. case 5:
  4272. (val)->basicService = 33;
  4273. break;
  4274. case 6:
  4275. (val)->basicService = 34;
  4276. break;
  4277. case 7:
  4278. (val)->basicService = 35;
  4279. break;
  4280. case 8:
  4281. (val)->basicService = 36;
  4282. break;
  4283. }
  4284. } else {
  4285. if (!ASN1PERDecSkipNormallySmall(dec))
  4286. return 0;
  4287. }
  4288. }
  4289. if (!ASN1Dec_EndpointAddress(dec, &(val)->servedUserNr))
  4290. return 0;
  4291. if (!ASN1Dec_EndpointAddress(dec, &(val)->interrogatingUserNr))
  4292. return 0;
  4293. if ((val)->o[0] & 0x40) {
  4294. if (!ASN1Dec_InterrogateDiversionQArgument_extension(dec, &(val)->extension))
  4295. return 0;
  4296. }
  4297. if (y) {
  4298. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4299. return 0;
  4300. }
  4301. if (!((val)->o[0] & 0x80))
  4302. (val)->basicService = 0;
  4303. return 1;
  4304. }
  4305. static void ASN1CALL ASN1Free_InterrogateDiversionQArgument(InterrogateDiversionQArgument *val)
  4306. {
  4307. if (val) {
  4308. ASN1Free_EndpointAddress(&(val)->servedUserNr);
  4309. ASN1Free_EndpointAddress(&(val)->interrogatingUserNr);
  4310. if ((val)->o[0] & 0x40) {
  4311. ASN1Free_InterrogateDiversionQArgument_extension(&(val)->extension);
  4312. }
  4313. }
  4314. }
  4315. static int ASN1CALL ASN1Enc_CheckRestrictionArgument(ASN1encoding_t enc, CheckRestrictionArgument *val)
  4316. {
  4317. ASN1uint32_t u;
  4318. if (!ASN1PEREncExtensionBitClear(enc))
  4319. return 0;
  4320. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4321. return 0;
  4322. if (!ASN1Enc_EndpointAddress(enc, &(val)->servedUserNr))
  4323. return 0;
  4324. switch ((val)->basicService) {
  4325. case 0:
  4326. u = 0;
  4327. break;
  4328. case 1:
  4329. u = 1;
  4330. break;
  4331. case 2:
  4332. u = 2;
  4333. break;
  4334. case 3:
  4335. u = 3;
  4336. break;
  4337. case 32:
  4338. u = 4;
  4339. break;
  4340. case 33:
  4341. u = 5;
  4342. break;
  4343. case 34:
  4344. u = 6;
  4345. break;
  4346. case 35:
  4347. u = 7;
  4348. break;
  4349. case 36:
  4350. u = 8;
  4351. break;
  4352. }
  4353. if (!ASN1PEREncExtensionBitClear(enc))
  4354. return 0;
  4355. if (!ASN1PEREncBitVal(enc, 4, u))
  4356. return 0;
  4357. if (!ASN1Enc_EndpointAddress(enc, &(val)->divertedToNr))
  4358. return 0;
  4359. if ((val)->o[0] & 0x80) {
  4360. if (!ASN1Enc_CheckRestrictionArgument_extension(enc, &(val)->extension))
  4361. return 0;
  4362. }
  4363. return 1;
  4364. }
  4365. static int ASN1CALL ASN1Dec_CheckRestrictionArgument(ASN1decoding_t dec, CheckRestrictionArgument *val)
  4366. {
  4367. ASN1uint32_t y;
  4368. ASN1uint32_t x;
  4369. ASN1uint32_t u;
  4370. if (!ASN1PERDecExtensionBit(dec, &y))
  4371. return 0;
  4372. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4373. return 0;
  4374. if (!ASN1Dec_EndpointAddress(dec, &(val)->servedUserNr))
  4375. return 0;
  4376. if (!ASN1PERDecExtensionBit(dec, &x))
  4377. return 0;
  4378. if (!x) {
  4379. if (!ASN1PERDecU32Val(dec, 4, &u))
  4380. return 0;
  4381. switch (u) {
  4382. case 0:
  4383. (val)->basicService = 0;
  4384. break;
  4385. case 1:
  4386. (val)->basicService = 1;
  4387. break;
  4388. case 2:
  4389. (val)->basicService = 2;
  4390. break;
  4391. case 3:
  4392. (val)->basicService = 3;
  4393. break;
  4394. case 4:
  4395. (val)->basicService = 32;
  4396. break;
  4397. case 5:
  4398. (val)->basicService = 33;
  4399. break;
  4400. case 6:
  4401. (val)->basicService = 34;
  4402. break;
  4403. case 7:
  4404. (val)->basicService = 35;
  4405. break;
  4406. case 8:
  4407. (val)->basicService = 36;
  4408. break;
  4409. }
  4410. } else {
  4411. if (!ASN1PERDecSkipNormallySmall(dec))
  4412. return 0;
  4413. }
  4414. if (!ASN1Dec_EndpointAddress(dec, &(val)->divertedToNr))
  4415. return 0;
  4416. if ((val)->o[0] & 0x80) {
  4417. if (!ASN1Dec_CheckRestrictionArgument_extension(dec, &(val)->extension))
  4418. return 0;
  4419. }
  4420. if (y) {
  4421. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4422. return 0;
  4423. }
  4424. return 1;
  4425. }
  4426. static void ASN1CALL ASN1Free_CheckRestrictionArgument(CheckRestrictionArgument *val)
  4427. {
  4428. if (val) {
  4429. ASN1Free_EndpointAddress(&(val)->servedUserNr);
  4430. ASN1Free_EndpointAddress(&(val)->divertedToNr);
  4431. if ((val)->o[0] & 0x80) {
  4432. ASN1Free_CheckRestrictionArgument_extension(&(val)->extension);
  4433. }
  4434. }
  4435. }
  4436. static int ASN1CALL ASN1Enc_CallReroutingArgument(ASN1encoding_t enc, CallReroutingArgument *val)
  4437. {
  4438. if (!ASN1PEREncExtensionBitClear(enc))
  4439. return 0;
  4440. if (!ASN1PEREncBits(enc, 7, (val)->o))
  4441. return 0;
  4442. if (!ASN1PEREncExtensionBitClear(enc))
  4443. return 0;
  4444. if (!ASN1PEREncBitVal(enc, 2, (val)->reroutingReason))
  4445. return 0;
  4446. if ((val)->o[0] & 0x80) {
  4447. if (!ASN1PEREncExtensionBitClear(enc))
  4448. return 0;
  4449. if (!ASN1PEREncBitVal(enc, 2, (val)->originalReroutingReason))
  4450. return 0;
  4451. }
  4452. if (!ASN1Enc_EndpointAddress(enc, &(val)->calledAddress))
  4453. return 0;
  4454. if (!ASN1PEREncBitVal(enc, 4, (val)->diversionCounter - 1))
  4455. return 0;
  4456. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->h225InfoElement))
  4457. return 0;
  4458. if (!ASN1Enc_EndpointAddress(enc, &(val)->lastReroutingNr))
  4459. return 0;
  4460. if (!ASN1PEREncExtensionBitClear(enc))
  4461. return 0;
  4462. if (!ASN1PEREncBitVal(enc, 2, (val)->subscriptionOption))
  4463. return 0;
  4464. if ((val)->o[0] & 0x40) {
  4465. if (!ASN1Enc_PartySubaddress(enc, &(val)->callingPartySubaddress))
  4466. return 0;
  4467. }
  4468. if (!ASN1Enc_EndpointAddress(enc, &(val)->callingNumber))
  4469. return 0;
  4470. if ((val)->o[0] & 0x20) {
  4471. if (!ASN1PEREncBitVal(enc, 7, ((val)->callingInfo).length - 1))
  4472. return 0;
  4473. ASN1PEREncAlignment(enc);
  4474. if (!ASN1PEREncChar16String(enc, ((val)->callingInfo).length, ((val)->callingInfo).value, 16))
  4475. return 0;
  4476. }
  4477. if ((val)->o[0] & 0x10) {
  4478. if (!ASN1Enc_EndpointAddress(enc, &(val)->originalCalledNr))
  4479. return 0;
  4480. }
  4481. if ((val)->o[0] & 0x8) {
  4482. if (!ASN1PEREncBitVal(enc, 7, ((val)->redirectingInfo).length - 1))
  4483. return 0;
  4484. ASN1PEREncAlignment(enc);
  4485. if (!ASN1PEREncChar16String(enc, ((val)->redirectingInfo).length, ((val)->redirectingInfo).value, 16))
  4486. return 0;
  4487. }
  4488. if ((val)->o[0] & 0x4) {
  4489. if (!ASN1PEREncBitVal(enc, 7, ((val)->originalCalledInfo).length - 1))
  4490. return 0;
  4491. ASN1PEREncAlignment(enc);
  4492. if (!ASN1PEREncChar16String(enc, ((val)->originalCalledInfo).length, ((val)->originalCalledInfo).value, 16))
  4493. return 0;
  4494. }
  4495. if ((val)->o[0] & 0x2) {
  4496. if (!ASN1Enc_CallReroutingArgument_extension(enc, &(val)->extension))
  4497. return 0;
  4498. }
  4499. return 1;
  4500. }
  4501. static int ASN1CALL ASN1Dec_CallReroutingArgument(ASN1decoding_t dec, CallReroutingArgument *val)
  4502. {
  4503. ASN1uint32_t y;
  4504. ASN1uint32_t x;
  4505. if (!ASN1PERDecExtensionBit(dec, &y))
  4506. return 0;
  4507. if (!ASN1PERDecExtension(dec, 7, (val)->o))
  4508. return 0;
  4509. if (!ASN1PERDecExtensionBit(dec, &x))
  4510. return 0;
  4511. if (!x) {
  4512. if (!ASN1PERDecU32Val(dec, 2, &(val)->reroutingReason))
  4513. return 0;
  4514. } else {
  4515. if (!ASN1PERDecSkipNormallySmall(dec))
  4516. return 0;
  4517. }
  4518. if ((val)->o[0] & 0x80) {
  4519. if (!ASN1PERDecExtensionBit(dec, &x))
  4520. return 0;
  4521. if (!x) {
  4522. if (!ASN1PERDecU32Val(dec, 2, &(val)->originalReroutingReason))
  4523. return 0;
  4524. } else {
  4525. if (!ASN1PERDecSkipNormallySmall(dec))
  4526. return 0;
  4527. }
  4528. }
  4529. if (!ASN1Dec_EndpointAddress(dec, &(val)->calledAddress))
  4530. return 0;
  4531. if (!ASN1PERDecU16Val(dec, 4, &(val)->diversionCounter))
  4532. return 0;
  4533. (val)->diversionCounter += 1;
  4534. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->h225InfoElement))
  4535. return 0;
  4536. if (!ASN1Dec_EndpointAddress(dec, &(val)->lastReroutingNr))
  4537. return 0;
  4538. if (!ASN1PERDecExtensionBit(dec, &x))
  4539. return 0;
  4540. if (!x) {
  4541. if (!ASN1PERDecU32Val(dec, 2, &(val)->subscriptionOption))
  4542. return 0;
  4543. } else {
  4544. if (!ASN1PERDecSkipNormallySmall(dec))
  4545. return 0;
  4546. }
  4547. if ((val)->o[0] & 0x40) {
  4548. if (!ASN1Dec_PartySubaddress(dec, &(val)->callingPartySubaddress))
  4549. return 0;
  4550. }
  4551. if (!ASN1Dec_EndpointAddress(dec, &(val)->callingNumber))
  4552. return 0;
  4553. if ((val)->o[0] & 0x20) {
  4554. if (!ASN1PERDecU32Val(dec, 7, &((val)->callingInfo).length))
  4555. return 0;
  4556. ((val)->callingInfo).length += 1;
  4557. ASN1PERDecAlignment(dec);
  4558. if (!ASN1PERDecChar16String(dec, ((val)->callingInfo).length, &((val)->callingInfo).value, 16))
  4559. return 0;
  4560. }
  4561. if ((val)->o[0] & 0x10) {
  4562. if (!ASN1Dec_EndpointAddress(dec, &(val)->originalCalledNr))
  4563. return 0;
  4564. }
  4565. if ((val)->o[0] & 0x8) {
  4566. if (!ASN1PERDecU32Val(dec, 7, &((val)->redirectingInfo).length))
  4567. return 0;
  4568. ((val)->redirectingInfo).length += 1;
  4569. ASN1PERDecAlignment(dec);
  4570. if (!ASN1PERDecChar16String(dec, ((val)->redirectingInfo).length, &((val)->redirectingInfo).value, 16))
  4571. return 0;
  4572. }
  4573. if ((val)->o[0] & 0x4) {
  4574. if (!ASN1PERDecU32Val(dec, 7, &((val)->originalCalledInfo).length))
  4575. return 0;
  4576. ((val)->originalCalledInfo).length += 1;
  4577. ASN1PERDecAlignment(dec);
  4578. if (!ASN1PERDecChar16String(dec, ((val)->originalCalledInfo).length, &((val)->originalCalledInfo).value, 16))
  4579. return 0;
  4580. }
  4581. if ((val)->o[0] & 0x2) {
  4582. if (!ASN1Dec_CallReroutingArgument_extension(dec, &(val)->extension))
  4583. return 0;
  4584. }
  4585. if (y) {
  4586. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4587. return 0;
  4588. }
  4589. return 1;
  4590. }
  4591. static void ASN1CALL ASN1Free_CallReroutingArgument(CallReroutingArgument *val)
  4592. {
  4593. if (val) {
  4594. ASN1Free_EndpointAddress(&(val)->calledAddress);
  4595. ASN1octetstring_free(&(val)->h225InfoElement);
  4596. ASN1Free_EndpointAddress(&(val)->lastReroutingNr);
  4597. if ((val)->o[0] & 0x40) {
  4598. ASN1Free_PartySubaddress(&(val)->callingPartySubaddress);
  4599. }
  4600. ASN1Free_EndpointAddress(&(val)->callingNumber);
  4601. if ((val)->o[0] & 0x20) {
  4602. ASN1char16string_free(&(val)->callingInfo);
  4603. }
  4604. if ((val)->o[0] & 0x10) {
  4605. ASN1Free_EndpointAddress(&(val)->originalCalledNr);
  4606. }
  4607. if ((val)->o[0] & 0x8) {
  4608. ASN1char16string_free(&(val)->redirectingInfo);
  4609. }
  4610. if ((val)->o[0] & 0x4) {
  4611. ASN1char16string_free(&(val)->originalCalledInfo);
  4612. }
  4613. if ((val)->o[0] & 0x2) {
  4614. ASN1Free_CallReroutingArgument_extension(&(val)->extension);
  4615. }
  4616. }
  4617. }
  4618. static int ASN1CALL ASN1Enc_DivertingLegInformation1Argument(ASN1encoding_t enc, DivertingLegInformation1Argument *val)
  4619. {
  4620. if (!ASN1PEREncExtensionBitClear(enc))
  4621. return 0;
  4622. if (!ASN1PEREncBits(enc, 4, (val)->o))
  4623. return 0;
  4624. if (!ASN1PEREncExtensionBitClear(enc))
  4625. return 0;
  4626. if (!ASN1PEREncBitVal(enc, 2, (val)->diversionReason))
  4627. return 0;
  4628. if (!ASN1PEREncExtensionBitClear(enc))
  4629. return 0;
  4630. if (!ASN1PEREncBitVal(enc, 2, (val)->subscriptionOption))
  4631. return 0;
  4632. if (!ASN1Enc_EndpointAddress(enc, &(val)->nominatedNr))
  4633. return 0;
  4634. if ((val)->o[0] & 0x80) {
  4635. if (!ASN1PEREncBitVal(enc, 7, ((val)->nominatedInfo).length - 1))
  4636. return 0;
  4637. ASN1PEREncAlignment(enc);
  4638. if (!ASN1PEREncChar16String(enc, ((val)->nominatedInfo).length, ((val)->nominatedInfo).value, 16))
  4639. return 0;
  4640. }
  4641. if ((val)->o[0] & 0x40) {
  4642. if (!ASN1Enc_EndpointAddress(enc, &(val)->redirectingNr))
  4643. return 0;
  4644. }
  4645. if ((val)->o[0] & 0x20) {
  4646. if (!ASN1PEREncBitVal(enc, 7, ((val)->redirectingInfo).length - 1))
  4647. return 0;
  4648. ASN1PEREncAlignment(enc);
  4649. if (!ASN1PEREncChar16String(enc, ((val)->redirectingInfo).length, ((val)->redirectingInfo).value, 16))
  4650. return 0;
  4651. }
  4652. if ((val)->o[0] & 0x10) {
  4653. if (!ASN1Enc_DivertingLegInformation1Argument_extension(enc, &(val)->extension))
  4654. return 0;
  4655. }
  4656. return 1;
  4657. }
  4658. static int ASN1CALL ASN1Dec_DivertingLegInformation1Argument(ASN1decoding_t dec, DivertingLegInformation1Argument *val)
  4659. {
  4660. ASN1uint32_t y;
  4661. ASN1uint32_t x;
  4662. if (!ASN1PERDecExtensionBit(dec, &y))
  4663. return 0;
  4664. if (!ASN1PERDecExtension(dec, 4, (val)->o))
  4665. return 0;
  4666. if (!ASN1PERDecExtensionBit(dec, &x))
  4667. return 0;
  4668. if (!x) {
  4669. if (!ASN1PERDecU32Val(dec, 2, &(val)->diversionReason))
  4670. return 0;
  4671. } else {
  4672. if (!ASN1PERDecSkipNormallySmall(dec))
  4673. return 0;
  4674. }
  4675. if (!ASN1PERDecExtensionBit(dec, &x))
  4676. return 0;
  4677. if (!x) {
  4678. if (!ASN1PERDecU32Val(dec, 2, &(val)->subscriptionOption))
  4679. return 0;
  4680. } else {
  4681. if (!ASN1PERDecSkipNormallySmall(dec))
  4682. return 0;
  4683. }
  4684. if (!ASN1Dec_EndpointAddress(dec, &(val)->nominatedNr))
  4685. return 0;
  4686. if ((val)->o[0] & 0x80) {
  4687. if (!ASN1PERDecU32Val(dec, 7, &((val)->nominatedInfo).length))
  4688. return 0;
  4689. ((val)->nominatedInfo).length += 1;
  4690. ASN1PERDecAlignment(dec);
  4691. if (!ASN1PERDecChar16String(dec, ((val)->nominatedInfo).length, &((val)->nominatedInfo).value, 16))
  4692. return 0;
  4693. }
  4694. if ((val)->o[0] & 0x40) {
  4695. if (!ASN1Dec_EndpointAddress(dec, &(val)->redirectingNr))
  4696. return 0;
  4697. }
  4698. if ((val)->o[0] & 0x20) {
  4699. if (!ASN1PERDecU32Val(dec, 7, &((val)->redirectingInfo).length))
  4700. return 0;
  4701. ((val)->redirectingInfo).length += 1;
  4702. ASN1PERDecAlignment(dec);
  4703. if (!ASN1PERDecChar16String(dec, ((val)->redirectingInfo).length, &((val)->redirectingInfo).value, 16))
  4704. return 0;
  4705. }
  4706. if ((val)->o[0] & 0x10) {
  4707. if (!ASN1Dec_DivertingLegInformation1Argument_extension(dec, &(val)->extension))
  4708. return 0;
  4709. }
  4710. if (y) {
  4711. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4712. return 0;
  4713. }
  4714. return 1;
  4715. }
  4716. static void ASN1CALL ASN1Free_DivertingLegInformation1Argument(DivertingLegInformation1Argument *val)
  4717. {
  4718. if (val) {
  4719. ASN1Free_EndpointAddress(&(val)->nominatedNr);
  4720. if ((val)->o[0] & 0x80) {
  4721. ASN1char16string_free(&(val)->nominatedInfo);
  4722. }
  4723. if ((val)->o[0] & 0x40) {
  4724. ASN1Free_EndpointAddress(&(val)->redirectingNr);
  4725. }
  4726. if ((val)->o[0] & 0x20) {
  4727. ASN1char16string_free(&(val)->redirectingInfo);
  4728. }
  4729. if ((val)->o[0] & 0x10) {
  4730. ASN1Free_DivertingLegInformation1Argument_extension(&(val)->extension);
  4731. }
  4732. }
  4733. }
  4734. static int ASN1CALL ASN1Enc_DivertingLegInformation2Argument(ASN1encoding_t enc, DivertingLegInformation2Argument *val)
  4735. {
  4736. if (!ASN1PEREncExtensionBitClear(enc))
  4737. return 0;
  4738. if (!ASN1PEREncBits(enc, 6, (val)->o))
  4739. return 0;
  4740. if (!ASN1PEREncBitVal(enc, 4, (val)->diversionCounter - 1))
  4741. return 0;
  4742. if (!ASN1PEREncExtensionBitClear(enc))
  4743. return 0;
  4744. if (!ASN1PEREncBitVal(enc, 2, (val)->diversionReason))
  4745. return 0;
  4746. if ((val)->o[0] & 0x80) {
  4747. if (!ASN1PEREncExtensionBitClear(enc))
  4748. return 0;
  4749. if (!ASN1PEREncBitVal(enc, 2, (val)->originalDiversionReason))
  4750. return 0;
  4751. }
  4752. if ((val)->o[0] & 0x40) {
  4753. if (!ASN1Enc_EndpointAddress(enc, &(val)->divertingNr))
  4754. return 0;
  4755. }
  4756. if ((val)->o[0] & 0x20) {
  4757. if (!ASN1Enc_EndpointAddress(enc, &(val)->originalCalledNr))
  4758. return 0;
  4759. }
  4760. if ((val)->o[0] & 0x10) {
  4761. if (!ASN1PEREncBitVal(enc, 7, ((val)->redirectingInfo).length - 1))
  4762. return 0;
  4763. ASN1PEREncAlignment(enc);
  4764. if (!ASN1PEREncChar16String(enc, ((val)->redirectingInfo).length, ((val)->redirectingInfo).value, 16))
  4765. return 0;
  4766. }
  4767. if ((val)->o[0] & 0x8) {
  4768. if (!ASN1PEREncBitVal(enc, 7, ((val)->originalCalledInfo).length - 1))
  4769. return 0;
  4770. ASN1PEREncAlignment(enc);
  4771. if (!ASN1PEREncChar16String(enc, ((val)->originalCalledInfo).length, ((val)->originalCalledInfo).value, 16))
  4772. return 0;
  4773. }
  4774. if ((val)->o[0] & 0x4) {
  4775. if (!ASN1Enc_DivertingLegInformation2Argument_extension(enc, &(val)->extension))
  4776. return 0;
  4777. }
  4778. return 1;
  4779. }
  4780. static int ASN1CALL ASN1Dec_DivertingLegInformation2Argument(ASN1decoding_t dec, DivertingLegInformation2Argument *val)
  4781. {
  4782. ASN1uint32_t y;
  4783. ASN1uint32_t x;
  4784. if (!ASN1PERDecExtensionBit(dec, &y))
  4785. return 0;
  4786. if (!ASN1PERDecExtension(dec, 6, (val)->o))
  4787. return 0;
  4788. if (!ASN1PERDecU16Val(dec, 4, &(val)->diversionCounter))
  4789. return 0;
  4790. (val)->diversionCounter += 1;
  4791. if (!ASN1PERDecExtensionBit(dec, &x))
  4792. return 0;
  4793. if (!x) {
  4794. if (!ASN1PERDecU32Val(dec, 2, &(val)->diversionReason))
  4795. return 0;
  4796. } else {
  4797. if (!ASN1PERDecSkipNormallySmall(dec))
  4798. return 0;
  4799. }
  4800. if ((val)->o[0] & 0x80) {
  4801. if (!ASN1PERDecExtensionBit(dec, &x))
  4802. return 0;
  4803. if (!x) {
  4804. if (!ASN1PERDecU32Val(dec, 2, &(val)->originalDiversionReason))
  4805. return 0;
  4806. } else {
  4807. if (!ASN1PERDecSkipNormallySmall(dec))
  4808. return 0;
  4809. }
  4810. }
  4811. if ((val)->o[0] & 0x40) {
  4812. if (!ASN1Dec_EndpointAddress(dec, &(val)->divertingNr))
  4813. return 0;
  4814. }
  4815. if ((val)->o[0] & 0x20) {
  4816. if (!ASN1Dec_EndpointAddress(dec, &(val)->originalCalledNr))
  4817. return 0;
  4818. }
  4819. if ((val)->o[0] & 0x10) {
  4820. if (!ASN1PERDecU32Val(dec, 7, &((val)->redirectingInfo).length))
  4821. return 0;
  4822. ((val)->redirectingInfo).length += 1;
  4823. ASN1PERDecAlignment(dec);
  4824. if (!ASN1PERDecChar16String(dec, ((val)->redirectingInfo).length, &((val)->redirectingInfo).value, 16))
  4825. return 0;
  4826. }
  4827. if ((val)->o[0] & 0x8) {
  4828. if (!ASN1PERDecU32Val(dec, 7, &((val)->originalCalledInfo).length))
  4829. return 0;
  4830. ((val)->originalCalledInfo).length += 1;
  4831. ASN1PERDecAlignment(dec);
  4832. if (!ASN1PERDecChar16String(dec, ((val)->originalCalledInfo).length, &((val)->originalCalledInfo).value, 16))
  4833. return 0;
  4834. }
  4835. if ((val)->o[0] & 0x4) {
  4836. if (!ASN1Dec_DivertingLegInformation2Argument_extension(dec, &(val)->extension))
  4837. return 0;
  4838. }
  4839. if (y) {
  4840. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4841. return 0;
  4842. }
  4843. return 1;
  4844. }
  4845. static void ASN1CALL ASN1Free_DivertingLegInformation2Argument(DivertingLegInformation2Argument *val)
  4846. {
  4847. if (val) {
  4848. if ((val)->o[0] & 0x40) {
  4849. ASN1Free_EndpointAddress(&(val)->divertingNr);
  4850. }
  4851. if ((val)->o[0] & 0x20) {
  4852. ASN1Free_EndpointAddress(&(val)->originalCalledNr);
  4853. }
  4854. if ((val)->o[0] & 0x10) {
  4855. ASN1char16string_free(&(val)->redirectingInfo);
  4856. }
  4857. if ((val)->o[0] & 0x8) {
  4858. ASN1char16string_free(&(val)->originalCalledInfo);
  4859. }
  4860. if ((val)->o[0] & 0x4) {
  4861. ASN1Free_DivertingLegInformation2Argument_extension(&(val)->extension);
  4862. }
  4863. }
  4864. }
  4865. static int ASN1CALL ASN1Enc_DivertingLegInformation3Argument(ASN1encoding_t enc, DivertingLegInformation3Argument *val)
  4866. {
  4867. if (!ASN1PEREncExtensionBitClear(enc))
  4868. return 0;
  4869. if (!ASN1PEREncBits(enc, 3, (val)->o))
  4870. return 0;
  4871. if (!ASN1PEREncBoolean(enc, (val)->presentationAllowedIndicator))
  4872. return 0;
  4873. if ((val)->o[0] & 0x80) {
  4874. if (!ASN1Enc_EndpointAddress(enc, &(val)->redirectionNr))
  4875. return 0;
  4876. }
  4877. if ((val)->o[0] & 0x40) {
  4878. if (!ASN1PEREncBitVal(enc, 7, ((val)->redirectionInfo).length - 1))
  4879. return 0;
  4880. ASN1PEREncAlignment(enc);
  4881. if (!ASN1PEREncChar16String(enc, ((val)->redirectionInfo).length, ((val)->redirectionInfo).value, 16))
  4882. return 0;
  4883. }
  4884. if ((val)->o[0] & 0x20) {
  4885. if (!ASN1Enc_DivertingLegInformation3Argument_extension(enc, &(val)->extension))
  4886. return 0;
  4887. }
  4888. return 1;
  4889. }
  4890. static int ASN1CALL ASN1Dec_DivertingLegInformation3Argument(ASN1decoding_t dec, DivertingLegInformation3Argument *val)
  4891. {
  4892. ASN1uint32_t y;
  4893. if (!ASN1PERDecExtensionBit(dec, &y))
  4894. return 0;
  4895. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  4896. return 0;
  4897. if (!ASN1PERDecBoolean(dec, &(val)->presentationAllowedIndicator))
  4898. return 0;
  4899. if ((val)->o[0] & 0x80) {
  4900. if (!ASN1Dec_EndpointAddress(dec, &(val)->redirectionNr))
  4901. return 0;
  4902. }
  4903. if ((val)->o[0] & 0x40) {
  4904. if (!ASN1PERDecU32Val(dec, 7, &((val)->redirectionInfo).length))
  4905. return 0;
  4906. ((val)->redirectionInfo).length += 1;
  4907. ASN1PERDecAlignment(dec);
  4908. if (!ASN1PERDecChar16String(dec, ((val)->redirectionInfo).length, &((val)->redirectionInfo).value, 16))
  4909. return 0;
  4910. }
  4911. if ((val)->o[0] & 0x20) {
  4912. if (!ASN1Dec_DivertingLegInformation3Argument_extension(dec, &(val)->extension))
  4913. return 0;
  4914. }
  4915. if (y) {
  4916. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4917. return 0;
  4918. }
  4919. return 1;
  4920. }
  4921. static void ASN1CALL ASN1Free_DivertingLegInformation3Argument(DivertingLegInformation3Argument *val)
  4922. {
  4923. if (val) {
  4924. if ((val)->o[0] & 0x80) {
  4925. ASN1Free_EndpointAddress(&(val)->redirectionNr);
  4926. }
  4927. if ((val)->o[0] & 0x40) {
  4928. ASN1char16string_free(&(val)->redirectionInfo);
  4929. }
  4930. if ((val)->o[0] & 0x20) {
  4931. ASN1Free_DivertingLegInformation3Argument_extension(&(val)->extension);
  4932. }
  4933. }
  4934. }
  4935. static int ASN1CALL ASN1Enc_DivertingLegInformation4Argument(ASN1encoding_t enc, DivertingLegInformation4Argument *val)
  4936. {
  4937. if (!ASN1PEREncExtensionBitClear(enc))
  4938. return 0;
  4939. if (!ASN1PEREncBits(enc, 3, (val)->o))
  4940. return 0;
  4941. if (!ASN1PEREncExtensionBitClear(enc))
  4942. return 0;
  4943. if (!ASN1PEREncBitVal(enc, 2, (val)->diversionReason))
  4944. return 0;
  4945. if (!ASN1PEREncExtensionBitClear(enc))
  4946. return 0;
  4947. if (!ASN1PEREncBitVal(enc, 2, (val)->subscriptionOption))
  4948. return 0;
  4949. if (!ASN1Enc_EndpointAddress(enc, &(val)->callingNr))
  4950. return 0;
  4951. if ((val)->o[0] & 0x80) {
  4952. if (!ASN1PEREncBitVal(enc, 7, ((val)->callingInfo).length - 1))
  4953. return 0;
  4954. ASN1PEREncAlignment(enc);
  4955. if (!ASN1PEREncChar16String(enc, ((val)->callingInfo).length, ((val)->callingInfo).value, 16))
  4956. return 0;
  4957. }
  4958. if (!ASN1Enc_EndpointAddress(enc, &(val)->nominatedNr))
  4959. return 0;
  4960. if ((val)->o[0] & 0x40) {
  4961. if (!ASN1PEREncBitVal(enc, 7, ((val)->nominatedInfo).length - 1))
  4962. return 0;
  4963. ASN1PEREncAlignment(enc);
  4964. if (!ASN1PEREncChar16String(enc, ((val)->nominatedInfo).length, ((val)->nominatedInfo).value, 16))
  4965. return 0;
  4966. }
  4967. if ((val)->o[0] & 0x20) {
  4968. if (!ASN1Enc_DivertingLegInformation4Argument_extension(enc, &(val)->extension))
  4969. return 0;
  4970. }
  4971. return 1;
  4972. }
  4973. static int ASN1CALL ASN1Dec_DivertingLegInformation4Argument(ASN1decoding_t dec, DivertingLegInformation4Argument *val)
  4974. {
  4975. ASN1uint32_t y;
  4976. ASN1uint32_t x;
  4977. if (!ASN1PERDecExtensionBit(dec, &y))
  4978. return 0;
  4979. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  4980. return 0;
  4981. if (!ASN1PERDecExtensionBit(dec, &x))
  4982. return 0;
  4983. if (!x) {
  4984. if (!ASN1PERDecU32Val(dec, 2, &(val)->diversionReason))
  4985. return 0;
  4986. } else {
  4987. if (!ASN1PERDecSkipNormallySmall(dec))
  4988. return 0;
  4989. }
  4990. if (!ASN1PERDecExtensionBit(dec, &x))
  4991. return 0;
  4992. if (!x) {
  4993. if (!ASN1PERDecU32Val(dec, 2, &(val)->subscriptionOption))
  4994. return 0;
  4995. } else {
  4996. if (!ASN1PERDecSkipNormallySmall(dec))
  4997. return 0;
  4998. }
  4999. if (!ASN1Dec_EndpointAddress(dec, &(val)->callingNr))
  5000. return 0;
  5001. if ((val)->o[0] & 0x80) {
  5002. if (!ASN1PERDecU32Val(dec, 7, &((val)->callingInfo).length))
  5003. return 0;
  5004. ((val)->callingInfo).length += 1;
  5005. ASN1PERDecAlignment(dec);
  5006. if (!ASN1PERDecChar16String(dec, ((val)->callingInfo).length, &((val)->callingInfo).value, 16))
  5007. return 0;
  5008. }
  5009. if (!ASN1Dec_EndpointAddress(dec, &(val)->nominatedNr))
  5010. return 0;
  5011. if ((val)->o[0] & 0x40) {
  5012. if (!ASN1PERDecU32Val(dec, 7, &((val)->nominatedInfo).length))
  5013. return 0;
  5014. ((val)->nominatedInfo).length += 1;
  5015. ASN1PERDecAlignment(dec);
  5016. if (!ASN1PERDecChar16String(dec, ((val)->nominatedInfo).length, &((val)->nominatedInfo).value, 16))
  5017. return 0;
  5018. }
  5019. if ((val)->o[0] & 0x20) {
  5020. if (!ASN1Dec_DivertingLegInformation4Argument_extension(dec, &(val)->extension))
  5021. return 0;
  5022. }
  5023. if (y) {
  5024. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5025. return 0;
  5026. }
  5027. return 1;
  5028. }
  5029. static void ASN1CALL ASN1Free_DivertingLegInformation4Argument(DivertingLegInformation4Argument *val)
  5030. {
  5031. if (val) {
  5032. ASN1Free_EndpointAddress(&(val)->callingNr);
  5033. if ((val)->o[0] & 0x80) {
  5034. ASN1char16string_free(&(val)->callingInfo);
  5035. }
  5036. ASN1Free_EndpointAddress(&(val)->nominatedNr);
  5037. if ((val)->o[0] & 0x40) {
  5038. ASN1char16string_free(&(val)->nominatedInfo);
  5039. }
  5040. if ((val)->o[0] & 0x20) {
  5041. ASN1Free_DivertingLegInformation4Argument_extension(&(val)->extension);
  5042. }
  5043. }
  5044. }
  5045. static int ASN1CALL ASN1Enc_IntResult(ASN1encoding_t enc, IntResult *val)
  5046. {
  5047. ASN1octet_t o[1];
  5048. ASN1uint32_t u;
  5049. CopyMemory(o, (val)->o, 1);
  5050. if (!(val)->remoteEnabled)
  5051. o[0] &= ~0x80;
  5052. if (!ASN1PEREncExtensionBitClear(enc))
  5053. return 0;
  5054. if (!ASN1PEREncBits(enc, 2, o))
  5055. return 0;
  5056. if (!ASN1Enc_EndpointAddress(enc, &(val)->servedUserNr))
  5057. return 0;
  5058. switch ((val)->basicService) {
  5059. case 0:
  5060. u = 0;
  5061. break;
  5062. case 1:
  5063. u = 1;
  5064. break;
  5065. case 2:
  5066. u = 2;
  5067. break;
  5068. case 3:
  5069. u = 3;
  5070. break;
  5071. case 32:
  5072. u = 4;
  5073. break;
  5074. case 33:
  5075. u = 5;
  5076. break;
  5077. case 34:
  5078. u = 6;
  5079. break;
  5080. case 35:
  5081. u = 7;
  5082. break;
  5083. case 36:
  5084. u = 8;
  5085. break;
  5086. }
  5087. if (!ASN1PEREncExtensionBitClear(enc))
  5088. return 0;
  5089. if (!ASN1PEREncBitVal(enc, 4, u))
  5090. return 0;
  5091. if (!ASN1PEREncExtensionBitClear(enc))
  5092. return 0;
  5093. if (!ASN1PEREncBitVal(enc, 2, (val)->procedure))
  5094. return 0;
  5095. if (!ASN1Enc_EndpointAddress(enc, &(val)->divertedToAddress))
  5096. return 0;
  5097. if (o[0] & 0x80) {
  5098. if (!ASN1PEREncBoolean(enc, (val)->remoteEnabled))
  5099. return 0;
  5100. }
  5101. if (o[0] & 0x40) {
  5102. if (!ASN1Enc_IntResult_extension(enc, &(val)->extension))
  5103. return 0;
  5104. }
  5105. return 1;
  5106. }
  5107. static int ASN1CALL ASN1Dec_IntResult(ASN1decoding_t dec, IntResult *val)
  5108. {
  5109. ASN1uint32_t y;
  5110. ASN1uint32_t x;
  5111. ASN1uint32_t u;
  5112. if (!ASN1PERDecExtensionBit(dec, &y))
  5113. return 0;
  5114. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  5115. return 0;
  5116. if (!ASN1Dec_EndpointAddress(dec, &(val)->servedUserNr))
  5117. return 0;
  5118. if (!ASN1PERDecExtensionBit(dec, &x))
  5119. return 0;
  5120. if (!x) {
  5121. if (!ASN1PERDecU32Val(dec, 4, &u))
  5122. return 0;
  5123. switch (u) {
  5124. case 0:
  5125. (val)->basicService = 0;
  5126. break;
  5127. case 1:
  5128. (val)->basicService = 1;
  5129. break;
  5130. case 2:
  5131. (val)->basicService = 2;
  5132. break;
  5133. case 3:
  5134. (val)->basicService = 3;
  5135. break;
  5136. case 4:
  5137. (val)->basicService = 32;
  5138. break;
  5139. case 5:
  5140. (val)->basicService = 33;
  5141. break;
  5142. case 6:
  5143. (val)->basicService = 34;
  5144. break;
  5145. case 7:
  5146. (val)->basicService = 35;
  5147. break;
  5148. case 8:
  5149. (val)->basicService = 36;
  5150. break;
  5151. }
  5152. } else {
  5153. if (!ASN1PERDecSkipNormallySmall(dec))
  5154. return 0;
  5155. }
  5156. if (!ASN1PERDecExtensionBit(dec, &x))
  5157. return 0;
  5158. if (!x) {
  5159. if (!ASN1PERDecU32Val(dec, 2, &(val)->procedure))
  5160. return 0;
  5161. } else {
  5162. if (!ASN1PERDecSkipNormallySmall(dec))
  5163. return 0;
  5164. }
  5165. if (!ASN1Dec_EndpointAddress(dec, &(val)->divertedToAddress))
  5166. return 0;
  5167. if ((val)->o[0] & 0x80) {
  5168. if (!ASN1PERDecBoolean(dec, &(val)->remoteEnabled))
  5169. return 0;
  5170. }
  5171. if ((val)->o[0] & 0x40) {
  5172. if (!ASN1Dec_IntResult_extension(dec, &(val)->extension))
  5173. return 0;
  5174. }
  5175. if (y) {
  5176. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5177. return 0;
  5178. }
  5179. if (!((val)->o[0] & 0x80))
  5180. (val)->remoteEnabled = 0;
  5181. return 1;
  5182. }
  5183. static void ASN1CALL ASN1Free_IntResult(IntResult *val)
  5184. {
  5185. if (val) {
  5186. ASN1Free_EndpointAddress(&(val)->servedUserNr);
  5187. ASN1Free_EndpointAddress(&(val)->divertedToAddress);
  5188. if ((val)->o[0] & 0x40) {
  5189. ASN1Free_IntResult_extension(&(val)->extension);
  5190. }
  5191. }
  5192. }
  5193. static ASN1stringtableentry_t CTInitiateArg_callIdentity_StringTableEntries[] = {
  5194. { 32, 32, 0 }, { 48, 57, 1 },
  5195. };
  5196. static ASN1stringtable_t CTInitiateArg_callIdentity_StringTable = {
  5197. 2, CTInitiateArg_callIdentity_StringTableEntries
  5198. };
  5199. static int ASN1CALL ASN1Enc_CTInitiateArg(ASN1encoding_t enc, CTInitiateArg *val)
  5200. {
  5201. ASN1uint32_t t;
  5202. if (!ASN1PEREncExtensionBitClear(enc))
  5203. return 0;
  5204. if (!ASN1PEREncBits(enc, 1, (val)->o))
  5205. return 0;
  5206. t = lstrlenA((val)->callIdentity);
  5207. if (!ASN1PEREncBitVal(enc, 3, t))
  5208. return 0;
  5209. //nik
  5210. if (t!=0) ASN1PEREncAlignment(enc);
  5211. if (!ASN1PEREncTableCharString(enc, t, (val)->callIdentity, 4, &CTInitiateArg_callIdentity_StringTable))
  5212. return 0;
  5213. if (!ASN1Enc_EndpointAddress(enc, &(val)->reroutingNumber))
  5214. return 0;
  5215. if ((val)->o[0] & 0x80) {
  5216. if (!ASN1Enc_CTInitiateArg_argumentExtension(enc, &(val)->argumentExtension))
  5217. return 0;
  5218. }
  5219. return 1;
  5220. }
  5221. static int ASN1CALL ASN1Dec_CTInitiateArg(ASN1decoding_t dec, CTInitiateArg *val)
  5222. {
  5223. ASN1uint32_t y;
  5224. ASN1uint32_t l;
  5225. if (!ASN1PERDecExtensionBit(dec, &y))
  5226. return 0;
  5227. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  5228. return 0;
  5229. if (!ASN1PERDecU32Val(dec, 3, &l))
  5230. return 0;
  5231. //nik
  5232. if (l!=0) ASN1PERDecAlignment(dec);
  5233. //NikhilB: Fix for the overflow bug 03/02/27
  5234. if ( l >= sizeof((val)->callIdentity) ) {
  5235. ASN1DecSetError(dec, ASN1_ERR_LARGE);
  5236. return 0;
  5237. }
  5238. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->callIdentity, 4, &CTInitiateArg_callIdentity_StringTable))
  5239. return 0;
  5240. if (!ASN1Dec_EndpointAddress(dec, &(val)->reroutingNumber))
  5241. return 0;
  5242. if ((val)->o[0] & 0x80) {
  5243. if (!ASN1Dec_CTInitiateArg_argumentExtension(dec, &(val)->argumentExtension))
  5244. return 0;
  5245. }
  5246. if (y) {
  5247. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5248. return 0;
  5249. }
  5250. return 1;
  5251. }
  5252. static void ASN1CALL ASN1Free_CTInitiateArg(CTInitiateArg *val)
  5253. {
  5254. if (val) {
  5255. ASN1Free_EndpointAddress(&(val)->reroutingNumber);
  5256. if ((val)->o[0] & 0x80) {
  5257. ASN1Free_CTInitiateArg_argumentExtension(&(val)->argumentExtension);
  5258. }
  5259. }
  5260. }
  5261. static ASN1stringtableentry_t CTSetupArg_callIdentity_StringTableEntries[] = {
  5262. { 32, 32, 0 }, { 48, 57, 1 },
  5263. };
  5264. static ASN1stringtable_t CTSetupArg_callIdentity_StringTable = {
  5265. 2, CTSetupArg_callIdentity_StringTableEntries
  5266. };
  5267. static int ASN1CALL ASN1Enc_CTSetupArg(ASN1encoding_t enc, CTSetupArg *val)
  5268. {
  5269. ASN1uint32_t t;
  5270. if (!ASN1PEREncExtensionBitClear(enc))
  5271. return 0;
  5272. if (!ASN1PEREncBits(enc, 2, (val)->o))
  5273. return 0;
  5274. t = lstrlenA((val)->callIdentity);
  5275. if (!ASN1PEREncBitVal(enc, 3, t))
  5276. return 0;
  5277. //nik
  5278. if (t!=0) ASN1PEREncAlignment(enc);
  5279. if (!ASN1PEREncTableCharString(enc, t, (val)->callIdentity, 4, &CTSetupArg_callIdentity_StringTable))
  5280. return 0;
  5281. if ((val)->o[0] & 0x80) {
  5282. if (!ASN1Enc_EndpointAddress(enc, &(val)->transferringNumber))
  5283. return 0;
  5284. }
  5285. if ((val)->o[0] & 0x40) {
  5286. if (!ASN1Enc_CTSetupArg_argumentExtension(enc, &(val)->argumentExtension))
  5287. return 0;
  5288. }
  5289. return 1;
  5290. }
  5291. static int ASN1CALL ASN1Dec_CTSetupArg(ASN1decoding_t dec, CTSetupArg *val)
  5292. {
  5293. ASN1uint32_t y;
  5294. ASN1uint32_t l;
  5295. if (!ASN1PERDecExtensionBit(dec, &y))
  5296. return 0;
  5297. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  5298. return 0;
  5299. if (!ASN1PERDecU32Val(dec, 3, &l))
  5300. return 0;
  5301. //nik
  5302. if (l!=0) ASN1PERDecAlignment(dec);
  5303. //NikhilB: Fix for the overflow bug 03/02/27
  5304. if ( l >= sizeof((val)->callIdentity) ) {
  5305. ASN1DecSetError(dec, ASN1_ERR_LARGE);
  5306. return 0;
  5307. }
  5308. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->callIdentity, 4, &CTSetupArg_callIdentity_StringTable))
  5309. return 0;
  5310. if ((val)->o[0] & 0x80) {
  5311. if (!ASN1Dec_EndpointAddress(dec, &(val)->transferringNumber))
  5312. return 0;
  5313. }
  5314. if ((val)->o[0] & 0x40) {
  5315. if (!ASN1Dec_CTSetupArg_argumentExtension(dec, &(val)->argumentExtension))
  5316. return 0;
  5317. }
  5318. if (y) {
  5319. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5320. return 0;
  5321. }
  5322. return 1;
  5323. }
  5324. static void ASN1CALL ASN1Free_CTSetupArg(CTSetupArg *val)
  5325. {
  5326. if (val) {
  5327. if ((val)->o[0] & 0x80) {
  5328. ASN1Free_EndpointAddress(&(val)->transferringNumber);
  5329. }
  5330. if ((val)->o[0] & 0x40) {
  5331. ASN1Free_CTSetupArg_argumentExtension(&(val)->argumentExtension);
  5332. }
  5333. }
  5334. }
  5335. static ASN1stringtableentry_t CTIdentifyRes_callIdentity_StringTableEntries[] = {
  5336. { 32, 32, 0 }, { 48, 57, 1 },
  5337. };
  5338. static ASN1stringtable_t CTIdentifyRes_callIdentity_StringTable = {
  5339. 2, CTIdentifyRes_callIdentity_StringTableEntries
  5340. };
  5341. static int ASN1CALL ASN1Enc_CTIdentifyRes(ASN1encoding_t enc, CTIdentifyRes *val)
  5342. {
  5343. ASN1uint32_t t;
  5344. if (!ASN1PEREncExtensionBitClear(enc))
  5345. return 0;
  5346. if (!ASN1PEREncBits(enc, 1, (val)->o))
  5347. return 0;
  5348. t = lstrlenA((val)->callIdentity);
  5349. if (!ASN1PEREncBitVal(enc, 3, t))
  5350. return 0;
  5351. //nik
  5352. if (t!=0) ASN1PEREncAlignment(enc);
  5353. if (!ASN1PEREncTableCharString(enc, t, (val)->callIdentity, 4, &CTIdentifyRes_callIdentity_StringTable))
  5354. return 0;
  5355. if (!ASN1Enc_EndpointAddress(enc, &(val)->reroutingNumber))
  5356. return 0;
  5357. if ((val)->o[0] & 0x80) {
  5358. if (!ASN1Enc_CTIdentifyRes_resultExtension(enc, &(val)->resultExtension))
  5359. return 0;
  5360. }
  5361. return 1;
  5362. }
  5363. static int ASN1CALL ASN1Dec_CTIdentifyRes(ASN1decoding_t dec, CTIdentifyRes *val)
  5364. {
  5365. ASN1uint32_t y;
  5366. ASN1uint32_t l;
  5367. if (!ASN1PERDecExtensionBit(dec, &y))
  5368. return 0;
  5369. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  5370. return 0;
  5371. if (!ASN1PERDecU32Val(dec, 3, &l))
  5372. return 0;
  5373. //nik
  5374. if (l!=0) ASN1PERDecAlignment(dec);
  5375. //NikhilB: Fix for the overflow bug 03/02/27
  5376. if ( l >= sizeof((val)->callIdentity) ) {
  5377. ASN1DecSetError(dec, ASN1_ERR_LARGE);
  5378. return 0;
  5379. }
  5380. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->callIdentity, 4, &CTIdentifyRes_callIdentity_StringTable))
  5381. return 0;
  5382. if (!ASN1Dec_EndpointAddress(dec, &(val)->reroutingNumber))
  5383. return 0;
  5384. if ((val)->o[0] & 0x80) {
  5385. if (!ASN1Dec_CTIdentifyRes_resultExtension(dec, &(val)->resultExtension))
  5386. return 0;
  5387. }
  5388. if (y) {
  5389. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5390. return 0;
  5391. }
  5392. return 1;
  5393. }
  5394. static void ASN1CALL ASN1Free_CTIdentifyRes(CTIdentifyRes *val)
  5395. {
  5396. if (val) {
  5397. ASN1Free_EndpointAddress(&(val)->reroutingNumber);
  5398. if ((val)->o[0] & 0x80) {
  5399. ASN1Free_CTIdentifyRes_resultExtension(&(val)->resultExtension);
  5400. }
  5401. }
  5402. }
  5403. static int ASN1CALL ASN1Enc_CTUpdateArg(ASN1encoding_t enc, CTUpdateArg *val)
  5404. {
  5405. if (!ASN1PEREncExtensionBitClear(enc))
  5406. return 0;
  5407. if (!ASN1PEREncBits(enc, 3, (val)->o))
  5408. return 0;
  5409. if (!ASN1Enc_EndpointAddress(enc, &(val)->redirectionNumber))
  5410. return 0;
  5411. if ((val)->o[0] & 0x80) {
  5412. if (!ASN1PEREncBitVal(enc, 7, ((val)->redirectionInfo).length - 1))
  5413. return 0;
  5414. ASN1PEREncAlignment(enc);
  5415. if (!ASN1PEREncChar16String(enc, ((val)->redirectionInfo).length, ((val)->redirectionInfo).value, 16))
  5416. return 0;
  5417. }
  5418. if ((val)->o[0] & 0x40) {
  5419. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->basicCallInfoElements))
  5420. return 0;
  5421. }
  5422. if ((val)->o[0] & 0x20) {
  5423. if (!ASN1Enc_CTUpdateArg_argumentExtension(enc, &(val)->argumentExtension))
  5424. return 0;
  5425. }
  5426. return 1;
  5427. }
  5428. static int ASN1CALL ASN1Dec_CTUpdateArg(ASN1decoding_t dec, CTUpdateArg *val)
  5429. {
  5430. ASN1uint32_t y;
  5431. if (!ASN1PERDecExtensionBit(dec, &y))
  5432. return 0;
  5433. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  5434. return 0;
  5435. if (!ASN1Dec_EndpointAddress(dec, &(val)->redirectionNumber))
  5436. return 0;
  5437. if ((val)->o[0] & 0x80) {
  5438. if (!ASN1PERDecU32Val(dec, 7, &((val)->redirectionInfo).length))
  5439. return 0;
  5440. ((val)->redirectionInfo).length += 1;
  5441. ASN1PERDecAlignment(dec);
  5442. if (!ASN1PERDecChar16String(dec, ((val)->redirectionInfo).length, &((val)->redirectionInfo).value, 16))
  5443. return 0;
  5444. }
  5445. if ((val)->o[0] & 0x40) {
  5446. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->basicCallInfoElements))
  5447. return 0;
  5448. }
  5449. if ((val)->o[0] & 0x20) {
  5450. if (!ASN1Dec_CTUpdateArg_argumentExtension(dec, &(val)->argumentExtension))
  5451. return 0;
  5452. }
  5453. if (y) {
  5454. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5455. return 0;
  5456. }
  5457. return 1;
  5458. }
  5459. static void ASN1CALL ASN1Free_CTUpdateArg(CTUpdateArg *val)
  5460. {
  5461. if (val) {
  5462. ASN1Free_EndpointAddress(&(val)->redirectionNumber);
  5463. if ((val)->o[0] & 0x80) {
  5464. ASN1char16string_free(&(val)->redirectionInfo);
  5465. }
  5466. if ((val)->o[0] & 0x40) {
  5467. ASN1octetstring_free(&(val)->basicCallInfoElements);
  5468. }
  5469. if ((val)->o[0] & 0x20) {
  5470. ASN1Free_CTUpdateArg_argumentExtension(&(val)->argumentExtension);
  5471. }
  5472. }
  5473. }
  5474. static int ASN1CALL ASN1Enc_CTCompleteArg(ASN1encoding_t enc, CTCompleteArg *val)
  5475. {
  5476. ASN1octet_t o[1];
  5477. CopyMemory(o, (val)->o, 1);
  5478. if ((val)->callStatus == 0)
  5479. o[0] &= ~0x20;
  5480. if (!ASN1PEREncExtensionBitClear(enc))
  5481. return 0;
  5482. if (!ASN1PEREncBits(enc, 4, o))
  5483. return 0;
  5484. if (!ASN1PEREncExtensionBitClear(enc))
  5485. return 0;
  5486. if (!ASN1PEREncBitVal(enc, 1, (val)->endDesignation))
  5487. return 0;
  5488. if (!ASN1Enc_EndpointAddress(enc, &(val)->redirectionNumber))
  5489. return 0;
  5490. if (o[0] & 0x80) {
  5491. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->basicCallInfoElements))
  5492. return 0;
  5493. }
  5494. if (o[0] & 0x40) {
  5495. if (!ASN1PEREncBitVal(enc, 7, ((val)->redirectionInfo).length - 1))
  5496. return 0;
  5497. ASN1PEREncAlignment(enc);
  5498. if (!ASN1PEREncChar16String(enc, ((val)->redirectionInfo).length, ((val)->redirectionInfo).value, 16))
  5499. return 0;
  5500. }
  5501. if (o[0] & 0x20) {
  5502. if (!ASN1PEREncExtensionBitClear(enc))
  5503. return 0;
  5504. if (!ASN1PEREncBitVal(enc, 1, (val)->callStatus))
  5505. return 0;
  5506. }
  5507. if (o[0] & 0x10) {
  5508. if (!ASN1Enc_CTCompleteArg_argumentExtension(enc, &(val)->argumentExtension))
  5509. return 0;
  5510. }
  5511. return 1;
  5512. }
  5513. static int ASN1CALL ASN1Dec_CTCompleteArg(ASN1decoding_t dec, CTCompleteArg *val)
  5514. {
  5515. ASN1uint32_t y;
  5516. ASN1uint32_t x;
  5517. if (!ASN1PERDecExtensionBit(dec, &y))
  5518. return 0;
  5519. if (!ASN1PERDecExtension(dec, 4, (val)->o))
  5520. return 0;
  5521. if (!ASN1PERDecExtensionBit(dec, &x))
  5522. return 0;
  5523. if (!x) {
  5524. if (!ASN1PERDecU32Val(dec, 1, &(val)->endDesignation))
  5525. return 0;
  5526. } else {
  5527. if (!ASN1PERDecSkipNormallySmall(dec))
  5528. return 0;
  5529. }
  5530. if (!ASN1Dec_EndpointAddress(dec, &(val)->redirectionNumber))
  5531. return 0;
  5532. if ((val)->o[0] & 0x80) {
  5533. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->basicCallInfoElements))
  5534. return 0;
  5535. }
  5536. if ((val)->o[0] & 0x40) {
  5537. if (!ASN1PERDecU32Val(dec, 7, &((val)->redirectionInfo).length))
  5538. return 0;
  5539. ((val)->redirectionInfo).length += 1;
  5540. ASN1PERDecAlignment(dec);
  5541. if (!ASN1PERDecChar16String(dec, ((val)->redirectionInfo).length, &((val)->redirectionInfo).value, 16))
  5542. return 0;
  5543. }
  5544. if ((val)->o[0] & 0x20) {
  5545. if (!ASN1PERDecExtensionBit(dec, &x))
  5546. return 0;
  5547. if (!x) {
  5548. if (!ASN1PERDecU32Val(dec, 1, &(val)->callStatus))
  5549. return 0;
  5550. } else {
  5551. if (!ASN1PERDecSkipNormallySmall(dec))
  5552. return 0;
  5553. }
  5554. }
  5555. if ((val)->o[0] & 0x10) {
  5556. if (!ASN1Dec_CTCompleteArg_argumentExtension(dec, &(val)->argumentExtension))
  5557. return 0;
  5558. }
  5559. if (y) {
  5560. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5561. return 0;
  5562. }
  5563. if (!((val)->o[0] & 0x20))
  5564. (val)->callStatus = 0;
  5565. return 1;
  5566. }
  5567. static void ASN1CALL ASN1Free_CTCompleteArg(CTCompleteArg *val)
  5568. {
  5569. if (val) {
  5570. ASN1Free_EndpointAddress(&(val)->redirectionNumber);
  5571. if ((val)->o[0] & 0x80) {
  5572. ASN1octetstring_free(&(val)->basicCallInfoElements);
  5573. }
  5574. if ((val)->o[0] & 0x40) {
  5575. ASN1char16string_free(&(val)->redirectionInfo);
  5576. }
  5577. if ((val)->o[0] & 0x10) {
  5578. ASN1Free_CTCompleteArg_argumentExtension(&(val)->argumentExtension);
  5579. }
  5580. }
  5581. }
  5582. static int ASN1CALL ASN1Enc_CTActiveArg(ASN1encoding_t enc, CTActiveArg *val)
  5583. {
  5584. if (!ASN1PEREncExtensionBitClear(enc))
  5585. return 0;
  5586. if (!ASN1PEREncBits(enc, 3, (val)->o))
  5587. return 0;
  5588. if (!ASN1Enc_EndpointAddress(enc, &(val)->connectedAddress))
  5589. return 0;
  5590. if ((val)->o[0] & 0x80) {
  5591. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->basicCallInfoElements))
  5592. return 0;
  5593. }
  5594. if ((val)->o[0] & 0x40) {
  5595. if (!ASN1PEREncBitVal(enc, 7, ((val)->connectedInfo).length - 1))
  5596. return 0;
  5597. ASN1PEREncAlignment(enc);
  5598. if (!ASN1PEREncChar16String(enc, ((val)->connectedInfo).length, ((val)->connectedInfo).value, 16))
  5599. return 0;
  5600. }
  5601. if ((val)->o[0] & 0x20) {
  5602. if (!ASN1Enc_CTActiveArg_argumentExtension(enc, &(val)->argumentExtension))
  5603. return 0;
  5604. }
  5605. return 1;
  5606. }
  5607. static int ASN1CALL ASN1Dec_CTActiveArg(ASN1decoding_t dec, CTActiveArg *val)
  5608. {
  5609. ASN1uint32_t y;
  5610. if (!ASN1PERDecExtensionBit(dec, &y))
  5611. return 0;
  5612. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  5613. return 0;
  5614. if (!ASN1Dec_EndpointAddress(dec, &(val)->connectedAddress))
  5615. return 0;
  5616. if ((val)->o[0] & 0x80) {
  5617. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->basicCallInfoElements))
  5618. return 0;
  5619. }
  5620. if ((val)->o[0] & 0x40) {
  5621. if (!ASN1PERDecU32Val(dec, 7, &((val)->connectedInfo).length))
  5622. return 0;
  5623. ((val)->connectedInfo).length += 1;
  5624. ASN1PERDecAlignment(dec);
  5625. if (!ASN1PERDecChar16String(dec, ((val)->connectedInfo).length, &((val)->connectedInfo).value, 16))
  5626. return 0;
  5627. }
  5628. if ((val)->o[0] & 0x20) {
  5629. if (!ASN1Dec_CTActiveArg_argumentExtension(dec, &(val)->argumentExtension))
  5630. return 0;
  5631. }
  5632. if (y) {
  5633. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5634. return 0;
  5635. }
  5636. return 1;
  5637. }
  5638. static void ASN1CALL ASN1Free_CTActiveArg(CTActiveArg *val)
  5639. {
  5640. if (val) {
  5641. ASN1Free_EndpointAddress(&(val)->connectedAddress);
  5642. if ((val)->o[0] & 0x80) {
  5643. ASN1octetstring_free(&(val)->basicCallInfoElements);
  5644. }
  5645. if ((val)->o[0] & 0x40) {
  5646. ASN1char16string_free(&(val)->connectedInfo);
  5647. }
  5648. if ((val)->o[0] & 0x20) {
  5649. ASN1Free_CTActiveArg_argumentExtension(&(val)->argumentExtension);
  5650. }
  5651. }
  5652. }
  5653. static int ASN1CALL ASN1Enc_CpRequestArg(ASN1encoding_t enc, CpRequestArg *val)
  5654. {
  5655. if (!ASN1PEREncExtensionBitClear(enc))
  5656. return 0;
  5657. if (!ASN1PEREncBits(enc, 2, (val)->o))
  5658. return 0;
  5659. if (!ASN1Enc_EndpointAddress(enc, &(val)->parkingNumber))
  5660. return 0;
  5661. if (!ASN1Enc_EndpointAddress(enc, &(val)->parkedNumber))
  5662. return 0;
  5663. if (!ASN1Enc_EndpointAddress(enc, &(val)->parkedToNumber))
  5664. return 0;
  5665. if ((val)->o[0] & 0x80) {
  5666. if (!ASN1PEREncUnsignedShort(enc, (val)->parkedToPosition))
  5667. return 0;
  5668. }
  5669. if ((val)->o[0] & 0x40) {
  5670. if (!ASN1Enc_CpRequestArg_extensionArg(enc, &(val)->extensionArg))
  5671. return 0;
  5672. }
  5673. return 1;
  5674. }
  5675. static int ASN1CALL ASN1Dec_CpRequestArg(ASN1decoding_t dec, CpRequestArg *val)
  5676. {
  5677. ASN1uint32_t y;
  5678. if (!ASN1PERDecExtensionBit(dec, &y))
  5679. return 0;
  5680. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  5681. return 0;
  5682. if (!ASN1Dec_EndpointAddress(dec, &(val)->parkingNumber))
  5683. return 0;
  5684. if (!ASN1Dec_EndpointAddress(dec, &(val)->parkedNumber))
  5685. return 0;
  5686. if (!ASN1Dec_EndpointAddress(dec, &(val)->parkedToNumber))
  5687. return 0;
  5688. if ((val)->o[0] & 0x80) {
  5689. if (!ASN1PERDecUnsignedShort(dec, &(val)->parkedToPosition))
  5690. return 0;
  5691. }
  5692. if ((val)->o[0] & 0x40) {
  5693. if (!ASN1Dec_CpRequestArg_extensionArg(dec, &(val)->extensionArg))
  5694. return 0;
  5695. }
  5696. if (y) {
  5697. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5698. return 0;
  5699. }
  5700. return 1;
  5701. }
  5702. static void ASN1CALL ASN1Free_CpRequestArg(CpRequestArg *val)
  5703. {
  5704. if (val) {
  5705. ASN1Free_EndpointAddress(&(val)->parkingNumber);
  5706. ASN1Free_EndpointAddress(&(val)->parkedNumber);
  5707. ASN1Free_EndpointAddress(&(val)->parkedToNumber);
  5708. if ((val)->o[0] & 0x40) {
  5709. ASN1Free_CpRequestArg_extensionArg(&(val)->extensionArg);
  5710. }
  5711. }
  5712. }
  5713. static int ASN1CALL ASN1Enc_CpRequestRes(ASN1encoding_t enc, CpRequestRes *val)
  5714. {
  5715. if (!ASN1PEREncExtensionBitClear(enc))
  5716. return 0;
  5717. if (!ASN1PEREncBits(enc, 2, (val)->o))
  5718. return 0;
  5719. if (!ASN1Enc_EndpointAddress(enc, &(val)->parkedToNumber))
  5720. return 0;
  5721. if ((val)->o[0] & 0x80) {
  5722. if (!ASN1PEREncUnsignedShort(enc, (val)->parkedToPosition))
  5723. return 0;
  5724. }
  5725. if (!ASN1PEREncExtensionBitClear(enc))
  5726. return 0;
  5727. if (!ASN1PEREncBitVal(enc, 2, (val)->parkCondition))
  5728. return 0;
  5729. if ((val)->o[0] & 0x40) {
  5730. if (!ASN1Enc_CpRequestRes_extensionRes(enc, &(val)->extensionRes))
  5731. return 0;
  5732. }
  5733. return 1;
  5734. }
  5735. static int ASN1CALL ASN1Dec_CpRequestRes(ASN1decoding_t dec, CpRequestRes *val)
  5736. {
  5737. ASN1uint32_t y;
  5738. ASN1uint32_t x;
  5739. if (!ASN1PERDecExtensionBit(dec, &y))
  5740. return 0;
  5741. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  5742. return 0;
  5743. if (!ASN1Dec_EndpointAddress(dec, &(val)->parkedToNumber))
  5744. return 0;
  5745. if ((val)->o[0] & 0x80) {
  5746. if (!ASN1PERDecUnsignedShort(dec, &(val)->parkedToPosition))
  5747. return 0;
  5748. }
  5749. if (!ASN1PERDecExtensionBit(dec, &x))
  5750. return 0;
  5751. if (!x) {
  5752. if (!ASN1PERDecU32Val(dec, 2, &(val)->parkCondition))
  5753. return 0;
  5754. } else {
  5755. if (!ASN1PERDecSkipNormallySmall(dec))
  5756. return 0;
  5757. }
  5758. if ((val)->o[0] & 0x40) {
  5759. if (!ASN1Dec_CpRequestRes_extensionRes(dec, &(val)->extensionRes))
  5760. return 0;
  5761. }
  5762. if (y) {
  5763. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5764. return 0;
  5765. }
  5766. return 1;
  5767. }
  5768. static void ASN1CALL ASN1Free_CpRequestRes(CpRequestRes *val)
  5769. {
  5770. if (val) {
  5771. ASN1Free_EndpointAddress(&(val)->parkedToNumber);
  5772. if ((val)->o[0] & 0x40) {
  5773. ASN1Free_CpRequestRes_extensionRes(&(val)->extensionRes);
  5774. }
  5775. }
  5776. }
  5777. static int ASN1CALL ASN1Enc_CpSetupArg(ASN1encoding_t enc, CpSetupArg *val)
  5778. {
  5779. if (!ASN1PEREncExtensionBitClear(enc))
  5780. return 0;
  5781. if (!ASN1PEREncBits(enc, 2, (val)->o))
  5782. return 0;
  5783. if (!ASN1Enc_EndpointAddress(enc, &(val)->parkingNumber))
  5784. return 0;
  5785. if (!ASN1Enc_EndpointAddress(enc, &(val)->parkedNumber))
  5786. return 0;
  5787. if (!ASN1Enc_EndpointAddress(enc, &(val)->parkedToNumber))
  5788. return 0;
  5789. if ((val)->o[0] & 0x80) {
  5790. if (!ASN1PEREncUnsignedShort(enc, (val)->parkedToPosition))
  5791. return 0;
  5792. }
  5793. if ((val)->o[0] & 0x40) {
  5794. if (!ASN1Enc_CpSetupArg_extensionArg(enc, &(val)->extensionArg))
  5795. return 0;
  5796. }
  5797. return 1;
  5798. }
  5799. static int ASN1CALL ASN1Dec_CpSetupArg(ASN1decoding_t dec, CpSetupArg *val)
  5800. {
  5801. ASN1uint32_t y;
  5802. if (!ASN1PERDecExtensionBit(dec, &y))
  5803. return 0;
  5804. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  5805. return 0;
  5806. if (!ASN1Dec_EndpointAddress(dec, &(val)->parkingNumber))
  5807. return 0;
  5808. if (!ASN1Dec_EndpointAddress(dec, &(val)->parkedNumber))
  5809. return 0;
  5810. if (!ASN1Dec_EndpointAddress(dec, &(val)->parkedToNumber))
  5811. return 0;
  5812. if ((val)->o[0] & 0x80) {
  5813. if (!ASN1PERDecUnsignedShort(dec, &(val)->parkedToPosition))
  5814. return 0;
  5815. }
  5816. if ((val)->o[0] & 0x40) {
  5817. if (!ASN1Dec_CpSetupArg_extensionArg(dec, &(val)->extensionArg))
  5818. return 0;
  5819. }
  5820. if (y) {
  5821. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5822. return 0;
  5823. }
  5824. return 1;
  5825. }
  5826. static void ASN1CALL ASN1Free_CpSetupArg(CpSetupArg *val)
  5827. {
  5828. if (val) {
  5829. ASN1Free_EndpointAddress(&(val)->parkingNumber);
  5830. ASN1Free_EndpointAddress(&(val)->parkedNumber);
  5831. ASN1Free_EndpointAddress(&(val)->parkedToNumber);
  5832. if ((val)->o[0] & 0x40) {
  5833. ASN1Free_CpSetupArg_extensionArg(&(val)->extensionArg);
  5834. }
  5835. }
  5836. }
  5837. static int ASN1CALL ASN1Enc_CpSetupRes(ASN1encoding_t enc, CpSetupRes *val)
  5838. {
  5839. if (!ASN1PEREncExtensionBitClear(enc))
  5840. return 0;
  5841. if (!ASN1PEREncBits(enc, 2, (val)->o))
  5842. return 0;
  5843. if (!ASN1Enc_EndpointAddress(enc, &(val)->parkedToNumber))
  5844. return 0;
  5845. if ((val)->o[0] & 0x80) {
  5846. if (!ASN1PEREncUnsignedShort(enc, (val)->parkedToPosition))
  5847. return 0;
  5848. }
  5849. if (!ASN1PEREncExtensionBitClear(enc))
  5850. return 0;
  5851. if (!ASN1PEREncBitVal(enc, 2, (val)->parkCondition))
  5852. return 0;
  5853. if ((val)->o[0] & 0x40) {
  5854. if (!ASN1Enc_CpSetupRes_extensionRes(enc, &(val)->extensionRes))
  5855. return 0;
  5856. }
  5857. return 1;
  5858. }
  5859. static int ASN1CALL ASN1Dec_CpSetupRes(ASN1decoding_t dec, CpSetupRes *val)
  5860. {
  5861. ASN1uint32_t y;
  5862. ASN1uint32_t x;
  5863. if (!ASN1PERDecExtensionBit(dec, &y))
  5864. return 0;
  5865. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  5866. return 0;
  5867. if (!ASN1Dec_EndpointAddress(dec, &(val)->parkedToNumber))
  5868. return 0;
  5869. if ((val)->o[0] & 0x80) {
  5870. if (!ASN1PERDecUnsignedShort(dec, &(val)->parkedToPosition))
  5871. return 0;
  5872. }
  5873. if (!ASN1PERDecExtensionBit(dec, &x))
  5874. return 0;
  5875. if (!x) {
  5876. if (!ASN1PERDecU32Val(dec, 2, &(val)->parkCondition))
  5877. return 0;
  5878. } else {
  5879. if (!ASN1PERDecSkipNormallySmall(dec))
  5880. return 0;
  5881. }
  5882. if ((val)->o[0] & 0x40) {
  5883. if (!ASN1Dec_CpSetupRes_extensionRes(dec, &(val)->extensionRes))
  5884. return 0;
  5885. }
  5886. if (y) {
  5887. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5888. return 0;
  5889. }
  5890. return 1;
  5891. }
  5892. static void ASN1CALL ASN1Free_CpSetupRes(CpSetupRes *val)
  5893. {
  5894. if (val) {
  5895. ASN1Free_EndpointAddress(&(val)->parkedToNumber);
  5896. if ((val)->o[0] & 0x40) {
  5897. ASN1Free_CpSetupRes_extensionRes(&(val)->extensionRes);
  5898. }
  5899. }
  5900. }
  5901. static int ASN1CALL ASN1Enc_GroupIndicationOnArg(ASN1encoding_t enc, GroupIndicationOnArg *val)
  5902. {
  5903. if (!ASN1PEREncExtensionBitClear(enc))
  5904. return 0;
  5905. if (!ASN1PEREncBits(enc, 2, (val)->o))
  5906. return 0;
  5907. if (!ASN1Enc_CallIdentifier(enc, &(val)->callPickupId))
  5908. return 0;
  5909. if (!ASN1Enc_EndpointAddress(enc, &(val)->groupMemberUserNr))
  5910. return 0;
  5911. if (!ASN1PEREncExtensionBitClear(enc))
  5912. return 0;
  5913. if (!ASN1PEREncBitVal(enc, 1, (val)->retrieveCallType))
  5914. return 0;
  5915. if (!ASN1Enc_EndpointAddress(enc, &(val)->partyToRetrieve))
  5916. return 0;
  5917. if (!ASN1Enc_EndpointAddress(enc, &(val)->retrieveAddress))
  5918. return 0;
  5919. if ((val)->o[0] & 0x80) {
  5920. if (!ASN1PEREncUnsignedShort(enc, (val)->parkPosition))
  5921. return 0;
  5922. }
  5923. if ((val)->o[0] & 0x40) {
  5924. if (!ASN1Enc_GroupIndicationOnArg_extensionArg(enc, &(val)->extensionArg))
  5925. return 0;
  5926. }
  5927. return 1;
  5928. }
  5929. static int ASN1CALL ASN1Dec_GroupIndicationOnArg(ASN1decoding_t dec, GroupIndicationOnArg *val)
  5930. {
  5931. ASN1uint32_t y;
  5932. ASN1uint32_t x;
  5933. if (!ASN1PERDecExtensionBit(dec, &y))
  5934. return 0;
  5935. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  5936. return 0;
  5937. if (!ASN1Dec_CallIdentifier(dec, &(val)->callPickupId))
  5938. return 0;
  5939. if (!ASN1Dec_EndpointAddress(dec, &(val)->groupMemberUserNr))
  5940. return 0;
  5941. if (!ASN1PERDecExtensionBit(dec, &x))
  5942. return 0;
  5943. if (!x) {
  5944. if (!ASN1PERDecU32Val(dec, 1, &(val)->retrieveCallType))
  5945. return 0;
  5946. } else {
  5947. if (!ASN1PERDecSkipNormallySmall(dec))
  5948. return 0;
  5949. }
  5950. if (!ASN1Dec_EndpointAddress(dec, &(val)->partyToRetrieve))
  5951. return 0;
  5952. if (!ASN1Dec_EndpointAddress(dec, &(val)->retrieveAddress))
  5953. return 0;
  5954. if ((val)->o[0] & 0x80) {
  5955. if (!ASN1PERDecUnsignedShort(dec, &(val)->parkPosition))
  5956. return 0;
  5957. }
  5958. if ((val)->o[0] & 0x40) {
  5959. if (!ASN1Dec_GroupIndicationOnArg_extensionArg(dec, &(val)->extensionArg))
  5960. return 0;
  5961. }
  5962. if (y) {
  5963. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5964. return 0;
  5965. }
  5966. return 1;
  5967. }
  5968. static void ASN1CALL ASN1Free_GroupIndicationOnArg(GroupIndicationOnArg *val)
  5969. {
  5970. if (val) {
  5971. ASN1Free_CallIdentifier(&(val)->callPickupId);
  5972. ASN1Free_EndpointAddress(&(val)->groupMemberUserNr);
  5973. ASN1Free_EndpointAddress(&(val)->partyToRetrieve);
  5974. ASN1Free_EndpointAddress(&(val)->retrieveAddress);
  5975. if ((val)->o[0] & 0x40) {
  5976. ASN1Free_GroupIndicationOnArg_extensionArg(&(val)->extensionArg);
  5977. }
  5978. }
  5979. }
  5980. static int ASN1CALL ASN1Enc_GroupIndicationOffArg(ASN1encoding_t enc, GroupIndicationOffArg *val)
  5981. {
  5982. if (!ASN1PEREncExtensionBitClear(enc))
  5983. return 0;
  5984. if (!ASN1PEREncBits(enc, 1, (val)->o))
  5985. return 0;
  5986. if (!ASN1Enc_CallIdentifier(enc, &(val)->callPickupId))
  5987. return 0;
  5988. if (!ASN1Enc_EndpointAddress(enc, &(val)->groupMemberUserNr))
  5989. return 0;
  5990. if ((val)->o[0] & 0x80) {
  5991. if (!ASN1Enc_GroupIndicationOffArg_extensionArg(enc, &(val)->extensionArg))
  5992. return 0;
  5993. }
  5994. return 1;
  5995. }
  5996. static int ASN1CALL ASN1Dec_GroupIndicationOffArg(ASN1decoding_t dec, GroupIndicationOffArg *val)
  5997. {
  5998. ASN1uint32_t y;
  5999. if (!ASN1PERDecExtensionBit(dec, &y))
  6000. return 0;
  6001. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  6002. return 0;
  6003. if (!ASN1Dec_CallIdentifier(dec, &(val)->callPickupId))
  6004. return 0;
  6005. if (!ASN1Dec_EndpointAddress(dec, &(val)->groupMemberUserNr))
  6006. return 0;
  6007. if ((val)->o[0] & 0x80) {
  6008. if (!ASN1Dec_GroupIndicationOffArg_extensionArg(dec, &(val)->extensionArg))
  6009. return 0;
  6010. }
  6011. if (y) {
  6012. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6013. return 0;
  6014. }
  6015. return 1;
  6016. }
  6017. static void ASN1CALL ASN1Free_GroupIndicationOffArg(GroupIndicationOffArg *val)
  6018. {
  6019. if (val) {
  6020. ASN1Free_CallIdentifier(&(val)->callPickupId);
  6021. ASN1Free_EndpointAddress(&(val)->groupMemberUserNr);
  6022. if ((val)->o[0] & 0x80) {
  6023. ASN1Free_GroupIndicationOffArg_extensionArg(&(val)->extensionArg);
  6024. }
  6025. }
  6026. }
  6027. static int ASN1CALL ASN1Enc_PickrequArg(ASN1encoding_t enc, PickrequArg *val)
  6028. {
  6029. if (!ASN1PEREncExtensionBitClear(enc))
  6030. return 0;
  6031. if (!ASN1PEREncBits(enc, 4, (val)->o))
  6032. return 0;
  6033. if (!ASN1Enc_EndpointAddress(enc, &(val)->picking_upNumber))
  6034. return 0;
  6035. if ((val)->o[0] & 0x80) {
  6036. if (!ASN1Enc_CallIdentifier(enc, &(val)->callPickupId))
  6037. return 0;
  6038. }
  6039. if ((val)->o[0] & 0x40) {
  6040. if (!ASN1Enc_EndpointAddress(enc, &(val)->partyToRetrieve))
  6041. return 0;
  6042. }
  6043. if (!ASN1Enc_EndpointAddress(enc, &(val)->retrieveAddress))
  6044. return 0;
  6045. if ((val)->o[0] & 0x20) {
  6046. if (!ASN1PEREncUnsignedShort(enc, (val)->parkPosition))
  6047. return 0;
  6048. }
  6049. if ((val)->o[0] & 0x10) {
  6050. if (!ASN1Enc_PickrequArg_extensionArg(enc, &(val)->extensionArg))
  6051. return 0;
  6052. }
  6053. return 1;
  6054. }
  6055. static int ASN1CALL ASN1Dec_PickrequArg(ASN1decoding_t dec, PickrequArg *val)
  6056. {
  6057. ASN1uint32_t y;
  6058. if (!ASN1PERDecExtensionBit(dec, &y))
  6059. return 0;
  6060. if (!ASN1PERDecExtension(dec, 4, (val)->o))
  6061. return 0;
  6062. if (!ASN1Dec_EndpointAddress(dec, &(val)->picking_upNumber))
  6063. return 0;
  6064. if ((val)->o[0] & 0x80) {
  6065. if (!ASN1Dec_CallIdentifier(dec, &(val)->callPickupId))
  6066. return 0;
  6067. }
  6068. if ((val)->o[0] & 0x40) {
  6069. if (!ASN1Dec_EndpointAddress(dec, &(val)->partyToRetrieve))
  6070. return 0;
  6071. }
  6072. if (!ASN1Dec_EndpointAddress(dec, &(val)->retrieveAddress))
  6073. return 0;
  6074. if ((val)->o[0] & 0x20) {
  6075. if (!ASN1PERDecUnsignedShort(dec, &(val)->parkPosition))
  6076. return 0;
  6077. }
  6078. if ((val)->o[0] & 0x10) {
  6079. if (!ASN1Dec_PickrequArg_extensionArg(dec, &(val)->extensionArg))
  6080. return 0;
  6081. }
  6082. if (y) {
  6083. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6084. return 0;
  6085. }
  6086. return 1;
  6087. }
  6088. static void ASN1CALL ASN1Free_PickrequArg(PickrequArg *val)
  6089. {
  6090. if (val) {
  6091. ASN1Free_EndpointAddress(&(val)->picking_upNumber);
  6092. if ((val)->o[0] & 0x80) {
  6093. ASN1Free_CallIdentifier(&(val)->callPickupId);
  6094. }
  6095. if ((val)->o[0] & 0x40) {
  6096. ASN1Free_EndpointAddress(&(val)->partyToRetrieve);
  6097. }
  6098. ASN1Free_EndpointAddress(&(val)->retrieveAddress);
  6099. if ((val)->o[0] & 0x10) {
  6100. ASN1Free_PickrequArg_extensionArg(&(val)->extensionArg);
  6101. }
  6102. }
  6103. }
  6104. static int ASN1CALL ASN1Enc_PickupArg(ASN1encoding_t enc, PickupArg *val)
  6105. {
  6106. if (!ASN1PEREncExtensionBitClear(enc))
  6107. return 0;
  6108. if (!ASN1PEREncBits(enc, 1, (val)->o))
  6109. return 0;
  6110. if (!ASN1Enc_CallIdentifier(enc, &(val)->callPickupId))
  6111. return 0;
  6112. if (!ASN1Enc_EndpointAddress(enc, &(val)->picking_upNumber))
  6113. return 0;
  6114. if ((val)->o[0] & 0x80) {
  6115. if (!ASN1Enc_PickupArg_extensionArg(enc, &(val)->extensionArg))
  6116. return 0;
  6117. }
  6118. return 1;
  6119. }
  6120. static int ASN1CALL ASN1Dec_PickupArg(ASN1decoding_t dec, PickupArg *val)
  6121. {
  6122. ASN1uint32_t y;
  6123. if (!ASN1PERDecExtensionBit(dec, &y))
  6124. return 0;
  6125. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  6126. return 0;
  6127. if (!ASN1Dec_CallIdentifier(dec, &(val)->callPickupId))
  6128. return 0;
  6129. if (!ASN1Dec_EndpointAddress(dec, &(val)->picking_upNumber))
  6130. return 0;
  6131. if ((val)->o[0] & 0x80) {
  6132. if (!ASN1Dec_PickupArg_extensionArg(dec, &(val)->extensionArg))
  6133. return 0;
  6134. }
  6135. if (y) {
  6136. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6137. return 0;
  6138. }
  6139. return 1;
  6140. }
  6141. static void ASN1CALL ASN1Free_PickupArg(PickupArg *val)
  6142. {
  6143. if (val) {
  6144. ASN1Free_CallIdentifier(&(val)->callPickupId);
  6145. ASN1Free_EndpointAddress(&(val)->picking_upNumber);
  6146. if ((val)->o[0] & 0x80) {
  6147. ASN1Free_PickupArg_extensionArg(&(val)->extensionArg);
  6148. }
  6149. }
  6150. }
  6151. static int ASN1CALL ASN1Enc_PickExeArg(ASN1encoding_t enc, PickExeArg *val)
  6152. {
  6153. if (!ASN1PEREncExtensionBitClear(enc))
  6154. return 0;
  6155. if (!ASN1PEREncBits(enc, 1, (val)->o))
  6156. return 0;
  6157. if (!ASN1Enc_CallIdentifier(enc, &(val)->callPickupId))
  6158. return 0;
  6159. if (!ASN1Enc_EndpointAddress(enc, &(val)->picking_upNumber))
  6160. return 0;
  6161. if (!ASN1Enc_EndpointAddress(enc, &(val)->partyToRetrieve))
  6162. return 0;
  6163. if ((val)->o[0] & 0x80) {
  6164. if (!ASN1Enc_PickExeArg_extensionArg(enc, &(val)->extensionArg))
  6165. return 0;
  6166. }
  6167. return 1;
  6168. }
  6169. static int ASN1CALL ASN1Dec_PickExeArg(ASN1decoding_t dec, PickExeArg *val)
  6170. {
  6171. ASN1uint32_t y;
  6172. if (!ASN1PERDecExtensionBit(dec, &y))
  6173. return 0;
  6174. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  6175. return 0;
  6176. if (!ASN1Dec_CallIdentifier(dec, &(val)->callPickupId))
  6177. return 0;
  6178. if (!ASN1Dec_EndpointAddress(dec, &(val)->picking_upNumber))
  6179. return 0;
  6180. if (!ASN1Dec_EndpointAddress(dec, &(val)->partyToRetrieve))
  6181. return 0;
  6182. if ((val)->o[0] & 0x80) {
  6183. if (!ASN1Dec_PickExeArg_extensionArg(dec, &(val)->extensionArg))
  6184. return 0;
  6185. }
  6186. if (y) {
  6187. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6188. return 0;
  6189. }
  6190. return 1;
  6191. }
  6192. static void ASN1CALL ASN1Free_PickExeArg(PickExeArg *val)
  6193. {
  6194. if (val) {
  6195. ASN1Free_CallIdentifier(&(val)->callPickupId);
  6196. ASN1Free_EndpointAddress(&(val)->picking_upNumber);
  6197. ASN1Free_EndpointAddress(&(val)->partyToRetrieve);
  6198. if ((val)->o[0] & 0x80) {
  6199. ASN1Free_PickExeArg_extensionArg(&(val)->extensionArg);
  6200. }
  6201. }
  6202. }
  6203. static int ASN1CALL ASN1Enc_CpNotifyArg(ASN1encoding_t enc, CpNotifyArg *val)
  6204. {
  6205. if (!ASN1PEREncExtensionBitClear(enc))
  6206. return 0;
  6207. if (!ASN1PEREncBits(enc, 2, (val)->o))
  6208. return 0;
  6209. if ((val)->o[0] & 0x80) {
  6210. if (!ASN1Enc_EndpointAddress(enc, &(val)->parkingNumber))
  6211. return 0;
  6212. }
  6213. if ((val)->o[0] & 0x40) {
  6214. if (!ASN1Enc_CpNotifyArg_extensionArg(enc, &(val)->extensionArg))
  6215. return 0;
  6216. }
  6217. return 1;
  6218. }
  6219. static int ASN1CALL ASN1Dec_CpNotifyArg(ASN1decoding_t dec, CpNotifyArg *val)
  6220. {
  6221. ASN1uint32_t y;
  6222. if (!ASN1PERDecExtensionBit(dec, &y))
  6223. return 0;
  6224. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  6225. return 0;
  6226. if ((val)->o[0] & 0x80) {
  6227. if (!ASN1Dec_EndpointAddress(dec, &(val)->parkingNumber))
  6228. return 0;
  6229. }
  6230. if ((val)->o[0] & 0x40) {
  6231. if (!ASN1Dec_CpNotifyArg_extensionArg(dec, &(val)->extensionArg))
  6232. return 0;
  6233. }
  6234. if (y) {
  6235. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6236. return 0;
  6237. }
  6238. return 1;
  6239. }
  6240. static void ASN1CALL ASN1Free_CpNotifyArg(CpNotifyArg *val)
  6241. {
  6242. if (val) {
  6243. if ((val)->o[0] & 0x80) {
  6244. ASN1Free_EndpointAddress(&(val)->parkingNumber);
  6245. }
  6246. if ((val)->o[0] & 0x40) {
  6247. ASN1Free_CpNotifyArg_extensionArg(&(val)->extensionArg);
  6248. }
  6249. }
  6250. }
  6251. static int ASN1CALL ASN1Enc_CpickupNotifyArg(ASN1encoding_t enc, CpickupNotifyArg *val)
  6252. {
  6253. if (!ASN1PEREncExtensionBitClear(enc))
  6254. return 0;
  6255. if (!ASN1PEREncBits(enc, 2, (val)->o))
  6256. return 0;
  6257. if ((val)->o[0] & 0x80) {
  6258. if (!ASN1Enc_EndpointAddress(enc, &(val)->picking_upNumber))
  6259. return 0;
  6260. }
  6261. if ((val)->o[0] & 0x40) {
  6262. if (!ASN1Enc_CpickupNotifyArg_extensionArg(enc, &(val)->extensionArg))
  6263. return 0;
  6264. }
  6265. return 1;
  6266. }
  6267. static int ASN1CALL ASN1Dec_CpickupNotifyArg(ASN1decoding_t dec, CpickupNotifyArg *val)
  6268. {
  6269. ASN1uint32_t y;
  6270. if (!ASN1PERDecExtensionBit(dec, &y))
  6271. return 0;
  6272. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  6273. return 0;
  6274. if ((val)->o[0] & 0x80) {
  6275. if (!ASN1Dec_EndpointAddress(dec, &(val)->picking_upNumber))
  6276. return 0;
  6277. }
  6278. if ((val)->o[0] & 0x40) {
  6279. if (!ASN1Dec_CpickupNotifyArg_extensionArg(dec, &(val)->extensionArg))
  6280. return 0;
  6281. }
  6282. if (y) {
  6283. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6284. return 0;
  6285. }
  6286. return 1;
  6287. }
  6288. static void ASN1CALL ASN1Free_CpickupNotifyArg(CpickupNotifyArg *val)
  6289. {
  6290. if (val) {
  6291. if ((val)->o[0] & 0x80) {
  6292. ASN1Free_EndpointAddress(&(val)->picking_upNumber);
  6293. }
  6294. if ((val)->o[0] & 0x40) {
  6295. ASN1Free_CpickupNotifyArg_extensionArg(&(val)->extensionArg);
  6296. }
  6297. }
  6298. }
  6299. static int ASN1CALL ASN1Enc_H4501SupplementaryService(ASN1encoding_t enc, H4501SupplementaryService *val)
  6300. {
  6301. if (!ASN1PEREncExtensionBitClear(enc))
  6302. return 0;
  6303. if (!ASN1PEREncBits(enc, 2, (val)->o))
  6304. return 0;
  6305. if ((val)->o[0] & 0x80) {
  6306. if (!ASN1Enc_NetworkFacilityExtension(enc, &(val)->networkFacilityExtension))
  6307. return 0;
  6308. }
  6309. if ((val)->o[0] & 0x40) {
  6310. if (!ASN1Enc_InterpretationApdu(enc, &(val)->interpretationApdu))
  6311. return 0;
  6312. }
  6313. if (!ASN1Enc_ServiceApdus(enc, &(val)->serviceApdu))
  6314. return 0;
  6315. return 1;
  6316. }
  6317. static int ASN1CALL ASN1Dec_H4501SupplementaryService(ASN1decoding_t dec, H4501SupplementaryService *val)
  6318. {
  6319. ASN1uint32_t y;
  6320. if (!ASN1PERDecExtensionBit(dec, &y))
  6321. return 0;
  6322. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  6323. return 0;
  6324. if ((val)->o[0] & 0x80) {
  6325. if (!ASN1Dec_NetworkFacilityExtension(dec, &(val)->networkFacilityExtension))
  6326. return 0;
  6327. }
  6328. if ((val)->o[0] & 0x40) {
  6329. if (!ASN1Dec_InterpretationApdu(dec, &(val)->interpretationApdu))
  6330. return 0;
  6331. }
  6332. if (!ASN1Dec_ServiceApdus(dec, &(val)->serviceApdu))
  6333. return 0;
  6334. if (y) {
  6335. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6336. return 0;
  6337. }
  6338. return 1;
  6339. }
  6340. static void ASN1CALL ASN1Free_H4501SupplementaryService(H4501SupplementaryService *val)
  6341. {
  6342. if (val) {
  6343. if ((val)->o[0] & 0x80) {
  6344. ASN1Free_NetworkFacilityExtension(&(val)->networkFacilityExtension);
  6345. }
  6346. ASN1Free_ServiceApdus(&(val)->serviceApdu);
  6347. }
  6348. }
  6349. static int ASN1CALL ASN1Enc_IntResultList(ASN1encoding_t enc, IntResultList *val)
  6350. {
  6351. ASN1uint32_t i;
  6352. if (!ASN1PEREncBitVal(enc, 5, (val)->count))
  6353. return 0;
  6354. for (i = 0; i < (val)->count; i++) {
  6355. if (!ASN1Enc_IntResult(enc, &((val)->value)[i]))
  6356. return 0;
  6357. }
  6358. return 1;
  6359. }
  6360. static int ASN1CALL ASN1Dec_IntResultList(ASN1decoding_t dec, IntResultList *val)
  6361. {
  6362. ASN1uint32_t i;
  6363. if (!ASN1PERDecU32Val(dec, 5, &(val)->count))
  6364. return 0;
  6365. for (i = 0; i < (val)->count; i++) {
  6366. if (!ASN1Dec_IntResult(dec, &((val)->value)[i]))
  6367. return 0;
  6368. }
  6369. return 1;
  6370. }
  6371. static void ASN1CALL ASN1Free_IntResultList(IntResultList *val)
  6372. {
  6373. ASN1uint32_t i;
  6374. if (val) {
  6375. for (i = 0; i < (val)->count; i++) {
  6376. ASN1Free_IntResult(&(val)->value[i]);
  6377. }
  6378. }
  6379. }