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

7084 lines
222 KiB

  1. #include <windows.h>
  2. #include "gccpdu.h"
  3. ASN1module_t GCCPDU_Module = NULL;
  4. static int ASN1CALL ASN1Enc_ApplicationCapabilitiesList(ASN1encoding_t enc, ApplicationCapabilitiesList *val);
  5. static int ASN1CALL ASN1Enc_ApplicationRecordList(ASN1encoding_t enc, ApplicationRecordList *val);
  6. static int ASN1CALL ASN1Enc_HighLayerCompatibility(ASN1encoding_t enc, HighLayerCompatibility *val);
  7. static int ASN1CALL ASN1Enc_TransferModes(ASN1encoding_t enc, TransferModes *val);
  8. static int ASN1CALL ASN1Enc_TransportConnectionType(ASN1encoding_t enc, TransportConnectionType *val);
  9. static int ASN1CALL ASN1Enc_AggregateChannel(ASN1encoding_t enc, AggregateChannel *val);
  10. static int ASN1CALL ASN1Enc_NodeRecordList(ASN1encoding_t enc, NodeRecordList *val);
  11. static int ASN1CALL ASN1Enc_WaitingList(ASN1encoding_t enc, PWaitingList *val);
  12. static int ASN1CALL ASN1Enc_PermissionList(ASN1encoding_t enc, PPermissionList *val);
  13. static int ASN1CALL ASN1Enc_SetOfDestinationNodes(ASN1encoding_t enc, PSetOfDestinationNodes *val);
  14. static int ASN1CALL ASN1Enc_NodeInformation(ASN1encoding_t enc, NodeInformation *val);
  15. static int ASN1CALL ASN1Enc_SetOfTransferringNodesIn(ASN1encoding_t enc, PSetOfTransferringNodesIn *val);
  16. static int ASN1CALL ASN1Enc_SetOfTransferringNodesRs(ASN1encoding_t enc, PSetOfTransferringNodesRs *val);
  17. static int ASN1CALL ASN1Enc_SetOfTransferringNodesRq(ASN1encoding_t enc, PSetOfTransferringNodesRq *val);
  18. static int ASN1CALL ASN1Enc_RegistryEntryOwnerOwned(ASN1encoding_t enc, RegistryEntryOwnerOwned *val);
  19. static int ASN1CALL ASN1Enc_ParticipantsList(ASN1encoding_t enc, PParticipantsList *val);
  20. static int ASN1CALL ASN1Enc_Key(ASN1encoding_t enc, Key *val);
  21. static int ASN1CALL ASN1Enc_NonStandardParameter(ASN1encoding_t enc, NonStandardParameter *val);
  22. static int ASN1CALL ASN1Enc_Password(ASN1encoding_t enc, Password *val);
  23. static int ASN1CALL ASN1Enc_PasswordSelector(ASN1encoding_t enc, PasswordSelector *val);
  24. static int ASN1CALL ASN1Enc_ChallengeResponseItem(ASN1encoding_t enc, ChallengeResponseItem *val);
  25. static int ASN1CALL ASN1Enc_ChallengeResponseAlgorithm(ASN1encoding_t enc, ChallengeResponseAlgorithm *val);
  26. static int ASN1CALL ASN1Enc_ChallengeItem(ASN1encoding_t enc, ChallengeItem *val);
  27. static int ASN1CALL ASN1Enc_ChallengeRequest(ASN1encoding_t enc, ChallengeRequest *val);
  28. static int ASN1CALL ASN1Enc_ChallengeResponse(ASN1encoding_t enc, ChallengeResponse *val);
  29. static int ASN1CALL ASN1Enc_ConferenceName(ASN1encoding_t enc, ConferenceName *val);
  30. static int ASN1CALL ASN1Enc_ConferenceNameSelector(ASN1encoding_t enc, ConferenceNameSelector *val);
  31. static int ASN1CALL ASN1Enc_NodeProperties(ASN1encoding_t enc, NodeProperties *val);
  32. static int ASN1CALL ASN1Enc_AsymmetryIndicator(ASN1encoding_t enc, AsymmetryIndicator *val);
  33. static int ASN1CALL ASN1Enc_AlternativeNodeID(ASN1encoding_t enc, AlternativeNodeID *val);
  34. static int ASN1CALL ASN1Enc_ConferenceDescriptor(ASN1encoding_t enc, ConferenceDescriptor *val);
  35. static int ASN1CALL ASN1Enc_NodeRecord(ASN1encoding_t enc, NodeRecord *val);
  36. static int ASN1CALL ASN1Enc_SessionKey(ASN1encoding_t enc, SessionKey *val);
  37. static int ASN1CALL ASN1Enc_ApplicationRecord(ASN1encoding_t enc, ApplicationRecord *val);
  38. static int ASN1CALL ASN1Enc_CapabilityID(ASN1encoding_t enc, CapabilityID *val);
  39. static int ASN1CALL ASN1Enc_CapabilityClass(ASN1encoding_t enc, CapabilityClass *val);
  40. static int ASN1CALL ASN1Enc_ApplicationInvokeSpecifier(ASN1encoding_t enc, ApplicationInvokeSpecifier *val);
  41. static int ASN1CALL ASN1Enc_RegistryKey(ASN1encoding_t enc, RegistryKey *val);
  42. static int ASN1CALL ASN1Enc_RegistryItem(ASN1encoding_t enc, RegistryItem *val);
  43. static int ASN1CALL ASN1Enc_RegistryEntryOwner(ASN1encoding_t enc, RegistryEntryOwner *val);
  44. static int ASN1CALL ASN1Enc_UserIDIndication(ASN1encoding_t enc, UserIDIndication *val);
  45. static int ASN1CALL ASN1Enc_SetOfPrivileges(ASN1encoding_t enc, PSetOfPrivileges *val);
  46. static int ASN1CALL ASN1Enc_ConferenceCreateRequest(ASN1encoding_t enc, ConferenceCreateRequest *val);
  47. static int ASN1CALL ASN1Enc_ConferenceCreateResponse(ASN1encoding_t enc, ConferenceCreateResponse *val);
  48. static int ASN1CALL ASN1Enc_ConferenceQueryRequest(ASN1encoding_t enc, ConferenceQueryRequest *val);
  49. static int ASN1CALL ASN1Enc_ConferenceQueryResponse(ASN1encoding_t enc, ConferenceQueryResponse *val);
  50. static int ASN1CALL ASN1Enc_ConferenceInviteRequest(ASN1encoding_t enc, ConferenceInviteRequest *val);
  51. static int ASN1CALL ASN1Enc_ConferenceInviteResponse(ASN1encoding_t enc, ConferenceInviteResponse *val);
  52. static int ASN1CALL ASN1Enc_ConferenceAddRequest(ASN1encoding_t enc, ConferenceAddRequest *val);
  53. static int ASN1CALL ASN1Enc_ConferenceAddResponse(ASN1encoding_t enc, ConferenceAddResponse *val);
  54. static int ASN1CALL ASN1Enc_ConferenceLockRequest(ASN1encoding_t enc, ConferenceLockRequest *val);
  55. static int ASN1CALL ASN1Enc_ConferenceLockResponse(ASN1encoding_t enc, ConferenceLockResponse *val);
  56. static int ASN1CALL ASN1Enc_ConferenceLockIndication(ASN1encoding_t enc, ConferenceLockIndication *val);
  57. static int ASN1CALL ASN1Enc_ConferenceUnlockRequest(ASN1encoding_t enc, ConferenceUnlockRequest *val);
  58. static int ASN1CALL ASN1Enc_ConferenceUnlockResponse(ASN1encoding_t enc, ConferenceUnlockResponse *val);
  59. static int ASN1CALL ASN1Enc_ConferenceUnlockIndication(ASN1encoding_t enc, ConferenceUnlockIndication *val);
  60. static int ASN1CALL ASN1Enc_ConferenceTerminateRequest(ASN1encoding_t enc, ConferenceTerminateRequest *val);
  61. static int ASN1CALL ASN1Enc_ConferenceTerminateResponse(ASN1encoding_t enc, ConferenceTerminateResponse *val);
  62. static int ASN1CALL ASN1Enc_ConferenceTerminateIndication(ASN1encoding_t enc, ConferenceTerminateIndication *val);
  63. static int ASN1CALL ASN1Enc_ConferenceEjectUserRequest(ASN1encoding_t enc, ConferenceEjectUserRequest *val);
  64. static int ASN1CALL ASN1Enc_ConferenceEjectUserResponse(ASN1encoding_t enc, ConferenceEjectUserResponse *val);
  65. static int ASN1CALL ASN1Enc_ConferenceEjectUserIndication(ASN1encoding_t enc, ConferenceEjectUserIndication *val);
  66. static int ASN1CALL ASN1Enc_ConferenceTransferRequest(ASN1encoding_t enc, ConferenceTransferRequest *val);
  67. static int ASN1CALL ASN1Enc_ConferenceTransferResponse(ASN1encoding_t enc, ConferenceTransferResponse *val);
  68. static int ASN1CALL ASN1Enc_ConferenceTransferIndication(ASN1encoding_t enc, ConferenceTransferIndication *val);
  69. static int ASN1CALL ASN1Enc_RosterUpdateIndication(ASN1encoding_t enc, RosterUpdateIndication *val);
  70. static int ASN1CALL ASN1Enc_ApplicationInvokeIndication(ASN1encoding_t enc, ApplicationInvokeIndication *val);
  71. static int ASN1CALL ASN1Enc_RegistryRegisterChannelRequest(ASN1encoding_t enc, RegistryRegisterChannelRequest *val);
  72. static int ASN1CALL ASN1Enc_RegistryAssignTokenRequest(ASN1encoding_t enc, RegistryAssignTokenRequest *val);
  73. static int ASN1CALL ASN1Enc_RegistrySetParameterRequest(ASN1encoding_t enc, RegistrySetParameterRequest *val);
  74. static int ASN1CALL ASN1Enc_RegistryRetrieveEntryRequest(ASN1encoding_t enc, RegistryRetrieveEntryRequest *val);
  75. static int ASN1CALL ASN1Enc_RegistryDeleteEntryRequest(ASN1encoding_t enc, RegistryDeleteEntryRequest *val);
  76. static int ASN1CALL ASN1Enc_RegistryMonitorEntryRequest(ASN1encoding_t enc, RegistryMonitorEntryRequest *val);
  77. static int ASN1CALL ASN1Enc_RegistryMonitorEntryIndication(ASN1encoding_t enc, RegistryMonitorEntryIndication *val);
  78. static int ASN1CALL ASN1Enc_RegistryAllocateHandleRequest(ASN1encoding_t enc, RegistryAllocateHandleRequest *val);
  79. static int ASN1CALL ASN1Enc_RegistryAllocateHandleResponse(ASN1encoding_t enc, RegistryAllocateHandleResponse *val);
  80. static int ASN1CALL ASN1Enc_RegistryResponse(ASN1encoding_t enc, RegistryResponse *val);
  81. static int ASN1CALL ASN1Enc_ConductorAssignIndication(ASN1encoding_t enc, ConductorAssignIndication *val);
  82. static int ASN1CALL ASN1Enc_ConductorReleaseIndication(ASN1encoding_t enc, ConductorReleaseIndication *val);
  83. static int ASN1CALL ASN1Enc_ConductorPermissionAskIndication(ASN1encoding_t enc, ConductorPermissionAskIndication *val);
  84. static int ASN1CALL ASN1Enc_ConductorPermissionGrantIndication(ASN1encoding_t enc, ConductorPermissionGrantIndication *val);
  85. static int ASN1CALL ASN1Enc_ConferenceTimeRemainingIndication(ASN1encoding_t enc, ConferenceTimeRemainingIndication *val);
  86. static int ASN1CALL ASN1Enc_ConferenceTimeInquireIndication(ASN1encoding_t enc, ConferenceTimeInquireIndication *val);
  87. static int ASN1CALL ASN1Enc_ConferenceTimeExtendIndication(ASN1encoding_t enc, ConferenceTimeExtendIndication *val);
  88. static int ASN1CALL ASN1Enc_ConferenceAssistanceIndication(ASN1encoding_t enc, ConferenceAssistanceIndication *val);
  89. static int ASN1CALL ASN1Enc_TextMessageIndication(ASN1encoding_t enc, TextMessageIndication *val);
  90. static int ASN1CALL ASN1Enc_NonStandardPDU(ASN1encoding_t enc, NonStandardPDU *val);
  91. static int ASN1CALL ASN1Enc_ConnectData(ASN1encoding_t enc, ConnectData *val);
  92. static int ASN1CALL ASN1Enc_IndicationPDU(ASN1encoding_t enc, IndicationPDU *val);
  93. static int ASN1CALL ASN1Enc_ApplicationUpdate(ASN1encoding_t enc, ApplicationUpdate *val);
  94. static int ASN1CALL ASN1Enc_RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set(ASN1encoding_t enc, RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set *val);
  95. static int ASN1CALL ASN1Enc_RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set(ASN1encoding_t enc, RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set *val);
  96. static int ASN1CALL ASN1Enc_RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set(ASN1encoding_t enc, RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set *val);
  97. static int ASN1CALL ASN1Enc_NodeUpdate(ASN1encoding_t enc, NodeUpdate *val);
  98. static int ASN1CALL ASN1Enc_RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set(ASN1encoding_t enc, RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set *val);
  99. static int ASN1CALL ASN1Enc_RosterUpdateIndication_node_information_node_record_list_node_record_update_Set(ASN1encoding_t enc, RosterUpdateIndication_node_information_node_record_list_node_record_update_Set *val);
  100. static int ASN1CALL ASN1Enc_SetOfApplicationRecordUpdates(ASN1encoding_t enc, PSetOfApplicationRecordUpdates *val);
  101. static int ASN1CALL ASN1Enc_SetOfApplicationRecordRefreshes(ASN1encoding_t enc, PSetOfApplicationRecordRefreshes *val);
  102. static int ASN1CALL ASN1Enc_SetOfApplicationCapabilityRefreshes(ASN1encoding_t enc, PSetOfApplicationCapabilityRefreshes *val);
  103. static int ASN1CALL ASN1Enc_SetOfNodeRecordUpdates(ASN1encoding_t enc, PSetOfNodeRecordUpdates *val);
  104. static int ASN1CALL ASN1Enc_SetOfNodeRecordRefreshes(ASN1encoding_t enc, PSetOfNodeRecordRefreshes *val);
  105. static int ASN1CALL ASN1Enc_ApplicationRecord_non_collapsing_capabilities_Set(ASN1encoding_t enc, ApplicationRecord_non_collapsing_capabilities_Set *val);
  106. static int ASN1CALL ASN1Enc_ApplicationInvokeSpecifier_expected_capability_set_Set(ASN1encoding_t enc, ApplicationInvokeSpecifier_expected_capability_set_Set *val);
  107. static int ASN1CALL ASN1Enc_RosterUpdateIndication_application_information_Set(ASN1encoding_t enc, RosterUpdateIndication_application_information_Set *val);
  108. static int ASN1CALL ASN1Enc_ApplicationProtocolEntityList(ASN1encoding_t enc, PApplicationProtocolEntityList *val);
  109. static int ASN1CALL ASN1Enc_SetOfApplicationInformation(ASN1encoding_t enc, PSetOfApplicationInformation *val);
  110. static int ASN1CALL ASN1Enc_SetOfConferenceDescriptors(ASN1encoding_t enc, PSetOfConferenceDescriptors *val);
  111. static int ASN1CALL ASN1Enc_SetOfExpectedCapabilities(ASN1encoding_t enc, PSetOfExpectedCapabilities *val);
  112. static int ASN1CALL ASN1Enc_SetOfNonCollapsingCapabilities(ASN1encoding_t enc, PSetOfNonCollapsingCapabilities *val);
  113. static int ASN1CALL ASN1Enc_NetworkAddress(ASN1encoding_t enc, NetworkAddress *val);
  114. static int ASN1CALL ASN1Enc_ChallengeRequestResponse(ASN1encoding_t enc, ChallengeRequestResponse *val);
  115. static int ASN1CALL ASN1Enc_SetOfChallengeItems(ASN1encoding_t enc, PSetOfChallengeItems *val);
  116. static int ASN1CALL ASN1Enc_UserData_Set(ASN1encoding_t enc, UserData_Set *val);
  117. static int ASN1CALL ASN1Enc_SetOfUserData(ASN1encoding_t enc, PSetOfUserData *val);
  118. static int ASN1CALL ASN1Enc_PasswordChallengeRequestResponse(ASN1encoding_t enc, PasswordChallengeRequestResponse *val);
  119. static int ASN1CALL ASN1Enc_SetOfNetworkAddresses(ASN1encoding_t enc, PSetOfNetworkAddresses *val);
  120. static int ASN1CALL ASN1Enc_ConferenceJoinRequest(ASN1encoding_t enc, ConferenceJoinRequest *val);
  121. static int ASN1CALL ASN1Enc_ConferenceJoinResponse(ASN1encoding_t enc, ConferenceJoinResponse *val);
  122. static int ASN1CALL ASN1Enc_ConnectGCCPDU(ASN1encoding_t enc, ConnectGCCPDU *val);
  123. static int ASN1CALL ASN1Enc_RequestPDU(ASN1encoding_t enc, RequestPDU *val);
  124. static int ASN1CALL ASN1Enc_FunctionNotSupportedResponse(ASN1encoding_t enc, FunctionNotSupportedResponse *val);
  125. static int ASN1CALL ASN1Enc_ResponsePDU(ASN1encoding_t enc, ResponsePDU *val);
  126. static int ASN1CALL ASN1Enc_GCCPDU(ASN1encoding_t enc, GCCPDU *val);
  127. static int ASN1CALL ASN1Dec_ApplicationCapabilitiesList(ASN1decoding_t dec, ApplicationCapabilitiesList *val);
  128. static int ASN1CALL ASN1Dec_ApplicationRecordList(ASN1decoding_t dec, ApplicationRecordList *val);
  129. static int ASN1CALL ASN1Dec_HighLayerCompatibility(ASN1decoding_t dec, HighLayerCompatibility *val);
  130. static int ASN1CALL ASN1Dec_TransferModes(ASN1decoding_t dec, TransferModes *val);
  131. static int ASN1CALL ASN1Dec_TransportConnectionType(ASN1decoding_t dec, TransportConnectionType *val);
  132. static int ASN1CALL ASN1Dec_AggregateChannel(ASN1decoding_t dec, AggregateChannel *val);
  133. static int ASN1CALL ASN1Dec_NodeRecordList(ASN1decoding_t dec, NodeRecordList *val);
  134. static int ASN1CALL ASN1Dec_WaitingList(ASN1decoding_t dec, PWaitingList *val);
  135. static int ASN1CALL ASN1Dec_PermissionList(ASN1decoding_t dec, PPermissionList *val);
  136. static int ASN1CALL ASN1Dec_SetOfDestinationNodes(ASN1decoding_t dec, PSetOfDestinationNodes *val);
  137. static int ASN1CALL ASN1Dec_NodeInformation(ASN1decoding_t dec, NodeInformation *val);
  138. static int ASN1CALL ASN1Dec_SetOfTransferringNodesIn(ASN1decoding_t dec, PSetOfTransferringNodesIn *val);
  139. static int ASN1CALL ASN1Dec_SetOfTransferringNodesRs(ASN1decoding_t dec, PSetOfTransferringNodesRs *val);
  140. static int ASN1CALL ASN1Dec_SetOfTransferringNodesRq(ASN1decoding_t dec, PSetOfTransferringNodesRq *val);
  141. static int ASN1CALL ASN1Dec_RegistryEntryOwnerOwned(ASN1decoding_t dec, RegistryEntryOwnerOwned *val);
  142. static int ASN1CALL ASN1Dec_ParticipantsList(ASN1decoding_t dec, PParticipantsList *val);
  143. static int ASN1CALL ASN1Dec_Key(ASN1decoding_t dec, Key *val);
  144. static int ASN1CALL ASN1Dec_NonStandardParameter(ASN1decoding_t dec, NonStandardParameter *val);
  145. static int ASN1CALL ASN1Dec_Password(ASN1decoding_t dec, Password *val);
  146. static int ASN1CALL ASN1Dec_PasswordSelector(ASN1decoding_t dec, PasswordSelector *val);
  147. static int ASN1CALL ASN1Dec_ChallengeResponseItem(ASN1decoding_t dec, ChallengeResponseItem *val);
  148. static int ASN1CALL ASN1Dec_ChallengeResponseAlgorithm(ASN1decoding_t dec, ChallengeResponseAlgorithm *val);
  149. static int ASN1CALL ASN1Dec_ChallengeItem(ASN1decoding_t dec, ChallengeItem *val);
  150. static int ASN1CALL ASN1Dec_ChallengeRequest(ASN1decoding_t dec, ChallengeRequest *val);
  151. static int ASN1CALL ASN1Dec_ChallengeResponse(ASN1decoding_t dec, ChallengeResponse *val);
  152. static int ASN1CALL ASN1Dec_ConferenceName(ASN1decoding_t dec, ConferenceName *val);
  153. static int ASN1CALL ASN1Dec_ConferenceNameSelector(ASN1decoding_t dec, ConferenceNameSelector *val);
  154. static int ASN1CALL ASN1Dec_NodeProperties(ASN1decoding_t dec, NodeProperties *val);
  155. static int ASN1CALL ASN1Dec_AsymmetryIndicator(ASN1decoding_t dec, AsymmetryIndicator *val);
  156. static int ASN1CALL ASN1Dec_AlternativeNodeID(ASN1decoding_t dec, AlternativeNodeID *val);
  157. static int ASN1CALL ASN1Dec_ConferenceDescriptor(ASN1decoding_t dec, ConferenceDescriptor *val);
  158. static int ASN1CALL ASN1Dec_NodeRecord(ASN1decoding_t dec, NodeRecord *val);
  159. static int ASN1CALL ASN1Dec_SessionKey(ASN1decoding_t dec, SessionKey *val);
  160. static int ASN1CALL ASN1Dec_ApplicationRecord(ASN1decoding_t dec, ApplicationRecord *val);
  161. static int ASN1CALL ASN1Dec_CapabilityID(ASN1decoding_t dec, CapabilityID *val);
  162. static int ASN1CALL ASN1Dec_CapabilityClass(ASN1decoding_t dec, CapabilityClass *val);
  163. static int ASN1CALL ASN1Dec_ApplicationInvokeSpecifier(ASN1decoding_t dec, ApplicationInvokeSpecifier *val);
  164. static int ASN1CALL ASN1Dec_RegistryKey(ASN1decoding_t dec, RegistryKey *val);
  165. static int ASN1CALL ASN1Dec_RegistryItem(ASN1decoding_t dec, RegistryItem *val);
  166. static int ASN1CALL ASN1Dec_RegistryEntryOwner(ASN1decoding_t dec, RegistryEntryOwner *val);
  167. static int ASN1CALL ASN1Dec_UserIDIndication(ASN1decoding_t dec, UserIDIndication *val);
  168. static int ASN1CALL ASN1Dec_SetOfPrivileges(ASN1decoding_t dec, PSetOfPrivileges *val);
  169. static int ASN1CALL ASN1Dec_ConferenceCreateRequest(ASN1decoding_t dec, ConferenceCreateRequest *val);
  170. static int ASN1CALL ASN1Dec_ConferenceCreateResponse(ASN1decoding_t dec, ConferenceCreateResponse *val);
  171. static int ASN1CALL ASN1Dec_ConferenceQueryRequest(ASN1decoding_t dec, ConferenceQueryRequest *val);
  172. static int ASN1CALL ASN1Dec_ConferenceQueryResponse(ASN1decoding_t dec, ConferenceQueryResponse *val);
  173. static int ASN1CALL ASN1Dec_ConferenceInviteRequest(ASN1decoding_t dec, ConferenceInviteRequest *val);
  174. static int ASN1CALL ASN1Dec_ConferenceInviteResponse(ASN1decoding_t dec, ConferenceInviteResponse *val);
  175. static int ASN1CALL ASN1Dec_ConferenceAddRequest(ASN1decoding_t dec, ConferenceAddRequest *val);
  176. static int ASN1CALL ASN1Dec_ConferenceAddResponse(ASN1decoding_t dec, ConferenceAddResponse *val);
  177. static int ASN1CALL ASN1Dec_ConferenceLockRequest(ASN1decoding_t dec, ConferenceLockRequest *val);
  178. static int ASN1CALL ASN1Dec_ConferenceLockResponse(ASN1decoding_t dec, ConferenceLockResponse *val);
  179. static int ASN1CALL ASN1Dec_ConferenceLockIndication(ASN1decoding_t dec, ConferenceLockIndication *val);
  180. static int ASN1CALL ASN1Dec_ConferenceUnlockRequest(ASN1decoding_t dec, ConferenceUnlockRequest *val);
  181. static int ASN1CALL ASN1Dec_ConferenceUnlockResponse(ASN1decoding_t dec, ConferenceUnlockResponse *val);
  182. static int ASN1CALL ASN1Dec_ConferenceUnlockIndication(ASN1decoding_t dec, ConferenceUnlockIndication *val);
  183. static int ASN1CALL ASN1Dec_ConferenceTerminateRequest(ASN1decoding_t dec, ConferenceTerminateRequest *val);
  184. static int ASN1CALL ASN1Dec_ConferenceTerminateResponse(ASN1decoding_t dec, ConferenceTerminateResponse *val);
  185. static int ASN1CALL ASN1Dec_ConferenceTerminateIndication(ASN1decoding_t dec, ConferenceTerminateIndication *val);
  186. static int ASN1CALL ASN1Dec_ConferenceEjectUserRequest(ASN1decoding_t dec, ConferenceEjectUserRequest *val);
  187. static int ASN1CALL ASN1Dec_ConferenceEjectUserResponse(ASN1decoding_t dec, ConferenceEjectUserResponse *val);
  188. static int ASN1CALL ASN1Dec_ConferenceEjectUserIndication(ASN1decoding_t dec, ConferenceEjectUserIndication *val);
  189. static int ASN1CALL ASN1Dec_ConferenceTransferRequest(ASN1decoding_t dec, ConferenceTransferRequest *val);
  190. static int ASN1CALL ASN1Dec_ConferenceTransferResponse(ASN1decoding_t dec, ConferenceTransferResponse *val);
  191. static int ASN1CALL ASN1Dec_ConferenceTransferIndication(ASN1decoding_t dec, ConferenceTransferIndication *val);
  192. static int ASN1CALL ASN1Dec_RosterUpdateIndication(ASN1decoding_t dec, RosterUpdateIndication *val);
  193. static int ASN1CALL ASN1Dec_ApplicationInvokeIndication(ASN1decoding_t dec, ApplicationInvokeIndication *val);
  194. static int ASN1CALL ASN1Dec_RegistryRegisterChannelRequest(ASN1decoding_t dec, RegistryRegisterChannelRequest *val);
  195. static int ASN1CALL ASN1Dec_RegistryAssignTokenRequest(ASN1decoding_t dec, RegistryAssignTokenRequest *val);
  196. static int ASN1CALL ASN1Dec_RegistrySetParameterRequest(ASN1decoding_t dec, RegistrySetParameterRequest *val);
  197. static int ASN1CALL ASN1Dec_RegistryRetrieveEntryRequest(ASN1decoding_t dec, RegistryRetrieveEntryRequest *val);
  198. static int ASN1CALL ASN1Dec_RegistryDeleteEntryRequest(ASN1decoding_t dec, RegistryDeleteEntryRequest *val);
  199. static int ASN1CALL ASN1Dec_RegistryMonitorEntryRequest(ASN1decoding_t dec, RegistryMonitorEntryRequest *val);
  200. static int ASN1CALL ASN1Dec_RegistryMonitorEntryIndication(ASN1decoding_t dec, RegistryMonitorEntryIndication *val);
  201. static int ASN1CALL ASN1Dec_RegistryAllocateHandleRequest(ASN1decoding_t dec, RegistryAllocateHandleRequest *val);
  202. static int ASN1CALL ASN1Dec_RegistryAllocateHandleResponse(ASN1decoding_t dec, RegistryAllocateHandleResponse *val);
  203. static int ASN1CALL ASN1Dec_RegistryResponse(ASN1decoding_t dec, RegistryResponse *val);
  204. static int ASN1CALL ASN1Dec_ConductorAssignIndication(ASN1decoding_t dec, ConductorAssignIndication *val);
  205. static int ASN1CALL ASN1Dec_ConductorReleaseIndication(ASN1decoding_t dec, ConductorReleaseIndication *val);
  206. static int ASN1CALL ASN1Dec_ConductorPermissionAskIndication(ASN1decoding_t dec, ConductorPermissionAskIndication *val);
  207. static int ASN1CALL ASN1Dec_ConductorPermissionGrantIndication(ASN1decoding_t dec, ConductorPermissionGrantIndication *val);
  208. static int ASN1CALL ASN1Dec_ConferenceTimeRemainingIndication(ASN1decoding_t dec, ConferenceTimeRemainingIndication *val);
  209. static int ASN1CALL ASN1Dec_ConferenceTimeInquireIndication(ASN1decoding_t dec, ConferenceTimeInquireIndication *val);
  210. static int ASN1CALL ASN1Dec_ConferenceTimeExtendIndication(ASN1decoding_t dec, ConferenceTimeExtendIndication *val);
  211. static int ASN1CALL ASN1Dec_ConferenceAssistanceIndication(ASN1decoding_t dec, ConferenceAssistanceIndication *val);
  212. static int ASN1CALL ASN1Dec_TextMessageIndication(ASN1decoding_t dec, TextMessageIndication *val);
  213. static int ASN1CALL ASN1Dec_NonStandardPDU(ASN1decoding_t dec, NonStandardPDU *val);
  214. static int ASN1CALL ASN1Dec_ConnectData(ASN1decoding_t dec, ConnectData *val);
  215. static int ASN1CALL ASN1Dec_IndicationPDU(ASN1decoding_t dec, IndicationPDU *val);
  216. static int ASN1CALL ASN1Dec_ApplicationUpdate(ASN1decoding_t dec, ApplicationUpdate *val);
  217. static int ASN1CALL ASN1Dec_RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set(ASN1decoding_t dec, RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set *val);
  218. static int ASN1CALL ASN1Dec_RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set(ASN1decoding_t dec, RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set *val);
  219. static int ASN1CALL ASN1Dec_RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set(ASN1decoding_t dec, RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set *val);
  220. static int ASN1CALL ASN1Dec_NodeUpdate(ASN1decoding_t dec, NodeUpdate *val);
  221. static int ASN1CALL ASN1Dec_RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set(ASN1decoding_t dec, RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set *val);
  222. static int ASN1CALL ASN1Dec_RosterUpdateIndication_node_information_node_record_list_node_record_update_Set(ASN1decoding_t dec, RosterUpdateIndication_node_information_node_record_list_node_record_update_Set *val);
  223. static int ASN1CALL ASN1Dec_SetOfApplicationRecordUpdates(ASN1decoding_t dec, PSetOfApplicationRecordUpdates *val);
  224. static int ASN1CALL ASN1Dec_SetOfApplicationRecordRefreshes(ASN1decoding_t dec, PSetOfApplicationRecordRefreshes *val);
  225. static int ASN1CALL ASN1Dec_SetOfApplicationCapabilityRefreshes(ASN1decoding_t dec, PSetOfApplicationCapabilityRefreshes *val);
  226. static int ASN1CALL ASN1Dec_SetOfNodeRecordUpdates(ASN1decoding_t dec, PSetOfNodeRecordUpdates *val);
  227. static int ASN1CALL ASN1Dec_SetOfNodeRecordRefreshes(ASN1decoding_t dec, PSetOfNodeRecordRefreshes *val);
  228. static int ASN1CALL ASN1Dec_ApplicationRecord_non_collapsing_capabilities_Set(ASN1decoding_t dec, ApplicationRecord_non_collapsing_capabilities_Set *val);
  229. static int ASN1CALL ASN1Dec_ApplicationInvokeSpecifier_expected_capability_set_Set(ASN1decoding_t dec, ApplicationInvokeSpecifier_expected_capability_set_Set *val);
  230. static int ASN1CALL ASN1Dec_RosterUpdateIndication_application_information_Set(ASN1decoding_t dec, RosterUpdateIndication_application_information_Set *val);
  231. static int ASN1CALL ASN1Dec_ApplicationProtocolEntityList(ASN1decoding_t dec, PApplicationProtocolEntityList *val);
  232. static int ASN1CALL ASN1Dec_SetOfApplicationInformation(ASN1decoding_t dec, PSetOfApplicationInformation *val);
  233. static int ASN1CALL ASN1Dec_SetOfConferenceDescriptors(ASN1decoding_t dec, PSetOfConferenceDescriptors *val);
  234. static int ASN1CALL ASN1Dec_SetOfExpectedCapabilities(ASN1decoding_t dec, PSetOfExpectedCapabilities *val);
  235. static int ASN1CALL ASN1Dec_SetOfNonCollapsingCapabilities(ASN1decoding_t dec, PSetOfNonCollapsingCapabilities *val);
  236. static int ASN1CALL ASN1Dec_NetworkAddress(ASN1decoding_t dec, NetworkAddress *val);
  237. static int ASN1CALL ASN1Dec_ChallengeRequestResponse(ASN1decoding_t dec, ChallengeRequestResponse *val);
  238. static int ASN1CALL ASN1Dec_SetOfChallengeItems(ASN1decoding_t dec, PSetOfChallengeItems *val);
  239. static int ASN1CALL ASN1Dec_UserData_Set(ASN1decoding_t dec, UserData_Set *val);
  240. static int ASN1CALL ASN1Dec_SetOfUserData(ASN1decoding_t dec, PSetOfUserData *val);
  241. static int ASN1CALL ASN1Dec_PasswordChallengeRequestResponse(ASN1decoding_t dec, PasswordChallengeRequestResponse *val);
  242. static int ASN1CALL ASN1Dec_SetOfNetworkAddresses(ASN1decoding_t dec, PSetOfNetworkAddresses *val);
  243. static int ASN1CALL ASN1Dec_ConferenceJoinRequest(ASN1decoding_t dec, ConferenceJoinRequest *val);
  244. static int ASN1CALL ASN1Dec_ConferenceJoinResponse(ASN1decoding_t dec, ConferenceJoinResponse *val);
  245. static int ASN1CALL ASN1Dec_ConnectGCCPDU(ASN1decoding_t dec, ConnectGCCPDU *val);
  246. static int ASN1CALL ASN1Dec_RequestPDU(ASN1decoding_t dec, RequestPDU *val);
  247. static int ASN1CALL ASN1Dec_FunctionNotSupportedResponse(ASN1decoding_t dec, FunctionNotSupportedResponse *val);
  248. static int ASN1CALL ASN1Dec_ResponsePDU(ASN1decoding_t dec, ResponsePDU *val);
  249. static int ASN1CALL ASN1Dec_GCCPDU(ASN1decoding_t dec, GCCPDU *val);
  250. static void ASN1CALL ASN1Free_ApplicationCapabilitiesList(ApplicationCapabilitiesList *val);
  251. static void ASN1CALL ASN1Free_ApplicationRecordList(ApplicationRecordList *val);
  252. static void ASN1CALL ASN1Free_TransportConnectionType(TransportConnectionType *val);
  253. static void ASN1CALL ASN1Free_AggregateChannel(AggregateChannel *val);
  254. static void ASN1CALL ASN1Free_NodeRecordList(NodeRecordList *val);
  255. static void ASN1CALL ASN1Free_WaitingList(PWaitingList *val);
  256. static void ASN1CALL ASN1Free_PermissionList(PPermissionList *val);
  257. static void ASN1CALL ASN1Free_SetOfDestinationNodes(PSetOfDestinationNodes *val);
  258. static void ASN1CALL ASN1Free_NodeInformation(NodeInformation *val);
  259. static void ASN1CALL ASN1Free_SetOfTransferringNodesIn(PSetOfTransferringNodesIn *val);
  260. static void ASN1CALL ASN1Free_SetOfTransferringNodesRs(PSetOfTransferringNodesRs *val);
  261. static void ASN1CALL ASN1Free_SetOfTransferringNodesRq(PSetOfTransferringNodesRq *val);
  262. static void ASN1CALL ASN1Free_ParticipantsList(PParticipantsList *val);
  263. static void ASN1CALL ASN1Free_Key(Key *val);
  264. static void ASN1CALL ASN1Free_NonStandardParameter(NonStandardParameter *val);
  265. static void ASN1CALL ASN1Free_Password(Password *val);
  266. static void ASN1CALL ASN1Free_PasswordSelector(PasswordSelector *val);
  267. static void ASN1CALL ASN1Free_ChallengeResponseItem(ChallengeResponseItem *val);
  268. static void ASN1CALL ASN1Free_ChallengeResponseAlgorithm(ChallengeResponseAlgorithm *val);
  269. static void ASN1CALL ASN1Free_ChallengeItem(ChallengeItem *val);
  270. static void ASN1CALL ASN1Free_ChallengeRequest(ChallengeRequest *val);
  271. static void ASN1CALL ASN1Free_ChallengeResponse(ChallengeResponse *val);
  272. static void ASN1CALL ASN1Free_ConferenceName(ConferenceName *val);
  273. static void ASN1CALL ASN1Free_ConferenceNameSelector(ConferenceNameSelector *val);
  274. static void ASN1CALL ASN1Free_AlternativeNodeID(AlternativeNodeID *val);
  275. static void ASN1CALL ASN1Free_ConferenceDescriptor(ConferenceDescriptor *val);
  276. static void ASN1CALL ASN1Free_NodeRecord(NodeRecord *val);
  277. static void ASN1CALL ASN1Free_SessionKey(SessionKey *val);
  278. static void ASN1CALL ASN1Free_ApplicationRecord(ApplicationRecord *val);
  279. static void ASN1CALL ASN1Free_CapabilityID(CapabilityID *val);
  280. static void ASN1CALL ASN1Free_ApplicationInvokeSpecifier(ApplicationInvokeSpecifier *val);
  281. static void ASN1CALL ASN1Free_RegistryKey(RegistryKey *val);
  282. static void ASN1CALL ASN1Free_RegistryItem(RegistryItem *val);
  283. static void ASN1CALL ASN1Free_SetOfPrivileges(PSetOfPrivileges *val);
  284. static void ASN1CALL ASN1Free_ConferenceCreateRequest(ConferenceCreateRequest *val);
  285. static void ASN1CALL ASN1Free_ConferenceCreateResponse(ConferenceCreateResponse *val);
  286. static void ASN1CALL ASN1Free_ConferenceQueryRequest(ConferenceQueryRequest *val);
  287. static void ASN1CALL ASN1Free_ConferenceQueryResponse(ConferenceQueryResponse *val);
  288. static void ASN1CALL ASN1Free_ConferenceInviteRequest(ConferenceInviteRequest *val);
  289. static void ASN1CALL ASN1Free_ConferenceInviteResponse(ConferenceInviteResponse *val);
  290. static void ASN1CALL ASN1Free_ConferenceAddRequest(ConferenceAddRequest *val);
  291. static void ASN1CALL ASN1Free_ConferenceAddResponse(ConferenceAddResponse *val);
  292. static void ASN1CALL ASN1Free_ConferenceTransferRequest(ConferenceTransferRequest *val);
  293. static void ASN1CALL ASN1Free_ConferenceTransferResponse(ConferenceTransferResponse *val);
  294. static void ASN1CALL ASN1Free_ConferenceTransferIndication(ConferenceTransferIndication *val);
  295. static void ASN1CALL ASN1Free_RosterUpdateIndication(RosterUpdateIndication *val);
  296. static void ASN1CALL ASN1Free_ApplicationInvokeIndication(ApplicationInvokeIndication *val);
  297. static void ASN1CALL ASN1Free_RegistryRegisterChannelRequest(RegistryRegisterChannelRequest *val);
  298. static void ASN1CALL ASN1Free_RegistryAssignTokenRequest(RegistryAssignTokenRequest *val);
  299. static void ASN1CALL ASN1Free_RegistrySetParameterRequest(RegistrySetParameterRequest *val);
  300. static void ASN1CALL ASN1Free_RegistryRetrieveEntryRequest(RegistryRetrieveEntryRequest *val);
  301. static void ASN1CALL ASN1Free_RegistryDeleteEntryRequest(RegistryDeleteEntryRequest *val);
  302. static void ASN1CALL ASN1Free_RegistryMonitorEntryRequest(RegistryMonitorEntryRequest *val);
  303. static void ASN1CALL ASN1Free_RegistryMonitorEntryIndication(RegistryMonitorEntryIndication *val);
  304. static void ASN1CALL ASN1Free_RegistryResponse(RegistryResponse *val);
  305. static void ASN1CALL ASN1Free_ConductorPermissionGrantIndication(ConductorPermissionGrantIndication *val);
  306. static void ASN1CALL ASN1Free_ConferenceAssistanceIndication(ConferenceAssistanceIndication *val);
  307. static void ASN1CALL ASN1Free_TextMessageIndication(TextMessageIndication *val);
  308. static void ASN1CALL ASN1Free_NonStandardPDU(NonStandardPDU *val);
  309. static void ASN1CALL ASN1Free_ConnectData(ConnectData *val);
  310. static void ASN1CALL ASN1Free_IndicationPDU(IndicationPDU *val);
  311. static void ASN1CALL ASN1Free_ApplicationUpdate(ApplicationUpdate *val);
  312. static void ASN1CALL ASN1Free_RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set(RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set *val);
  313. static void ASN1CALL ASN1Free_RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set(RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set *val);
  314. static void ASN1CALL ASN1Free_RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set(RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set *val);
  315. static void ASN1CALL ASN1Free_NodeUpdate(NodeUpdate *val);
  316. static void ASN1CALL ASN1Free_RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set(RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set *val);
  317. static void ASN1CALL ASN1Free_RosterUpdateIndication_node_information_node_record_list_node_record_update_Set(RosterUpdateIndication_node_information_node_record_list_node_record_update_Set *val);
  318. static void ASN1CALL ASN1Free_SetOfApplicationRecordUpdates(PSetOfApplicationRecordUpdates *val);
  319. static void ASN1CALL ASN1Free_SetOfApplicationRecordRefreshes(PSetOfApplicationRecordRefreshes *val);
  320. static void ASN1CALL ASN1Free_SetOfApplicationCapabilityRefreshes(PSetOfApplicationCapabilityRefreshes *val);
  321. static void ASN1CALL ASN1Free_SetOfNodeRecordUpdates(PSetOfNodeRecordUpdates *val);
  322. static void ASN1CALL ASN1Free_SetOfNodeRecordRefreshes(PSetOfNodeRecordRefreshes *val);
  323. static void ASN1CALL ASN1Free_ApplicationRecord_non_collapsing_capabilities_Set(ApplicationRecord_non_collapsing_capabilities_Set *val);
  324. static void ASN1CALL ASN1Free_ApplicationInvokeSpecifier_expected_capability_set_Set(ApplicationInvokeSpecifier_expected_capability_set_Set *val);
  325. static void ASN1CALL ASN1Free_RosterUpdateIndication_application_information_Set(RosterUpdateIndication_application_information_Set *val);
  326. static void ASN1CALL ASN1Free_ApplicationProtocolEntityList(PApplicationProtocolEntityList *val);
  327. static void ASN1CALL ASN1Free_SetOfApplicationInformation(PSetOfApplicationInformation *val);
  328. static void ASN1CALL ASN1Free_SetOfConferenceDescriptors(PSetOfConferenceDescriptors *val);
  329. static void ASN1CALL ASN1Free_SetOfExpectedCapabilities(PSetOfExpectedCapabilities *val);
  330. static void ASN1CALL ASN1Free_SetOfNonCollapsingCapabilities(PSetOfNonCollapsingCapabilities *val);
  331. static void ASN1CALL ASN1Free_NetworkAddress(NetworkAddress *val);
  332. static void ASN1CALL ASN1Free_ChallengeRequestResponse(ChallengeRequestResponse *val);
  333. static void ASN1CALL ASN1Free_SetOfChallengeItems(PSetOfChallengeItems *val);
  334. static void ASN1CALL ASN1Free_UserData_Set(UserData_Set *val);
  335. static void ASN1CALL ASN1Free_SetOfUserData(PSetOfUserData *val);
  336. static void ASN1CALL ASN1Free_PasswordChallengeRequestResponse(PasswordChallengeRequestResponse *val);
  337. static void ASN1CALL ASN1Free_SetOfNetworkAddresses(PSetOfNetworkAddresses *val);
  338. static void ASN1CALL ASN1Free_ConferenceJoinRequest(ConferenceJoinRequest *val);
  339. static void ASN1CALL ASN1Free_ConferenceJoinResponse(ConferenceJoinResponse *val);
  340. static void ASN1CALL ASN1Free_ConnectGCCPDU(ConnectGCCPDU *val);
  341. static void ASN1CALL ASN1Free_RequestPDU(RequestPDU *val);
  342. static void ASN1CALL ASN1Free_FunctionNotSupportedResponse(FunctionNotSupportedResponse *val);
  343. static void ASN1CALL ASN1Free_ResponsePDU(ResponsePDU *val);
  344. static void ASN1CALL ASN1Free_GCCPDU(GCCPDU *val);
  345. typedef ASN1PerEncFun_t ASN1EncFun_t;
  346. static const ASN1EncFun_t encfntab[3] = {
  347. (ASN1EncFun_t) ASN1Enc_ConnectData,
  348. (ASN1EncFun_t) ASN1Enc_ConnectGCCPDU,
  349. (ASN1EncFun_t) ASN1Enc_GCCPDU,
  350. };
  351. typedef ASN1PerDecFun_t ASN1DecFun_t;
  352. static const ASN1DecFun_t decfntab[3] = {
  353. (ASN1DecFun_t) ASN1Dec_ConnectData,
  354. (ASN1DecFun_t) ASN1Dec_ConnectGCCPDU,
  355. (ASN1DecFun_t) ASN1Dec_GCCPDU,
  356. };
  357. static const ASN1FreeFun_t freefntab[3] = {
  358. (ASN1FreeFun_t) ASN1Free_ConnectData,
  359. (ASN1FreeFun_t) ASN1Free_ConnectGCCPDU,
  360. (ASN1FreeFun_t) ASN1Free_GCCPDU,
  361. };
  362. static const ULONG sizetab[3] = {
  363. SIZE_GCCPDU_Module_PDU_0,
  364. SIZE_GCCPDU_Module_PDU_1,
  365. SIZE_GCCPDU_Module_PDU_2,
  366. };
  367. /* forward declarations of values: */
  368. extern ASN1char32_t simpleTextFirstCharacter_chars[1];
  369. extern ASN1char32_t simpleTextLastCharacter_chars[1];
  370. /* definitions of value components: */
  371. static const struct ASN1objectidentifier_s t124identifier_object_list[6] = {
  372. { (ASN1objectidentifier_t) &(t124identifier_object_list[1]), 0 },
  373. { (ASN1objectidentifier_t) &(t124identifier_object_list[2]), 0 },
  374. { (ASN1objectidentifier_t) &(t124identifier_object_list[3]), 20 },
  375. { (ASN1objectidentifier_t) &(t124identifier_object_list[4]), 124 },
  376. { (ASN1objectidentifier_t) &(t124identifier_object_list[5]), 0 },
  377. { NULL, 1 }
  378. };
  379. static ASN1objectidentifier_t t124identifier_object = (ASN1objectidentifier_t) t124identifier_object_list;
  380. static ASN1char32_t simpleTextFirstCharacter_chars[1] = { 0x0 };
  381. static ASN1char32_t simpleTextLastCharacter_chars[1] = { 0xff };
  382. /* definitions of values: */
  383. Key t124identifier = { 1 };
  384. ASN1char32string_t simpleTextFirstCharacter = { 1, simpleTextFirstCharacter_chars };
  385. ASN1char32string_t simpleTextLastCharacter = { 1, simpleTextLastCharacter_chars };
  386. void ASN1CALL GCCPDU_Module_Startup(void)
  387. {
  388. GCCPDU_Module = ASN1_CreateModule(0x10000, ASN1_PER_RULE_ALIGNED, ASN1FLAGS_NONE, 3, (const ASN1GenericFun_t *) encfntab, (const ASN1GenericFun_t *) decfntab, freefntab, sizetab, 0x636367);
  389. t124identifier.u.object = t124identifier_object;
  390. }
  391. void ASN1CALL GCCPDU_Module_Cleanup(void)
  392. {
  393. ASN1_CloseModule(GCCPDU_Module);
  394. GCCPDU_Module = NULL;
  395. }
  396. static int ASN1CALL ASN1Enc_ApplicationCapabilitiesList(ASN1encoding_t enc, ApplicationCapabilitiesList *val)
  397. {
  398. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  399. return 0;
  400. switch ((val)->choice) {
  401. case 1:
  402. break;
  403. case 2:
  404. if (!ASN1Enc_SetOfApplicationCapabilityRefreshes(enc, &(val)->u.application_capability_refresh))
  405. return 0;
  406. break;
  407. default:
  408. /* impossible */
  409. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  410. return 0;
  411. }
  412. return 1;
  413. }
  414. static int ASN1CALL ASN1Dec_ApplicationCapabilitiesList(ASN1decoding_t dec, ApplicationCapabilitiesList *val)
  415. {
  416. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  417. return 0;
  418. switch ((val)->choice) {
  419. case 1:
  420. break;
  421. case 2:
  422. if (!ASN1Dec_SetOfApplicationCapabilityRefreshes(dec, &(val)->u.application_capability_refresh))
  423. return 0;
  424. break;
  425. case 0:
  426. /* extension case */
  427. if (!ASN1PERDecSkipFragmented(dec, 8))
  428. return 0;
  429. break;
  430. default:
  431. /* impossible */
  432. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  433. return 0;
  434. }
  435. return 1;
  436. }
  437. static void ASN1CALL ASN1Free_ApplicationCapabilitiesList(ApplicationCapabilitiesList *val)
  438. {
  439. if (val) {
  440. switch ((val)->choice) {
  441. case 2:
  442. ASN1Free_SetOfApplicationCapabilityRefreshes(&(val)->u.application_capability_refresh);
  443. break;
  444. }
  445. }
  446. }
  447. static int ASN1CALL ASN1Enc_ApplicationRecordList(ASN1encoding_t enc, ApplicationRecordList *val)
  448. {
  449. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  450. return 0;
  451. switch ((val)->choice) {
  452. case 1:
  453. break;
  454. case 2:
  455. if (!ASN1Enc_SetOfApplicationRecordRefreshes(enc, &(val)->u.application_record_refresh))
  456. return 0;
  457. break;
  458. case 3:
  459. if (!ASN1Enc_SetOfApplicationRecordUpdates(enc, &(val)->u.application_record_update))
  460. return 0;
  461. break;
  462. default:
  463. /* impossible */
  464. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  465. return 0;
  466. }
  467. return 1;
  468. }
  469. static int ASN1CALL ASN1Dec_ApplicationRecordList(ASN1decoding_t dec, ApplicationRecordList *val)
  470. {
  471. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  472. return 0;
  473. switch ((val)->choice) {
  474. case 1:
  475. break;
  476. case 2:
  477. if (!ASN1Dec_SetOfApplicationRecordRefreshes(dec, &(val)->u.application_record_refresh))
  478. return 0;
  479. break;
  480. case 3:
  481. if (!ASN1Dec_SetOfApplicationRecordUpdates(dec, &(val)->u.application_record_update))
  482. return 0;
  483. break;
  484. case 0:
  485. /* extension case */
  486. if (!ASN1PERDecSkipFragmented(dec, 8))
  487. return 0;
  488. break;
  489. default:
  490. /* impossible */
  491. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  492. return 0;
  493. }
  494. return 1;
  495. }
  496. static void ASN1CALL ASN1Free_ApplicationRecordList(ApplicationRecordList *val)
  497. {
  498. if (val) {
  499. switch ((val)->choice) {
  500. case 2:
  501. ASN1Free_SetOfApplicationRecordRefreshes(&(val)->u.application_record_refresh);
  502. break;
  503. case 3:
  504. ASN1Free_SetOfApplicationRecordUpdates(&(val)->u.application_record_update);
  505. break;
  506. }
  507. }
  508. }
  509. static int ASN1CALL ASN1Enc_HighLayerCompatibility(ASN1encoding_t enc, HighLayerCompatibility *val)
  510. {
  511. if (!ASN1PEREncExtensionBitClear(enc))
  512. return 0;
  513. if (!ASN1PEREncBoolean(enc, (val)->telephony3kHz))
  514. return 0;
  515. if (!ASN1PEREncBoolean(enc, (val)->telephony7kHz))
  516. return 0;
  517. if (!ASN1PEREncBoolean(enc, (val)->videotelephony))
  518. return 0;
  519. if (!ASN1PEREncBoolean(enc, (val)->videoconference))
  520. return 0;
  521. if (!ASN1PEREncBoolean(enc, (val)->audiographic))
  522. return 0;
  523. if (!ASN1PEREncBoolean(enc, (val)->audiovisual))
  524. return 0;
  525. if (!ASN1PEREncBoolean(enc, (val)->multimedia))
  526. return 0;
  527. return 1;
  528. }
  529. static int ASN1CALL ASN1Dec_HighLayerCompatibility(ASN1decoding_t dec, HighLayerCompatibility *val)
  530. {
  531. ASN1uint32_t y;
  532. if (!ASN1PERDecExtensionBit(dec, &y))
  533. return 0;
  534. if (!ASN1PERDecBoolean(dec, &(val)->telephony3kHz))
  535. return 0;
  536. if (!ASN1PERDecBoolean(dec, &(val)->telephony7kHz))
  537. return 0;
  538. if (!ASN1PERDecBoolean(dec, &(val)->videotelephony))
  539. return 0;
  540. if (!ASN1PERDecBoolean(dec, &(val)->videoconference))
  541. return 0;
  542. if (!ASN1PERDecBoolean(dec, &(val)->audiographic))
  543. return 0;
  544. if (!ASN1PERDecBoolean(dec, &(val)->audiovisual))
  545. return 0;
  546. if (!ASN1PERDecBoolean(dec, &(val)->multimedia))
  547. return 0;
  548. if (y) {
  549. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  550. return 0;
  551. }
  552. return 1;
  553. }
  554. static int ASN1CALL ASN1Enc_TransferModes(ASN1encoding_t enc, TransferModes *val)
  555. {
  556. if (!ASN1PEREncExtensionBitClear(enc))
  557. return 0;
  558. if (!ASN1PEREncBoolean(enc, (val)->speech))
  559. return 0;
  560. if (!ASN1PEREncBoolean(enc, (val)->voice_band))
  561. return 0;
  562. if (!ASN1PEREncBoolean(enc, (val)->digital_56k))
  563. return 0;
  564. if (!ASN1PEREncBoolean(enc, (val)->digital_64k))
  565. return 0;
  566. if (!ASN1PEREncBoolean(enc, (val)->digital_128k))
  567. return 0;
  568. if (!ASN1PEREncBoolean(enc, (val)->digital_192k))
  569. return 0;
  570. if (!ASN1PEREncBoolean(enc, (val)->digital_256k))
  571. return 0;
  572. if (!ASN1PEREncBoolean(enc, (val)->digital_320k))
  573. return 0;
  574. if (!ASN1PEREncBoolean(enc, (val)->digital_384k))
  575. return 0;
  576. if (!ASN1PEREncBoolean(enc, (val)->digital_512k))
  577. return 0;
  578. if (!ASN1PEREncBoolean(enc, (val)->digital_768k))
  579. return 0;
  580. if (!ASN1PEREncBoolean(enc, (val)->digital_1152k))
  581. return 0;
  582. if (!ASN1PEREncBoolean(enc, (val)->digital_1472k))
  583. return 0;
  584. if (!ASN1PEREncBoolean(enc, (val)->digital_1536k))
  585. return 0;
  586. if (!ASN1PEREncBoolean(enc, (val)->digital_1920k))
  587. return 0;
  588. if (!ASN1PEREncBoolean(enc, (val)->packet_mode))
  589. return 0;
  590. if (!ASN1PEREncBoolean(enc, (val)->frame_mode))
  591. return 0;
  592. if (!ASN1PEREncBoolean(enc, (val)->atm))
  593. return 0;
  594. return 1;
  595. }
  596. static int ASN1CALL ASN1Dec_TransferModes(ASN1decoding_t dec, TransferModes *val)
  597. {
  598. ASN1uint32_t y;
  599. if (!ASN1PERDecExtensionBit(dec, &y))
  600. return 0;
  601. if (!ASN1PERDecBoolean(dec, &(val)->speech))
  602. return 0;
  603. if (!ASN1PERDecBoolean(dec, &(val)->voice_band))
  604. return 0;
  605. if (!ASN1PERDecBoolean(dec, &(val)->digital_56k))
  606. return 0;
  607. if (!ASN1PERDecBoolean(dec, &(val)->digital_64k))
  608. return 0;
  609. if (!ASN1PERDecBoolean(dec, &(val)->digital_128k))
  610. return 0;
  611. if (!ASN1PERDecBoolean(dec, &(val)->digital_192k))
  612. return 0;
  613. if (!ASN1PERDecBoolean(dec, &(val)->digital_256k))
  614. return 0;
  615. if (!ASN1PERDecBoolean(dec, &(val)->digital_320k))
  616. return 0;
  617. if (!ASN1PERDecBoolean(dec, &(val)->digital_384k))
  618. return 0;
  619. if (!ASN1PERDecBoolean(dec, &(val)->digital_512k))
  620. return 0;
  621. if (!ASN1PERDecBoolean(dec, &(val)->digital_768k))
  622. return 0;
  623. if (!ASN1PERDecBoolean(dec, &(val)->digital_1152k))
  624. return 0;
  625. if (!ASN1PERDecBoolean(dec, &(val)->digital_1472k))
  626. return 0;
  627. if (!ASN1PERDecBoolean(dec, &(val)->digital_1536k))
  628. return 0;
  629. if (!ASN1PERDecBoolean(dec, &(val)->digital_1920k))
  630. return 0;
  631. if (!ASN1PERDecBoolean(dec, &(val)->packet_mode))
  632. return 0;
  633. if (!ASN1PERDecBoolean(dec, &(val)->frame_mode))
  634. return 0;
  635. if (!ASN1PERDecBoolean(dec, &(val)->atm))
  636. return 0;
  637. if (y) {
  638. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  639. return 0;
  640. }
  641. return 1;
  642. }
  643. static int ASN1CALL ASN1Enc_TransportConnectionType(ASN1encoding_t enc, TransportConnectionType *val)
  644. {
  645. if (!ASN1PEREncBits(enc, 1, (val)->o))
  646. return 0;
  647. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->nsap_address, 1, 20, 5))
  648. return 0;
  649. if ((val)->o[0] & 0x80) {
  650. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->transport_selector))
  651. return 0;
  652. }
  653. return 1;
  654. }
  655. static int ASN1CALL ASN1Dec_TransportConnectionType(ASN1decoding_t dec, TransportConnectionType *val)
  656. {
  657. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  658. return 0;
  659. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->nsap_address, 1, 20, 5))
  660. return 0;
  661. if ((val)->o[0] & 0x80) {
  662. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->transport_selector))
  663. return 0;
  664. }
  665. return 1;
  666. }
  667. static void ASN1CALL ASN1Free_TransportConnectionType(TransportConnectionType *val)
  668. {
  669. if (val) {
  670. if ((val)->o[0] & 0x80) {
  671. ASN1octetstring_free(&(val)->transport_selector);
  672. }
  673. }
  674. }
  675. static ASN1stringtableentry_t AggregateChannel_international_number_StringTableEntries[] = {
  676. { 48, 57, 0 },
  677. };
  678. static ASN1stringtable_t AggregateChannel_international_number_StringTable = {
  679. 1, AggregateChannel_international_number_StringTableEntries
  680. };
  681. static ASN1stringtableentry_t AggregateChannel_sub_address_StringTableEntries[] = {
  682. { 48, 57, 0 },
  683. };
  684. static ASN1stringtable_t AggregateChannel_sub_address_StringTable = {
  685. 1, AggregateChannel_sub_address_StringTableEntries
  686. };
  687. static ASN1stringtableentry_t AggregateChannel_extra_dialing_string_StringTableEntries[] = {
  688. { 35, 35, 0 }, { 42, 42, 1 }, { 44, 44, 2 },
  689. { 48, 57, 3 },
  690. };
  691. static ASN1stringtable_t AggregateChannel_extra_dialing_string_StringTable = {
  692. 4, AggregateChannel_extra_dialing_string_StringTableEntries
  693. };
  694. static int ASN1CALL ASN1Enc_AggregateChannel(ASN1encoding_t enc, AggregateChannel *val)
  695. {
  696. ASN1uint32_t t;
  697. if (!ASN1PEREncExtensionBitClear(enc))
  698. return 0;
  699. if (!ASN1PEREncBits(enc, 3, (val)->o))
  700. return 0;
  701. if (!ASN1Enc_TransferModes(enc, &(val)->transfer_modes))
  702. return 0;
  703. t = lstrlenA((val)->international_number);
  704. if (!ASN1PEREncBitVal(enc, 4, t - 1))
  705. return 0;
  706. ASN1PEREncAlignment(enc);
  707. if (!ASN1PEREncTableCharString(enc, t, (val)->international_number, 4, &AggregateChannel_international_number_StringTable))
  708. return 0;
  709. if ((val)->o[0] & 0x80) {
  710. t = lstrlenA((val)->sub_address);
  711. if (!ASN1PEREncBitVal(enc, 6, t - 1))
  712. return 0;
  713. ASN1PEREncAlignment(enc);
  714. if (!ASN1PEREncTableCharString(enc, t, (val)->sub_address, 4, &AggregateChannel_sub_address_StringTable))
  715. return 0;
  716. }
  717. if ((val)->o[0] & 0x40) {
  718. if (!ASN1PEREncBitVal(enc, 8, ((val)->extra_dialing_string).length - 1))
  719. return 0;
  720. ASN1PEREncAlignment(enc);
  721. if (!ASN1PEREncTableChar16String(enc, ((val)->extra_dialing_string).length, ((val)->extra_dialing_string).value, 4, &AggregateChannel_extra_dialing_string_StringTable))
  722. return 0;
  723. }
  724. if ((val)->o[0] & 0x20) {
  725. if (!ASN1Enc_HighLayerCompatibility(enc, &(val)->high_layer_compatibility))
  726. return 0;
  727. }
  728. return 1;
  729. }
  730. static int ASN1CALL ASN1Dec_AggregateChannel(ASN1decoding_t dec, AggregateChannel *val)
  731. {
  732. ASN1uint32_t y;
  733. ASN1uint32_t l;
  734. if (!ASN1PERDecExtensionBit(dec, &y))
  735. return 0;
  736. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  737. return 0;
  738. if (!ASN1Dec_TransferModes(dec, &(val)->transfer_modes))
  739. return 0;
  740. if (!ASN1PERDecU32Val(dec, 4, &l))
  741. return 0;
  742. l += 1;
  743. ASN1PERDecAlignment(dec);
  744. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->international_number, 4, &AggregateChannel_international_number_StringTable))
  745. return 0;
  746. if ((val)->o[0] & 0x80) {
  747. if (!ASN1PERDecU32Val(dec, 6, &l))
  748. return 0;
  749. l += 1;
  750. ASN1PERDecAlignment(dec);
  751. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->sub_address, 4, &AggregateChannel_sub_address_StringTable))
  752. return 0;
  753. }
  754. if ((val)->o[0] & 0x40) {
  755. if (!ASN1PERDecU32Val(dec, 8, &((val)->extra_dialing_string).length))
  756. return 0;
  757. ((val)->extra_dialing_string).length += 1;
  758. ASN1PERDecAlignment(dec);
  759. if (!ASN1PERDecTableChar16String(dec, ((val)->extra_dialing_string).length, &((val)->extra_dialing_string).value, 4, &AggregateChannel_extra_dialing_string_StringTable))
  760. return 0;
  761. }
  762. if ((val)->o[0] & 0x20) {
  763. if (!ASN1Dec_HighLayerCompatibility(dec, &(val)->high_layer_compatibility))
  764. return 0;
  765. }
  766. if (y) {
  767. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  768. return 0;
  769. }
  770. return 1;
  771. }
  772. static void ASN1CALL ASN1Free_AggregateChannel(AggregateChannel *val)
  773. {
  774. if (val) {
  775. if ((val)->o[0] & 0x80) {
  776. }
  777. if ((val)->o[0] & 0x40) {
  778. ASN1char16string_free(&(val)->extra_dialing_string);
  779. }
  780. }
  781. }
  782. static int ASN1CALL ASN1Enc_NodeRecordList(ASN1encoding_t enc, NodeRecordList *val)
  783. {
  784. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  785. return 0;
  786. switch ((val)->choice) {
  787. case 1:
  788. break;
  789. case 2:
  790. if (!ASN1Enc_SetOfNodeRecordRefreshes(enc, &(val)->u.node_record_refresh))
  791. return 0;
  792. break;
  793. case 3:
  794. if (!ASN1Enc_SetOfNodeRecordUpdates(enc, &(val)->u.node_record_update))
  795. return 0;
  796. break;
  797. default:
  798. /* impossible */
  799. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  800. return 0;
  801. }
  802. return 1;
  803. }
  804. static int ASN1CALL ASN1Dec_NodeRecordList(ASN1decoding_t dec, NodeRecordList *val)
  805. {
  806. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  807. return 0;
  808. switch ((val)->choice) {
  809. case 1:
  810. break;
  811. case 2:
  812. if (!ASN1Dec_SetOfNodeRecordRefreshes(dec, &(val)->u.node_record_refresh))
  813. return 0;
  814. break;
  815. case 3:
  816. if (!ASN1Dec_SetOfNodeRecordUpdates(dec, &(val)->u.node_record_update))
  817. return 0;
  818. break;
  819. case 0:
  820. /* extension case */
  821. if (!ASN1PERDecSkipFragmented(dec, 8))
  822. return 0;
  823. break;
  824. default:
  825. /* impossible */
  826. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  827. return 0;
  828. }
  829. return 1;
  830. }
  831. static void ASN1CALL ASN1Free_NodeRecordList(NodeRecordList *val)
  832. {
  833. if (val) {
  834. switch ((val)->choice) {
  835. case 2:
  836. ASN1Free_SetOfNodeRecordRefreshes(&(val)->u.node_record_refresh);
  837. break;
  838. case 3:
  839. ASN1Free_SetOfNodeRecordUpdates(&(val)->u.node_record_update);
  840. break;
  841. }
  842. }
  843. }
  844. static int ASN1CALL ASN1Enc_WaitingList(ASN1encoding_t enc, PWaitingList *val)
  845. {
  846. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_WaitingList_ElmFn);
  847. }
  848. static int ASN1CALL ASN1Enc_WaitingList_ElmFn(ASN1encoding_t enc, PWaitingList val)
  849. {
  850. if (!ASN1PEREncUnsignedShort(enc, val->value - 1001))
  851. return 0;
  852. return 1;
  853. }
  854. static int ASN1CALL ASN1Dec_WaitingList(ASN1decoding_t dec, PWaitingList *val)
  855. {
  856. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_WaitingList_ElmFn, sizeof(**val));
  857. }
  858. static int ASN1CALL ASN1Dec_WaitingList_ElmFn(ASN1decoding_t dec, PWaitingList val)
  859. {
  860. if (!ASN1PERDecUnsignedShort(dec, &val->value))
  861. return 0;
  862. val->value += 1001;
  863. return 1;
  864. }
  865. static void ASN1CALL ASN1Free_WaitingList(PWaitingList *val)
  866. {
  867. if (val) {
  868. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_WaitingList_ElmFn);
  869. }
  870. }
  871. static void ASN1CALL ASN1Free_WaitingList_ElmFn(PWaitingList val)
  872. {
  873. if (val) {
  874. }
  875. }
  876. static int ASN1CALL ASN1Enc_PermissionList(ASN1encoding_t enc, PPermissionList *val)
  877. {
  878. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_PermissionList_ElmFn, 0, 65535, 16);
  879. }
  880. static int ASN1CALL ASN1Enc_PermissionList_ElmFn(ASN1encoding_t enc, PPermissionList val)
  881. {
  882. if (!ASN1PEREncUnsignedShort(enc, val->value - 1001))
  883. return 0;
  884. return 1;
  885. }
  886. static int ASN1CALL ASN1Dec_PermissionList(ASN1decoding_t dec, PPermissionList *val)
  887. {
  888. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_PermissionList_ElmFn, sizeof(**val), 0, 65535, 16);
  889. }
  890. static int ASN1CALL ASN1Dec_PermissionList_ElmFn(ASN1decoding_t dec, PPermissionList val)
  891. {
  892. if (!ASN1PERDecUnsignedShort(dec, &val->value))
  893. return 0;
  894. val->value += 1001;
  895. return 1;
  896. }
  897. static void ASN1CALL ASN1Free_PermissionList(PPermissionList *val)
  898. {
  899. if (val) {
  900. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_PermissionList_ElmFn);
  901. }
  902. }
  903. static void ASN1CALL ASN1Free_PermissionList_ElmFn(PPermissionList val)
  904. {
  905. if (val) {
  906. }
  907. }
  908. static int ASN1CALL ASN1Enc_SetOfDestinationNodes(ASN1encoding_t enc, PSetOfDestinationNodes *val)
  909. {
  910. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfDestinationNodes_ElmFn);
  911. }
  912. static int ASN1CALL ASN1Enc_SetOfDestinationNodes_ElmFn(ASN1encoding_t enc, PSetOfDestinationNodes val)
  913. {
  914. if (!ASN1PEREncUnsignedShort(enc, val->value - 1001))
  915. return 0;
  916. return 1;
  917. }
  918. static int ASN1CALL ASN1Dec_SetOfDestinationNodes(ASN1decoding_t dec, PSetOfDestinationNodes *val)
  919. {
  920. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfDestinationNodes_ElmFn, sizeof(**val));
  921. }
  922. static int ASN1CALL ASN1Dec_SetOfDestinationNodes_ElmFn(ASN1decoding_t dec, PSetOfDestinationNodes val)
  923. {
  924. if (!ASN1PERDecUnsignedShort(dec, &val->value))
  925. return 0;
  926. val->value += 1001;
  927. return 1;
  928. }
  929. static void ASN1CALL ASN1Free_SetOfDestinationNodes(PSetOfDestinationNodes *val)
  930. {
  931. if (val) {
  932. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfDestinationNodes_ElmFn);
  933. }
  934. }
  935. static void ASN1CALL ASN1Free_SetOfDestinationNodes_ElmFn(PSetOfDestinationNodes val)
  936. {
  937. if (val) {
  938. }
  939. }
  940. static int ASN1CALL ASN1Enc_NodeInformation(ASN1encoding_t enc, NodeInformation *val)
  941. {
  942. if (!ASN1PEREncExtensionBitClear(enc))
  943. return 0;
  944. if (!ASN1Enc_NodeRecordList(enc, &(val)->node_record_list))
  945. return 0;
  946. if (!ASN1PEREncUnsignedShort(enc, (val)->roster_instance_number))
  947. return 0;
  948. if (!ASN1PEREncBoolean(enc, (val)->nodes_are_added))
  949. return 0;
  950. if (!ASN1PEREncBoolean(enc, (val)->nodes_are_removed))
  951. return 0;
  952. return 1;
  953. }
  954. static int ASN1CALL ASN1Dec_NodeInformation(ASN1decoding_t dec, NodeInformation *val)
  955. {
  956. ASN1uint32_t y;
  957. if (!ASN1PERDecExtensionBit(dec, &y))
  958. return 0;
  959. if (!ASN1Dec_NodeRecordList(dec, &(val)->node_record_list))
  960. return 0;
  961. if (!ASN1PERDecUnsignedShort(dec, &(val)->roster_instance_number))
  962. return 0;
  963. if (!ASN1PERDecBoolean(dec, &(val)->nodes_are_added))
  964. return 0;
  965. if (!ASN1PERDecBoolean(dec, &(val)->nodes_are_removed))
  966. return 0;
  967. if (y) {
  968. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  969. return 0;
  970. }
  971. return 1;
  972. }
  973. static void ASN1CALL ASN1Free_NodeInformation(NodeInformation *val)
  974. {
  975. if (val) {
  976. ASN1Free_NodeRecordList(&(val)->node_record_list);
  977. }
  978. }
  979. static int ASN1CALL ASN1Enc_SetOfTransferringNodesIn(ASN1encoding_t enc, PSetOfTransferringNodesIn *val)
  980. {
  981. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfTransferringNodesIn_ElmFn);
  982. }
  983. static int ASN1CALL ASN1Enc_SetOfTransferringNodesIn_ElmFn(ASN1encoding_t enc, PSetOfTransferringNodesIn val)
  984. {
  985. if (!ASN1PEREncUnsignedShort(enc, val->value - 1001))
  986. return 0;
  987. return 1;
  988. }
  989. static int ASN1CALL ASN1Dec_SetOfTransferringNodesIn(ASN1decoding_t dec, PSetOfTransferringNodesIn *val)
  990. {
  991. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfTransferringNodesIn_ElmFn, sizeof(**val));
  992. }
  993. static int ASN1CALL ASN1Dec_SetOfTransferringNodesIn_ElmFn(ASN1decoding_t dec, PSetOfTransferringNodesIn val)
  994. {
  995. if (!ASN1PERDecUnsignedShort(dec, &val->value))
  996. return 0;
  997. val->value += 1001;
  998. return 1;
  999. }
  1000. static void ASN1CALL ASN1Free_SetOfTransferringNodesIn(PSetOfTransferringNodesIn *val)
  1001. {
  1002. if (val) {
  1003. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfTransferringNodesIn_ElmFn);
  1004. }
  1005. }
  1006. static void ASN1CALL ASN1Free_SetOfTransferringNodesIn_ElmFn(PSetOfTransferringNodesIn val)
  1007. {
  1008. if (val) {
  1009. }
  1010. }
  1011. static int ASN1CALL ASN1Enc_SetOfTransferringNodesRs(ASN1encoding_t enc, PSetOfTransferringNodesRs *val)
  1012. {
  1013. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfTransferringNodesRs_ElmFn);
  1014. }
  1015. static int ASN1CALL ASN1Enc_SetOfTransferringNodesRs_ElmFn(ASN1encoding_t enc, PSetOfTransferringNodesRs val)
  1016. {
  1017. if (!ASN1PEREncUnsignedShort(enc, val->value - 1001))
  1018. return 0;
  1019. return 1;
  1020. }
  1021. static int ASN1CALL ASN1Dec_SetOfTransferringNodesRs(ASN1decoding_t dec, PSetOfTransferringNodesRs *val)
  1022. {
  1023. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfTransferringNodesRs_ElmFn, sizeof(**val));
  1024. }
  1025. static int ASN1CALL ASN1Dec_SetOfTransferringNodesRs_ElmFn(ASN1decoding_t dec, PSetOfTransferringNodesRs val)
  1026. {
  1027. if (!ASN1PERDecUnsignedShort(dec, &val->value))
  1028. return 0;
  1029. val->value += 1001;
  1030. return 1;
  1031. }
  1032. static void ASN1CALL ASN1Free_SetOfTransferringNodesRs(PSetOfTransferringNodesRs *val)
  1033. {
  1034. if (val) {
  1035. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfTransferringNodesRs_ElmFn);
  1036. }
  1037. }
  1038. static void ASN1CALL ASN1Free_SetOfTransferringNodesRs_ElmFn(PSetOfTransferringNodesRs val)
  1039. {
  1040. if (val) {
  1041. }
  1042. }
  1043. static int ASN1CALL ASN1Enc_SetOfTransferringNodesRq(ASN1encoding_t enc, PSetOfTransferringNodesRq *val)
  1044. {
  1045. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfTransferringNodesRq_ElmFn);
  1046. }
  1047. static int ASN1CALL ASN1Enc_SetOfTransferringNodesRq_ElmFn(ASN1encoding_t enc, PSetOfTransferringNodesRq val)
  1048. {
  1049. if (!ASN1PEREncUnsignedShort(enc, val->value - 1001))
  1050. return 0;
  1051. return 1;
  1052. }
  1053. static int ASN1CALL ASN1Dec_SetOfTransferringNodesRq(ASN1decoding_t dec, PSetOfTransferringNodesRq *val)
  1054. {
  1055. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfTransferringNodesRq_ElmFn, sizeof(**val));
  1056. }
  1057. static int ASN1CALL ASN1Dec_SetOfTransferringNodesRq_ElmFn(ASN1decoding_t dec, PSetOfTransferringNodesRq val)
  1058. {
  1059. if (!ASN1PERDecUnsignedShort(dec, &val->value))
  1060. return 0;
  1061. val->value += 1001;
  1062. return 1;
  1063. }
  1064. static void ASN1CALL ASN1Free_SetOfTransferringNodesRq(PSetOfTransferringNodesRq *val)
  1065. {
  1066. if (val) {
  1067. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfTransferringNodesRq_ElmFn);
  1068. }
  1069. }
  1070. static void ASN1CALL ASN1Free_SetOfTransferringNodesRq_ElmFn(PSetOfTransferringNodesRq val)
  1071. {
  1072. if (val) {
  1073. }
  1074. }
  1075. static int ASN1CALL ASN1Enc_RegistryEntryOwnerOwned(ASN1encoding_t enc, RegistryEntryOwnerOwned *val)
  1076. {
  1077. if (!ASN1PEREncUnsignedShort(enc, (val)->node_id - 1001))
  1078. return 0;
  1079. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  1080. return 0;
  1081. return 1;
  1082. }
  1083. static int ASN1CALL ASN1Dec_RegistryEntryOwnerOwned(ASN1decoding_t dec, RegistryEntryOwnerOwned *val)
  1084. {
  1085. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_id))
  1086. return 0;
  1087. (val)->node_id += 1001;
  1088. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  1089. return 0;
  1090. return 1;
  1091. }
  1092. static int ASN1CALL ASN1Enc_ParticipantsList(ASN1encoding_t enc, PParticipantsList *val)
  1093. {
  1094. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_ParticipantsList_ElmFn);
  1095. }
  1096. static int ASN1CALL ASN1Enc_ParticipantsList_ElmFn(ASN1encoding_t enc, PParticipantsList val)
  1097. {
  1098. ASN1PEREncAlignment(enc);
  1099. if (!ASN1PEREncBitVal(enc, 8, (val->value).length))
  1100. return 0;
  1101. if (!ASN1PEREncChar16String(enc, (val->value).length, (val->value).value, 16))
  1102. return 0;
  1103. return 1;
  1104. }
  1105. static int ASN1CALL ASN1Dec_ParticipantsList(ASN1decoding_t dec, PParticipantsList *val)
  1106. {
  1107. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_ParticipantsList_ElmFn, sizeof(**val));
  1108. }
  1109. static int ASN1CALL ASN1Dec_ParticipantsList_ElmFn(ASN1decoding_t dec, PParticipantsList val)
  1110. {
  1111. ASN1PERDecAlignment(dec);
  1112. if (!ASN1PERDecU32Val(dec, 8, &(val->value).length))
  1113. return 0;
  1114. if (!ASN1PERDecChar16String(dec, (val->value).length, &(val->value).value, 16))
  1115. return 0;
  1116. return 1;
  1117. }
  1118. static void ASN1CALL ASN1Free_ParticipantsList(PParticipantsList *val)
  1119. {
  1120. if (val) {
  1121. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_ParticipantsList_ElmFn);
  1122. }
  1123. }
  1124. static void ASN1CALL ASN1Free_ParticipantsList_ElmFn(PParticipantsList val)
  1125. {
  1126. if (val) {
  1127. ASN1char16string_free(&val->value);
  1128. }
  1129. }
  1130. static int ASN1CALL ASN1Enc_Key(ASN1encoding_t enc, Key *val)
  1131. {
  1132. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  1133. return 0;
  1134. switch ((val)->choice) {
  1135. case 1:
  1136. if (!ASN1PEREncObjectIdentifier(enc, &(val)->u.object))
  1137. return 0;
  1138. break;
  1139. case 2:
  1140. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->u.h221_non_standard, 4, 255, 8))
  1141. return 0;
  1142. break;
  1143. default:
  1144. /* impossible */
  1145. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1146. return 0;
  1147. }
  1148. return 1;
  1149. }
  1150. static int ASN1CALL ASN1Dec_Key(ASN1decoding_t dec, Key *val)
  1151. {
  1152. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  1153. return 0;
  1154. switch ((val)->choice) {
  1155. case 1:
  1156. if (!ASN1PERDecObjectIdentifier(dec, &(val)->u.object))
  1157. return 0;
  1158. break;
  1159. case 2:
  1160. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->u.h221_non_standard, 4, 255, 8))
  1161. return 0;
  1162. break;
  1163. default:
  1164. /* impossible */
  1165. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1166. return 0;
  1167. }
  1168. return 1;
  1169. }
  1170. static void ASN1CALL ASN1Free_Key(Key *val)
  1171. {
  1172. if (val) {
  1173. switch ((val)->choice) {
  1174. case 1:
  1175. ASN1objectidentifier_free(&(val)->u.object);
  1176. break;
  1177. case 2:
  1178. break;
  1179. }
  1180. }
  1181. }
  1182. static int ASN1CALL ASN1Enc_NonStandardParameter(ASN1encoding_t enc, NonStandardParameter *val)
  1183. {
  1184. if (!ASN1Enc_Key(enc, &(val)->key))
  1185. return 0;
  1186. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->data))
  1187. return 0;
  1188. return 1;
  1189. }
  1190. static int ASN1CALL ASN1Dec_NonStandardParameter(ASN1decoding_t dec, NonStandardParameter *val)
  1191. {
  1192. if (!ASN1Dec_Key(dec, &(val)->key))
  1193. return 0;
  1194. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->data))
  1195. return 0;
  1196. return 1;
  1197. }
  1198. static void ASN1CALL ASN1Free_NonStandardParameter(NonStandardParameter *val)
  1199. {
  1200. if (val) {
  1201. ASN1Free_Key(&(val)->key);
  1202. ASN1octetstring_free(&(val)->data);
  1203. }
  1204. }
  1205. static ASN1stringtableentry_t Password_numeric_StringTableEntries[] = {
  1206. { 48, 57, 0 },
  1207. };
  1208. static ASN1stringtable_t Password_numeric_StringTable = {
  1209. 1, Password_numeric_StringTableEntries
  1210. };
  1211. static ASN1stringtableentry_t Password_password_text_StringTableEntries[] = {
  1212. { 0, 255, 0 },
  1213. };
  1214. static ASN1stringtable_t Password_password_text_StringTable = {
  1215. 1, Password_password_text_StringTableEntries
  1216. };
  1217. static int ASN1CALL ASN1Enc_Password(ASN1encoding_t enc, Password *val)
  1218. {
  1219. ASN1uint32_t t;
  1220. if (!ASN1PEREncExtensionBitClear(enc))
  1221. return 0;
  1222. if (!ASN1PEREncBits(enc, 1, (val)->o))
  1223. return 0;
  1224. t = lstrlenA((val)->numeric);
  1225. if (!ASN1PEREncBitVal(enc, 8, t - 1))
  1226. return 0;
  1227. ASN1PEREncAlignment(enc);
  1228. if (!ASN1PEREncTableCharString(enc, t, (val)->numeric, 4, &Password_numeric_StringTable))
  1229. return 0;
  1230. if ((val)->o[0] & 0x80) {
  1231. ASN1PEREncAlignment(enc);
  1232. if (!ASN1PEREncBitVal(enc, 8, ((val)->password_text).length))
  1233. return 0;
  1234. if (!ASN1PEREncTableChar16String(enc, ((val)->password_text).length, ((val)->password_text).value, 8, &Password_password_text_StringTable))
  1235. return 0;
  1236. }
  1237. return 1;
  1238. }
  1239. static int ASN1CALL ASN1Dec_Password(ASN1decoding_t dec, Password *val)
  1240. {
  1241. ASN1uint32_t y;
  1242. ASN1uint32_t l;
  1243. if (!ASN1PERDecExtensionBit(dec, &y))
  1244. return 0;
  1245. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  1246. return 0;
  1247. if (!ASN1PERDecU32Val(dec, 8, &l))
  1248. return 0;
  1249. l += 1;
  1250. ASN1PERDecAlignment(dec);
  1251. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->numeric, 4, &Password_numeric_StringTable))
  1252. return 0;
  1253. if ((val)->o[0] & 0x80) {
  1254. ASN1PERDecAlignment(dec);
  1255. if (!ASN1PERDecU32Val(dec, 8, &((val)->password_text).length))
  1256. return 0;
  1257. if (!ASN1PERDecTableChar16String(dec, ((val)->password_text).length, &((val)->password_text).value, 8, &Password_password_text_StringTable))
  1258. return 0;
  1259. }
  1260. if (y) {
  1261. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1262. return 0;
  1263. }
  1264. return 1;
  1265. }
  1266. static void ASN1CALL ASN1Free_Password(Password *val)
  1267. {
  1268. if (val) {
  1269. if ((val)->o[0] & 0x80) {
  1270. ASN1char16string_free(&(val)->password_text);
  1271. }
  1272. }
  1273. }
  1274. static ASN1stringtableentry_t PasswordSelector_password_selector_numeric_StringTableEntries[] = {
  1275. { 48, 57, 0 },
  1276. };
  1277. static ASN1stringtable_t PasswordSelector_password_selector_numeric_StringTable = {
  1278. 1, PasswordSelector_password_selector_numeric_StringTableEntries
  1279. };
  1280. static ASN1stringtableentry_t PasswordSelector_password_selector_text_StringTableEntries[] = {
  1281. { 0, 255, 0 },
  1282. };
  1283. static ASN1stringtable_t PasswordSelector_password_selector_text_StringTable = {
  1284. 1, PasswordSelector_password_selector_text_StringTableEntries
  1285. };
  1286. static int ASN1CALL ASN1Enc_PasswordSelector(ASN1encoding_t enc, PasswordSelector *val)
  1287. {
  1288. ASN1uint32_t t;
  1289. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  1290. return 0;
  1291. switch ((val)->choice) {
  1292. case 1:
  1293. t = lstrlenA((val)->u.password_selector_numeric);
  1294. if (!ASN1PEREncBitVal(enc, 8, t - 1))
  1295. return 0;
  1296. ASN1PEREncAlignment(enc);
  1297. if (!ASN1PEREncTableCharString(enc, t, (val)->u.password_selector_numeric, 4, &PasswordSelector_password_selector_numeric_StringTable))
  1298. return 0;
  1299. break;
  1300. case 2:
  1301. ASN1PEREncAlignment(enc);
  1302. if (!ASN1PEREncBitVal(enc, 8, ((val)->u.password_selector_text).length))
  1303. return 0;
  1304. if (!ASN1PEREncTableChar16String(enc, ((val)->u.password_selector_text).length, ((val)->u.password_selector_text).value, 8, &PasswordSelector_password_selector_text_StringTable))
  1305. return 0;
  1306. break;
  1307. default:
  1308. /* impossible */
  1309. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1310. return 0;
  1311. }
  1312. return 1;
  1313. }
  1314. static int ASN1CALL ASN1Dec_PasswordSelector(ASN1decoding_t dec, PasswordSelector *val)
  1315. {
  1316. ASN1uint32_t l;
  1317. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  1318. return 0;
  1319. switch ((val)->choice) {
  1320. case 1:
  1321. if (!ASN1PERDecU32Val(dec, 8, &l))
  1322. return 0;
  1323. l += 1;
  1324. ASN1PERDecAlignment(dec);
  1325. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->u.password_selector_numeric, 4, &PasswordSelector_password_selector_numeric_StringTable))
  1326. return 0;
  1327. break;
  1328. case 2:
  1329. ASN1PERDecAlignment(dec);
  1330. if (!ASN1PERDecU32Val(dec, 8, &((val)->u.password_selector_text).length))
  1331. return 0;
  1332. if (!ASN1PERDecTableChar16String(dec, ((val)->u.password_selector_text).length, &((val)->u.password_selector_text).value, 8, &PasswordSelector_password_selector_text_StringTable))
  1333. return 0;
  1334. break;
  1335. case 0:
  1336. /* extension case */
  1337. if (!ASN1PERDecSkipFragmented(dec, 8))
  1338. return 0;
  1339. break;
  1340. default:
  1341. /* impossible */
  1342. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1343. return 0;
  1344. }
  1345. return 1;
  1346. }
  1347. static void ASN1CALL ASN1Free_PasswordSelector(PasswordSelector *val)
  1348. {
  1349. if (val) {
  1350. switch ((val)->choice) {
  1351. case 1:
  1352. break;
  1353. case 2:
  1354. ASN1char16string_free(&(val)->u.password_selector_text);
  1355. break;
  1356. }
  1357. }
  1358. }
  1359. static int ASN1CALL ASN1Enc_ChallengeResponseItem(ASN1encoding_t enc, ChallengeResponseItem *val)
  1360. {
  1361. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  1362. return 0;
  1363. switch ((val)->choice) {
  1364. case 1:
  1365. if (!ASN1Enc_PasswordSelector(enc, &(val)->u.password_string))
  1366. return 0;
  1367. break;
  1368. case 2:
  1369. if (!ASN1Enc_SetOfUserData(enc, &(val)->u.set_of_response_data))
  1370. return 0;
  1371. break;
  1372. default:
  1373. /* impossible */
  1374. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1375. return 0;
  1376. }
  1377. return 1;
  1378. }
  1379. static int ASN1CALL ASN1Dec_ChallengeResponseItem(ASN1decoding_t dec, ChallengeResponseItem *val)
  1380. {
  1381. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  1382. return 0;
  1383. switch ((val)->choice) {
  1384. case 1:
  1385. if (!ASN1Dec_PasswordSelector(dec, &(val)->u.password_string))
  1386. return 0;
  1387. break;
  1388. case 2:
  1389. if (!ASN1Dec_SetOfUserData(dec, &(val)->u.set_of_response_data))
  1390. return 0;
  1391. break;
  1392. case 0:
  1393. /* extension case */
  1394. if (!ASN1PERDecSkipFragmented(dec, 8))
  1395. return 0;
  1396. break;
  1397. default:
  1398. /* impossible */
  1399. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1400. return 0;
  1401. }
  1402. return 1;
  1403. }
  1404. static void ASN1CALL ASN1Free_ChallengeResponseItem(ChallengeResponseItem *val)
  1405. {
  1406. if (val) {
  1407. switch ((val)->choice) {
  1408. case 1:
  1409. ASN1Free_PasswordSelector(&(val)->u.password_string);
  1410. break;
  1411. case 2:
  1412. ASN1Free_SetOfUserData(&(val)->u.set_of_response_data);
  1413. break;
  1414. }
  1415. }
  1416. }
  1417. static int ASN1CALL ASN1Enc_ChallengeResponseAlgorithm(ASN1encoding_t enc, ChallengeResponseAlgorithm *val)
  1418. {
  1419. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  1420. return 0;
  1421. switch ((val)->choice) {
  1422. case 1:
  1423. break;
  1424. case 2:
  1425. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.non_standard_algorithm))
  1426. return 0;
  1427. break;
  1428. default:
  1429. /* impossible */
  1430. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1431. return 0;
  1432. }
  1433. return 1;
  1434. }
  1435. static int ASN1CALL ASN1Dec_ChallengeResponseAlgorithm(ASN1decoding_t dec, ChallengeResponseAlgorithm *val)
  1436. {
  1437. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  1438. return 0;
  1439. switch ((val)->choice) {
  1440. case 1:
  1441. break;
  1442. case 2:
  1443. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.non_standard_algorithm))
  1444. return 0;
  1445. break;
  1446. case 0:
  1447. /* extension case */
  1448. if (!ASN1PERDecSkipFragmented(dec, 8))
  1449. return 0;
  1450. break;
  1451. default:
  1452. /* impossible */
  1453. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1454. return 0;
  1455. }
  1456. return 1;
  1457. }
  1458. static void ASN1CALL ASN1Free_ChallengeResponseAlgorithm(ChallengeResponseAlgorithm *val)
  1459. {
  1460. if (val) {
  1461. switch ((val)->choice) {
  1462. case 2:
  1463. ASN1Free_NonStandardParameter(&(val)->u.non_standard_algorithm);
  1464. break;
  1465. }
  1466. }
  1467. }
  1468. static int ASN1CALL ASN1Enc_ChallengeItem(ASN1encoding_t enc, ChallengeItem *val)
  1469. {
  1470. if (!ASN1PEREncExtensionBitClear(enc))
  1471. return 0;
  1472. if (!ASN1Enc_ChallengeResponseAlgorithm(enc, &(val)->response_algorithm))
  1473. return 0;
  1474. if (!ASN1Enc_SetOfUserData(enc, &(val)->set_of_challenge_data))
  1475. return 0;
  1476. return 1;
  1477. }
  1478. static int ASN1CALL ASN1Dec_ChallengeItem(ASN1decoding_t dec, ChallengeItem *val)
  1479. {
  1480. ASN1uint32_t y;
  1481. if (!ASN1PERDecExtensionBit(dec, &y))
  1482. return 0;
  1483. if (!ASN1Dec_ChallengeResponseAlgorithm(dec, &(val)->response_algorithm))
  1484. return 0;
  1485. if (!ASN1Dec_SetOfUserData(dec, &(val)->set_of_challenge_data))
  1486. return 0;
  1487. if (y) {
  1488. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1489. return 0;
  1490. }
  1491. return 1;
  1492. }
  1493. static void ASN1CALL ASN1Free_ChallengeItem(ChallengeItem *val)
  1494. {
  1495. if (val) {
  1496. ASN1Free_ChallengeResponseAlgorithm(&(val)->response_algorithm);
  1497. ASN1Free_SetOfUserData(&(val)->set_of_challenge_data);
  1498. }
  1499. }
  1500. static int ASN1CALL ASN1Enc_ChallengeRequest(ASN1encoding_t enc, ChallengeRequest *val)
  1501. {
  1502. if (!ASN1PEREncExtensionBitClear(enc))
  1503. return 0;
  1504. if (!ASN1PEREncInteger(enc, (val)->challenge_tag))
  1505. return 0;
  1506. if (!ASN1Enc_SetOfChallengeItems(enc, &(val)->set_of_challenge_items))
  1507. return 0;
  1508. return 1;
  1509. }
  1510. static int ASN1CALL ASN1Dec_ChallengeRequest(ASN1decoding_t dec, ChallengeRequest *val)
  1511. {
  1512. ASN1uint32_t y;
  1513. if (!ASN1PERDecExtensionBit(dec, &y))
  1514. return 0;
  1515. if (!ASN1PERDecInteger(dec, &(val)->challenge_tag))
  1516. return 0;
  1517. if (!ASN1Dec_SetOfChallengeItems(dec, &(val)->set_of_challenge_items))
  1518. return 0;
  1519. if (y) {
  1520. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1521. return 0;
  1522. }
  1523. return 1;
  1524. }
  1525. static void ASN1CALL ASN1Free_ChallengeRequest(ChallengeRequest *val)
  1526. {
  1527. if (val) {
  1528. ASN1Free_SetOfChallengeItems(&(val)->set_of_challenge_items);
  1529. }
  1530. }
  1531. static int ASN1CALL ASN1Enc_ChallengeResponse(ASN1encoding_t enc, ChallengeResponse *val)
  1532. {
  1533. if (!ASN1PEREncExtensionBitClear(enc))
  1534. return 0;
  1535. if (!ASN1PEREncInteger(enc, (val)->challenge_tag))
  1536. return 0;
  1537. if (!ASN1Enc_ChallengeResponseAlgorithm(enc, &(val)->response_algorithm))
  1538. return 0;
  1539. if (!ASN1Enc_ChallengeResponseItem(enc, &(val)->response_item))
  1540. return 0;
  1541. return 1;
  1542. }
  1543. static int ASN1CALL ASN1Dec_ChallengeResponse(ASN1decoding_t dec, ChallengeResponse *val)
  1544. {
  1545. ASN1uint32_t y;
  1546. if (!ASN1PERDecExtensionBit(dec, &y))
  1547. return 0;
  1548. if (!ASN1PERDecInteger(dec, &(val)->challenge_tag))
  1549. return 0;
  1550. if (!ASN1Dec_ChallengeResponseAlgorithm(dec, &(val)->response_algorithm))
  1551. return 0;
  1552. if (!ASN1Dec_ChallengeResponseItem(dec, &(val)->response_item))
  1553. return 0;
  1554. if (y) {
  1555. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1556. return 0;
  1557. }
  1558. return 1;
  1559. }
  1560. static void ASN1CALL ASN1Free_ChallengeResponse(ChallengeResponse *val)
  1561. {
  1562. if (val) {
  1563. ASN1Free_ChallengeResponseAlgorithm(&(val)->response_algorithm);
  1564. ASN1Free_ChallengeResponseItem(&(val)->response_item);
  1565. }
  1566. }
  1567. static ASN1stringtableentry_t ConferenceName_numeric_StringTableEntries[] = {
  1568. { 48, 57, 0 },
  1569. };
  1570. static ASN1stringtable_t ConferenceName_numeric_StringTable = {
  1571. 1, ConferenceName_numeric_StringTableEntries
  1572. };
  1573. static ASN1stringtableentry_t ConferenceName_conference_name_text_StringTableEntries[] = {
  1574. { 0, 255, 0 },
  1575. };
  1576. static ASN1stringtable_t ConferenceName_conference_name_text_StringTable = {
  1577. 1, ConferenceName_conference_name_text_StringTableEntries
  1578. };
  1579. static int ASN1CALL ASN1Enc_ConferenceName(ASN1encoding_t enc, ConferenceName *val)
  1580. {
  1581. ASN1uint32_t t;
  1582. if (!ASN1PEREncExtensionBitClear(enc))
  1583. return 0;
  1584. if (!ASN1PEREncBits(enc, 1, (val)->o))
  1585. return 0;
  1586. t = lstrlenA((val)->numeric);
  1587. if (!ASN1PEREncBitVal(enc, 8, t - 1))
  1588. return 0;
  1589. ASN1PEREncAlignment(enc);
  1590. if (!ASN1PEREncTableCharString(enc, t, (val)->numeric, 4, &ConferenceName_numeric_StringTable))
  1591. return 0;
  1592. if ((val)->o[0] & 0x80) {
  1593. ASN1PEREncAlignment(enc);
  1594. if (!ASN1PEREncBitVal(enc, 8, ((val)->conference_name_text).length))
  1595. return 0;
  1596. if (!ASN1PEREncTableChar16String(enc, ((val)->conference_name_text).length, ((val)->conference_name_text).value, 8, &ConferenceName_conference_name_text_StringTable))
  1597. return 0;
  1598. }
  1599. return 1;
  1600. }
  1601. static int ASN1CALL ASN1Dec_ConferenceName(ASN1decoding_t dec, ConferenceName *val)
  1602. {
  1603. ASN1uint32_t y;
  1604. ASN1uint32_t l;
  1605. if (!ASN1PERDecExtensionBit(dec, &y))
  1606. return 0;
  1607. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  1608. return 0;
  1609. if (!ASN1PERDecU32Val(dec, 8, &l))
  1610. return 0;
  1611. l += 1;
  1612. ASN1PERDecAlignment(dec);
  1613. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->numeric, 4, &ConferenceName_numeric_StringTable))
  1614. return 0;
  1615. if ((val)->o[0] & 0x80) {
  1616. ASN1PERDecAlignment(dec);
  1617. if (!ASN1PERDecU32Val(dec, 8, &((val)->conference_name_text).length))
  1618. return 0;
  1619. if (!ASN1PERDecTableChar16String(dec, ((val)->conference_name_text).length, &((val)->conference_name_text).value, 8, &ConferenceName_conference_name_text_StringTable))
  1620. return 0;
  1621. }
  1622. if (y) {
  1623. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1624. return 0;
  1625. }
  1626. return 1;
  1627. }
  1628. static void ASN1CALL ASN1Free_ConferenceName(ConferenceName *val)
  1629. {
  1630. if (val) {
  1631. if ((val)->o[0] & 0x80) {
  1632. ASN1char16string_free(&(val)->conference_name_text);
  1633. }
  1634. }
  1635. }
  1636. static ASN1stringtableentry_t ConferenceNameSelector_name_selector_numeric_StringTableEntries[] = {
  1637. { 48, 57, 0 },
  1638. };
  1639. static ASN1stringtable_t ConferenceNameSelector_name_selector_numeric_StringTable = {
  1640. 1, ConferenceNameSelector_name_selector_numeric_StringTableEntries
  1641. };
  1642. static ASN1stringtableentry_t ConferenceNameSelector_name_selector_text_StringTableEntries[] = {
  1643. { 0, 255, 0 },
  1644. };
  1645. static ASN1stringtable_t ConferenceNameSelector_name_selector_text_StringTable = {
  1646. 1, ConferenceNameSelector_name_selector_text_StringTableEntries
  1647. };
  1648. static int ASN1CALL ASN1Enc_ConferenceNameSelector(ASN1encoding_t enc, ConferenceNameSelector *val)
  1649. {
  1650. ASN1uint32_t t;
  1651. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  1652. return 0;
  1653. switch ((val)->choice) {
  1654. case 1:
  1655. t = lstrlenA((val)->u.name_selector_numeric);
  1656. if (!ASN1PEREncBitVal(enc, 8, t - 1))
  1657. return 0;
  1658. ASN1PEREncAlignment(enc);
  1659. if (!ASN1PEREncTableCharString(enc, t, (val)->u.name_selector_numeric, 4, &ConferenceNameSelector_name_selector_numeric_StringTable))
  1660. return 0;
  1661. break;
  1662. case 2:
  1663. ASN1PEREncAlignment(enc);
  1664. if (!ASN1PEREncBitVal(enc, 8, ((val)->u.name_selector_text).length))
  1665. return 0;
  1666. if (!ASN1PEREncTableChar16String(enc, ((val)->u.name_selector_text).length, ((val)->u.name_selector_text).value, 8, &ConferenceNameSelector_name_selector_text_StringTable))
  1667. return 0;
  1668. break;
  1669. default:
  1670. /* impossible */
  1671. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1672. return 0;
  1673. }
  1674. return 1;
  1675. }
  1676. static int ASN1CALL ASN1Dec_ConferenceNameSelector(ASN1decoding_t dec, ConferenceNameSelector *val)
  1677. {
  1678. ASN1uint32_t l;
  1679. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  1680. return 0;
  1681. switch ((val)->choice) {
  1682. case 1:
  1683. if (!ASN1PERDecU32Val(dec, 8, &l))
  1684. return 0;
  1685. l += 1;
  1686. ASN1PERDecAlignment(dec);
  1687. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->u.name_selector_numeric, 4, &ConferenceNameSelector_name_selector_numeric_StringTable))
  1688. return 0;
  1689. break;
  1690. case 2:
  1691. ASN1PERDecAlignment(dec);
  1692. if (!ASN1PERDecU32Val(dec, 8, &((val)->u.name_selector_text).length))
  1693. return 0;
  1694. if (!ASN1PERDecTableChar16String(dec, ((val)->u.name_selector_text).length, &((val)->u.name_selector_text).value, 8, &ConferenceNameSelector_name_selector_text_StringTable))
  1695. return 0;
  1696. break;
  1697. case 0:
  1698. /* extension case */
  1699. if (!ASN1PERDecSkipFragmented(dec, 8))
  1700. return 0;
  1701. break;
  1702. default:
  1703. /* impossible */
  1704. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1705. return 0;
  1706. }
  1707. return 1;
  1708. }
  1709. static void ASN1CALL ASN1Free_ConferenceNameSelector(ConferenceNameSelector *val)
  1710. {
  1711. if (val) {
  1712. switch ((val)->choice) {
  1713. case 1:
  1714. break;
  1715. case 2:
  1716. ASN1char16string_free(&(val)->u.name_selector_text);
  1717. break;
  1718. }
  1719. }
  1720. }
  1721. static int ASN1CALL ASN1Enc_NodeProperties(ASN1encoding_t enc, NodeProperties *val)
  1722. {
  1723. if (!ASN1PEREncExtensionBitClear(enc))
  1724. return 0;
  1725. if (!ASN1PEREncBoolean(enc, (val)->device_is_manager))
  1726. return 0;
  1727. if (!ASN1PEREncBoolean(enc, (val)->device_is_peripheral))
  1728. return 0;
  1729. return 1;
  1730. }
  1731. static int ASN1CALL ASN1Dec_NodeProperties(ASN1decoding_t dec, NodeProperties *val)
  1732. {
  1733. ASN1uint32_t y;
  1734. if (!ASN1PERDecExtensionBit(dec, &y))
  1735. return 0;
  1736. if (!ASN1PERDecBoolean(dec, &(val)->device_is_manager))
  1737. return 0;
  1738. if (!ASN1PERDecBoolean(dec, &(val)->device_is_peripheral))
  1739. return 0;
  1740. if (y) {
  1741. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1742. return 0;
  1743. }
  1744. return 1;
  1745. }
  1746. static int ASN1CALL ASN1Enc_AsymmetryIndicator(ASN1encoding_t enc, AsymmetryIndicator *val)
  1747. {
  1748. ASN1uint32_t l;
  1749. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  1750. return 0;
  1751. switch ((val)->choice) {
  1752. case 1:
  1753. break;
  1754. case 2:
  1755. break;
  1756. case 3:
  1757. l = ASN1uint32_uoctets((val)->u.unknown);
  1758. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  1759. return 0;
  1760. ASN1PEREncAlignment(enc);
  1761. if (!ASN1PEREncBitVal(enc, l * 8, (val)->u.unknown))
  1762. return 0;
  1763. break;
  1764. default:
  1765. /* impossible */
  1766. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1767. return 0;
  1768. }
  1769. return 1;
  1770. }
  1771. static int ASN1CALL ASN1Dec_AsymmetryIndicator(ASN1decoding_t dec, AsymmetryIndicator *val)
  1772. {
  1773. ASN1uint32_t l;
  1774. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  1775. return 0;
  1776. switch ((val)->choice) {
  1777. case 1:
  1778. break;
  1779. case 2:
  1780. break;
  1781. case 3:
  1782. if (!ASN1PERDecU32Val(dec, 2, &l))
  1783. return 0;
  1784. l += 1;
  1785. ASN1PERDecAlignment(dec);
  1786. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->u.unknown))
  1787. return 0;
  1788. break;
  1789. default:
  1790. /* impossible */
  1791. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1792. return 0;
  1793. }
  1794. return 1;
  1795. }
  1796. static int ASN1CALL ASN1Enc_AlternativeNodeID(ASN1encoding_t enc, AlternativeNodeID *val)
  1797. {
  1798. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 0))
  1799. return 0;
  1800. switch ((val)->choice) {
  1801. case 1:
  1802. if (!ASN1PEREncOctetString_FixedSize(enc, (ASN1octetstring2_t *) &(val)->u.h243_node_id, 2))
  1803. return 0;
  1804. break;
  1805. default:
  1806. /* impossible */
  1807. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  1808. return 0;
  1809. }
  1810. return 1;
  1811. }
  1812. static int ASN1CALL ASN1Dec_AlternativeNodeID(ASN1decoding_t dec, AlternativeNodeID *val)
  1813. {
  1814. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 0))
  1815. return 0;
  1816. switch ((val)->choice) {
  1817. case 1:
  1818. if (!ASN1PERDecOctetString_FixedSize(dec, (ASN1octetstring2_t *) &(val)->u.h243_node_id, 2))
  1819. return 0;
  1820. break;
  1821. case 0:
  1822. /* extension case */
  1823. if (!ASN1PERDecSkipFragmented(dec, 8))
  1824. return 0;
  1825. break;
  1826. default:
  1827. /* impossible */
  1828. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  1829. return 0;
  1830. }
  1831. return 1;
  1832. }
  1833. static void ASN1CALL ASN1Free_AlternativeNodeID(AlternativeNodeID *val)
  1834. {
  1835. if (val) {
  1836. switch ((val)->choice) {
  1837. case 1:
  1838. break;
  1839. }
  1840. }
  1841. }
  1842. static ASN1stringtableentry_t ConferenceDescriptor_conference_name_modifier_StringTableEntries[] = {
  1843. { 48, 57, 0 },
  1844. };
  1845. static ASN1stringtable_t ConferenceDescriptor_conference_name_modifier_StringTable = {
  1846. 1, ConferenceDescriptor_conference_name_modifier_StringTableEntries
  1847. };
  1848. static int ASN1CALL ASN1Enc_ConferenceDescriptor(ASN1encoding_t enc, ConferenceDescriptor *val)
  1849. {
  1850. ASN1uint32_t t;
  1851. if (!ASN1PEREncExtensionBitClear(enc))
  1852. return 0;
  1853. if (!ASN1PEREncBits(enc, 3, (val)->o))
  1854. return 0;
  1855. if (!ASN1Enc_ConferenceName(enc, &(val)->conference_name))
  1856. return 0;
  1857. if ((val)->o[0] & 0x80) {
  1858. t = lstrlenA((val)->conference_name_modifier);
  1859. if (!ASN1PEREncBitVal(enc, 8, t - 1))
  1860. return 0;
  1861. ASN1PEREncAlignment(enc);
  1862. if (!ASN1PEREncTableCharString(enc, t, (val)->conference_name_modifier, 4, &ConferenceDescriptor_conference_name_modifier_StringTable))
  1863. return 0;
  1864. }
  1865. if ((val)->o[0] & 0x40) {
  1866. ASN1PEREncAlignment(enc);
  1867. if (!ASN1PEREncBitVal(enc, 8, ((val)->conference_description).length))
  1868. return 0;
  1869. if (!ASN1PEREncChar16String(enc, ((val)->conference_description).length, ((val)->conference_description).value, 16))
  1870. return 0;
  1871. }
  1872. if (!ASN1PEREncBoolean(enc, (val)->conference_is_locked))
  1873. return 0;
  1874. if (!ASN1PEREncBoolean(enc, (val)->clear_password_required))
  1875. return 0;
  1876. if ((val)->o[0] & 0x20) {
  1877. if (!ASN1Enc_SetOfNetworkAddresses(enc, &(val)->descriptor_net_address))
  1878. return 0;
  1879. }
  1880. return 1;
  1881. }
  1882. static int ASN1CALL ASN1Dec_ConferenceDescriptor(ASN1decoding_t dec, ConferenceDescriptor *val)
  1883. {
  1884. ASN1uint32_t y;
  1885. ASN1uint32_t l;
  1886. if (!ASN1PERDecExtensionBit(dec, &y))
  1887. return 0;
  1888. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  1889. return 0;
  1890. if (!ASN1Dec_ConferenceName(dec, &(val)->conference_name))
  1891. return 0;
  1892. if ((val)->o[0] & 0x80) {
  1893. if (!ASN1PERDecU32Val(dec, 8, &l))
  1894. return 0;
  1895. l += 1;
  1896. ASN1PERDecAlignment(dec);
  1897. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->conference_name_modifier, 4, &ConferenceDescriptor_conference_name_modifier_StringTable))
  1898. return 0;
  1899. }
  1900. if ((val)->o[0] & 0x40) {
  1901. ASN1PERDecAlignment(dec);
  1902. if (!ASN1PERDecU32Val(dec, 8, &((val)->conference_description).length))
  1903. return 0;
  1904. if (!ASN1PERDecChar16String(dec, ((val)->conference_description).length, &((val)->conference_description).value, 16))
  1905. return 0;
  1906. }
  1907. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_locked))
  1908. return 0;
  1909. if (!ASN1PERDecBoolean(dec, &(val)->clear_password_required))
  1910. return 0;
  1911. if ((val)->o[0] & 0x20) {
  1912. if (!ASN1Dec_SetOfNetworkAddresses(dec, &(val)->descriptor_net_address))
  1913. return 0;
  1914. }
  1915. if (y) {
  1916. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  1917. return 0;
  1918. }
  1919. return 1;
  1920. }
  1921. static void ASN1CALL ASN1Free_ConferenceDescriptor(ConferenceDescriptor *val)
  1922. {
  1923. if (val) {
  1924. ASN1Free_ConferenceName(&(val)->conference_name);
  1925. if ((val)->o[0] & 0x80) {
  1926. }
  1927. if ((val)->o[0] & 0x40) {
  1928. ASN1char16string_free(&(val)->conference_description);
  1929. }
  1930. if ((val)->o[0] & 0x20) {
  1931. ASN1Free_SetOfNetworkAddresses(&(val)->descriptor_net_address);
  1932. }
  1933. }
  1934. }
  1935. static int ASN1CALL ASN1Enc_NodeRecord(ASN1encoding_t enc, NodeRecord *val)
  1936. {
  1937. if (!ASN1PEREncExtensionBitClear(enc))
  1938. return 0;
  1939. if (!ASN1PEREncBits(enc, 7, (val)->o))
  1940. return 0;
  1941. if ((val)->o[0] & 0x80) {
  1942. if (!ASN1PEREncUnsignedShort(enc, (val)->superior_node - 1001))
  1943. return 0;
  1944. }
  1945. if (!ASN1PEREncExtensionBitClear(enc))
  1946. return 0;
  1947. if (!ASN1PEREncBitVal(enc, 2, (val)->node_type))
  1948. return 0;
  1949. if (!ASN1Enc_NodeProperties(enc, &(val)->node_properties))
  1950. return 0;
  1951. if ((val)->o[0] & 0x40) {
  1952. ASN1PEREncAlignment(enc);
  1953. if (!ASN1PEREncBitVal(enc, 8, ((val)->node_name).length))
  1954. return 0;
  1955. if (!ASN1PEREncChar16String(enc, ((val)->node_name).length, ((val)->node_name).value, 16))
  1956. return 0;
  1957. }
  1958. if ((val)->o[0] & 0x20) {
  1959. if (!ASN1Enc_ParticipantsList(enc, &(val)->participants_list))
  1960. return 0;
  1961. }
  1962. if ((val)->o[0] & 0x10) {
  1963. ASN1PEREncAlignment(enc);
  1964. if (!ASN1PEREncBitVal(enc, 8, ((val)->site_information).length))
  1965. return 0;
  1966. if (!ASN1PEREncChar16String(enc, ((val)->site_information).length, ((val)->site_information).value, 16))
  1967. return 0;
  1968. }
  1969. if ((val)->o[0] & 0x8) {
  1970. if (!ASN1Enc_SetOfNetworkAddresses(enc, &(val)->record_net_address))
  1971. return 0;
  1972. }
  1973. if ((val)->o[0] & 0x4) {
  1974. if (!ASN1Enc_AlternativeNodeID(enc, &(val)->alternative_node_id))
  1975. return 0;
  1976. }
  1977. if ((val)->o[0] & 0x2) {
  1978. if (!ASN1Enc_SetOfUserData(enc, &(val)->record_user_data))
  1979. return 0;
  1980. }
  1981. return 1;
  1982. }
  1983. static int ASN1CALL ASN1Dec_NodeRecord(ASN1decoding_t dec, NodeRecord *val)
  1984. {
  1985. ASN1uint32_t y;
  1986. ASN1uint32_t x;
  1987. if (!ASN1PERDecExtensionBit(dec, &y))
  1988. return 0;
  1989. if (!ASN1PERDecExtension(dec, 7, (val)->o))
  1990. return 0;
  1991. if ((val)->o[0] & 0x80) {
  1992. if (!ASN1PERDecUnsignedShort(dec, &(val)->superior_node))
  1993. return 0;
  1994. (val)->superior_node += 1001;
  1995. }
  1996. if (!ASN1PERDecExtensionBit(dec, &x))
  1997. return 0;
  1998. if (!x) {
  1999. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->node_type))
  2000. return 0;
  2001. } else {
  2002. if (!ASN1PERDecSkipNormallySmall(dec))
  2003. return 0;
  2004. }
  2005. if (!ASN1Dec_NodeProperties(dec, &(val)->node_properties))
  2006. return 0;
  2007. if ((val)->o[0] & 0x40) {
  2008. ASN1PERDecAlignment(dec);
  2009. if (!ASN1PERDecU32Val(dec, 8, &((val)->node_name).length))
  2010. return 0;
  2011. if (!ASN1PERDecChar16String(dec, ((val)->node_name).length, &((val)->node_name).value, 16))
  2012. return 0;
  2013. }
  2014. if ((val)->o[0] & 0x20) {
  2015. if (!ASN1Dec_ParticipantsList(dec, &(val)->participants_list))
  2016. return 0;
  2017. }
  2018. if ((val)->o[0] & 0x10) {
  2019. ASN1PERDecAlignment(dec);
  2020. if (!ASN1PERDecU32Val(dec, 8, &((val)->site_information).length))
  2021. return 0;
  2022. if (!ASN1PERDecChar16String(dec, ((val)->site_information).length, &((val)->site_information).value, 16))
  2023. return 0;
  2024. }
  2025. if ((val)->o[0] & 0x8) {
  2026. if (!ASN1Dec_SetOfNetworkAddresses(dec, &(val)->record_net_address))
  2027. return 0;
  2028. }
  2029. if ((val)->o[0] & 0x4) {
  2030. if (!ASN1Dec_AlternativeNodeID(dec, &(val)->alternative_node_id))
  2031. return 0;
  2032. }
  2033. if ((val)->o[0] & 0x2) {
  2034. if (!ASN1Dec_SetOfUserData(dec, &(val)->record_user_data))
  2035. return 0;
  2036. }
  2037. if (y) {
  2038. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2039. return 0;
  2040. }
  2041. return 1;
  2042. }
  2043. static void ASN1CALL ASN1Free_NodeRecord(NodeRecord *val)
  2044. {
  2045. if (val) {
  2046. if ((val)->o[0] & 0x40) {
  2047. ASN1char16string_free(&(val)->node_name);
  2048. }
  2049. if ((val)->o[0] & 0x20) {
  2050. ASN1Free_ParticipantsList(&(val)->participants_list);
  2051. }
  2052. if ((val)->o[0] & 0x10) {
  2053. ASN1char16string_free(&(val)->site_information);
  2054. }
  2055. if ((val)->o[0] & 0x8) {
  2056. ASN1Free_SetOfNetworkAddresses(&(val)->record_net_address);
  2057. }
  2058. if ((val)->o[0] & 0x4) {
  2059. ASN1Free_AlternativeNodeID(&(val)->alternative_node_id);
  2060. }
  2061. if ((val)->o[0] & 0x2) {
  2062. ASN1Free_SetOfUserData(&(val)->record_user_data);
  2063. }
  2064. }
  2065. }
  2066. static int ASN1CALL ASN1Enc_SessionKey(ASN1encoding_t enc, SessionKey *val)
  2067. {
  2068. if (!ASN1PEREncBits(enc, 1, (val)->o))
  2069. return 0;
  2070. if (!ASN1Enc_Key(enc, &(val)->application_protocol_key))
  2071. return 0;
  2072. if ((val)->o[0] & 0x80) {
  2073. if (!ASN1PEREncUnsignedShort(enc, (val)->session_id - 1))
  2074. return 0;
  2075. }
  2076. return 1;
  2077. }
  2078. static int ASN1CALL ASN1Dec_SessionKey(ASN1decoding_t dec, SessionKey *val)
  2079. {
  2080. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  2081. return 0;
  2082. if (!ASN1Dec_Key(dec, &(val)->application_protocol_key))
  2083. return 0;
  2084. if ((val)->o[0] & 0x80) {
  2085. if (!ASN1PERDecUnsignedShort(dec, &(val)->session_id))
  2086. return 0;
  2087. (val)->session_id += 1;
  2088. }
  2089. return 1;
  2090. }
  2091. static void ASN1CALL ASN1Free_SessionKey(SessionKey *val)
  2092. {
  2093. if (val) {
  2094. ASN1Free_Key(&(val)->application_protocol_key);
  2095. }
  2096. }
  2097. static int ASN1CALL ASN1Enc_ApplicationRecord(ASN1encoding_t enc, ApplicationRecord *val)
  2098. {
  2099. if (!ASN1PEREncExtensionBitClear(enc))
  2100. return 0;
  2101. if (!ASN1PEREncBits(enc, 3, (val)->o))
  2102. return 0;
  2103. if (!ASN1PEREncBoolean(enc, (val)->application_is_active))
  2104. return 0;
  2105. if (!ASN1PEREncBoolean(enc, (val)->is_conducting_capable))
  2106. return 0;
  2107. if ((val)->o[0] & 0x80) {
  2108. if (!ASN1PEREncBitVal(enc, 2, (val)->record_startup_channel))
  2109. return 0;
  2110. }
  2111. if ((val)->o[0] & 0x40) {
  2112. if (!ASN1PEREncUnsignedShort(enc, (val)->application_user_id - 1001))
  2113. return 0;
  2114. }
  2115. if ((val)->o[0] & 0x20) {
  2116. if (!ASN1Enc_SetOfNonCollapsingCapabilities(enc, &(val)->non_collapsing_capabilities))
  2117. return 0;
  2118. }
  2119. return 1;
  2120. }
  2121. static int ASN1CALL ASN1Dec_ApplicationRecord(ASN1decoding_t dec, ApplicationRecord *val)
  2122. {
  2123. ASN1uint32_t y;
  2124. if (!ASN1PERDecExtensionBit(dec, &y))
  2125. return 0;
  2126. if (!ASN1PERDecExtension(dec, 3, (val)->o))
  2127. return 0;
  2128. if (!ASN1PERDecBoolean(dec, &(val)->application_is_active))
  2129. return 0;
  2130. if (!ASN1PERDecBoolean(dec, &(val)->is_conducting_capable))
  2131. return 0;
  2132. if ((val)->o[0] & 0x80) {
  2133. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->record_startup_channel))
  2134. return 0;
  2135. }
  2136. if ((val)->o[0] & 0x40) {
  2137. if (!ASN1PERDecUnsignedShort(dec, &(val)->application_user_id))
  2138. return 0;
  2139. (val)->application_user_id += 1001;
  2140. }
  2141. if ((val)->o[0] & 0x20) {
  2142. if (!ASN1Dec_SetOfNonCollapsingCapabilities(dec, &(val)->non_collapsing_capabilities))
  2143. return 0;
  2144. }
  2145. if (y) {
  2146. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2147. return 0;
  2148. }
  2149. return 1;
  2150. }
  2151. static void ASN1CALL ASN1Free_ApplicationRecord(ApplicationRecord *val)
  2152. {
  2153. if (val) {
  2154. if ((val)->o[0] & 0x20) {
  2155. ASN1Free_SetOfNonCollapsingCapabilities(&(val)->non_collapsing_capabilities);
  2156. }
  2157. }
  2158. }
  2159. static int ASN1CALL ASN1Enc_CapabilityID(ASN1encoding_t enc, CapabilityID *val)
  2160. {
  2161. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2162. return 0;
  2163. switch ((val)->choice) {
  2164. case 1:
  2165. if (!ASN1PEREncUnsignedShort(enc, (val)->u.standard))
  2166. return 0;
  2167. break;
  2168. case 2:
  2169. if (!ASN1Enc_Key(enc, &(val)->u.capability_non_standard))
  2170. return 0;
  2171. break;
  2172. default:
  2173. /* impossible */
  2174. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2175. return 0;
  2176. }
  2177. return 1;
  2178. }
  2179. static int ASN1CALL ASN1Dec_CapabilityID(ASN1decoding_t dec, CapabilityID *val)
  2180. {
  2181. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2182. return 0;
  2183. switch ((val)->choice) {
  2184. case 1:
  2185. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.standard))
  2186. return 0;
  2187. break;
  2188. case 2:
  2189. if (!ASN1Dec_Key(dec, &(val)->u.capability_non_standard))
  2190. return 0;
  2191. break;
  2192. default:
  2193. /* impossible */
  2194. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2195. return 0;
  2196. }
  2197. return 1;
  2198. }
  2199. static void ASN1CALL ASN1Free_CapabilityID(CapabilityID *val)
  2200. {
  2201. if (val) {
  2202. switch ((val)->choice) {
  2203. case 2:
  2204. ASN1Free_Key(&(val)->u.capability_non_standard);
  2205. break;
  2206. }
  2207. }
  2208. }
  2209. static int ASN1CALL ASN1Enc_CapabilityClass(ASN1encoding_t enc, CapabilityClass *val)
  2210. {
  2211. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2212. return 0;
  2213. switch ((val)->choice) {
  2214. case 1:
  2215. break;
  2216. case 2:
  2217. if (!ASN1PEREncUnsignedInteger(enc, (val)->u.unsigned_minimum))
  2218. return 0;
  2219. break;
  2220. case 3:
  2221. if (!ASN1PEREncUnsignedInteger(enc, (val)->u.unsigned_maximum))
  2222. return 0;
  2223. break;
  2224. default:
  2225. /* impossible */
  2226. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2227. return 0;
  2228. }
  2229. return 1;
  2230. }
  2231. static int ASN1CALL ASN1Dec_CapabilityClass(ASN1decoding_t dec, CapabilityClass *val)
  2232. {
  2233. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2234. return 0;
  2235. switch ((val)->choice) {
  2236. case 1:
  2237. break;
  2238. case 2:
  2239. if (!ASN1PERDecUnsignedInteger(dec, &(val)->u.unsigned_minimum))
  2240. return 0;
  2241. break;
  2242. case 3:
  2243. if (!ASN1PERDecUnsignedInteger(dec, &(val)->u.unsigned_maximum))
  2244. return 0;
  2245. break;
  2246. case 0:
  2247. /* extension case */
  2248. if (!ASN1PERDecSkipFragmented(dec, 8))
  2249. return 0;
  2250. break;
  2251. default:
  2252. /* impossible */
  2253. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2254. return 0;
  2255. }
  2256. return 1;
  2257. }
  2258. static int ASN1CALL ASN1Enc_ApplicationInvokeSpecifier(ASN1encoding_t enc, ApplicationInvokeSpecifier *val)
  2259. {
  2260. if (!ASN1PEREncExtensionBitClear(enc))
  2261. return 0;
  2262. if (!ASN1PEREncBits(enc, 2, (val)->o))
  2263. return 0;
  2264. if (!ASN1Enc_SessionKey(enc, &(val)->session_key))
  2265. return 0;
  2266. if ((val)->o[0] & 0x80) {
  2267. if (!ASN1Enc_SetOfExpectedCapabilities(enc, &(val)->expected_capability_set))
  2268. return 0;
  2269. }
  2270. if ((val)->o[0] & 0x40) {
  2271. if (!ASN1PEREncBitVal(enc, 2, (val)->invoke_startup_channel))
  2272. return 0;
  2273. }
  2274. if (!ASN1PEREncBoolean(enc, (val)->invoke_is_mandatory))
  2275. return 0;
  2276. return 1;
  2277. }
  2278. static int ASN1CALL ASN1Dec_ApplicationInvokeSpecifier(ASN1decoding_t dec, ApplicationInvokeSpecifier *val)
  2279. {
  2280. ASN1uint32_t y;
  2281. if (!ASN1PERDecExtensionBit(dec, &y))
  2282. return 0;
  2283. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  2284. return 0;
  2285. if (!ASN1Dec_SessionKey(dec, &(val)->session_key))
  2286. return 0;
  2287. if ((val)->o[0] & 0x80) {
  2288. if (!ASN1Dec_SetOfExpectedCapabilities(dec, &(val)->expected_capability_set))
  2289. return 0;
  2290. }
  2291. if ((val)->o[0] & 0x40) {
  2292. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->invoke_startup_channel))
  2293. return 0;
  2294. }
  2295. if (!ASN1PERDecBoolean(dec, &(val)->invoke_is_mandatory))
  2296. return 0;
  2297. if (y) {
  2298. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2299. return 0;
  2300. }
  2301. return 1;
  2302. }
  2303. static void ASN1CALL ASN1Free_ApplicationInvokeSpecifier(ApplicationInvokeSpecifier *val)
  2304. {
  2305. if (val) {
  2306. ASN1Free_SessionKey(&(val)->session_key);
  2307. if ((val)->o[0] & 0x80) {
  2308. ASN1Free_SetOfExpectedCapabilities(&(val)->expected_capability_set);
  2309. }
  2310. }
  2311. }
  2312. static int ASN1CALL ASN1Enc_RegistryKey(ASN1encoding_t enc, RegistryKey *val)
  2313. {
  2314. if (!ASN1Enc_SessionKey(enc, &(val)->session_key))
  2315. return 0;
  2316. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->resource_id, 0, 64, 7))
  2317. return 0;
  2318. return 1;
  2319. }
  2320. static int ASN1CALL ASN1Dec_RegistryKey(ASN1decoding_t dec, RegistryKey *val)
  2321. {
  2322. if (!ASN1Dec_SessionKey(dec, &(val)->session_key))
  2323. return 0;
  2324. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->resource_id, 0, 64, 7))
  2325. return 0;
  2326. return 1;
  2327. }
  2328. static void ASN1CALL ASN1Free_RegistryKey(RegistryKey *val)
  2329. {
  2330. if (val) {
  2331. ASN1Free_SessionKey(&(val)->session_key);
  2332. }
  2333. }
  2334. static int ASN1CALL ASN1Enc_RegistryItem(ASN1encoding_t enc, RegistryItem *val)
  2335. {
  2336. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  2337. return 0;
  2338. switch ((val)->choice) {
  2339. case 1:
  2340. if (!ASN1PEREncUnsignedShort(enc, (val)->u.channel_id - 1001))
  2341. return 0;
  2342. break;
  2343. case 2:
  2344. if (!ASN1PEREncUnsignedShort(enc, (val)->u.token_id - 16384))
  2345. return 0;
  2346. break;
  2347. case 3:
  2348. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->u.parameter, 0, 64, 7))
  2349. return 0;
  2350. break;
  2351. case 4:
  2352. break;
  2353. default:
  2354. /* impossible */
  2355. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2356. return 0;
  2357. }
  2358. return 1;
  2359. }
  2360. static int ASN1CALL ASN1Dec_RegistryItem(ASN1decoding_t dec, RegistryItem *val)
  2361. {
  2362. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  2363. return 0;
  2364. switch ((val)->choice) {
  2365. case 1:
  2366. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.channel_id))
  2367. return 0;
  2368. (val)->u.channel_id += 1001;
  2369. break;
  2370. case 2:
  2371. if (!ASN1PERDecUnsignedShort(dec, &(val)->u.token_id))
  2372. return 0;
  2373. (val)->u.token_id += 16384;
  2374. break;
  2375. case 3:
  2376. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->u.parameter, 0, 64, 7))
  2377. return 0;
  2378. break;
  2379. case 4:
  2380. break;
  2381. case 0:
  2382. /* extension case */
  2383. if (!ASN1PERDecSkipFragmented(dec, 8))
  2384. return 0;
  2385. break;
  2386. default:
  2387. /* impossible */
  2388. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2389. return 0;
  2390. }
  2391. return 1;
  2392. }
  2393. static void ASN1CALL ASN1Free_RegistryItem(RegistryItem *val)
  2394. {
  2395. if (val) {
  2396. switch ((val)->choice) {
  2397. case 3:
  2398. break;
  2399. }
  2400. }
  2401. }
  2402. static int ASN1CALL ASN1Enc_RegistryEntryOwner(ASN1encoding_t enc, RegistryEntryOwner *val)
  2403. {
  2404. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 1))
  2405. return 0;
  2406. switch ((val)->choice) {
  2407. case 1:
  2408. if (!ASN1Enc_RegistryEntryOwnerOwned(enc, &(val)->u.owned))
  2409. return 0;
  2410. break;
  2411. case 2:
  2412. break;
  2413. default:
  2414. /* impossible */
  2415. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  2416. return 0;
  2417. }
  2418. return 1;
  2419. }
  2420. static int ASN1CALL ASN1Dec_RegistryEntryOwner(ASN1decoding_t dec, RegistryEntryOwner *val)
  2421. {
  2422. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 1))
  2423. return 0;
  2424. switch ((val)->choice) {
  2425. case 1:
  2426. if (!ASN1Dec_RegistryEntryOwnerOwned(dec, &(val)->u.owned))
  2427. return 0;
  2428. break;
  2429. case 2:
  2430. break;
  2431. default:
  2432. /* impossible */
  2433. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  2434. return 0;
  2435. }
  2436. return 1;
  2437. }
  2438. static int ASN1CALL ASN1Enc_UserIDIndication(ASN1encoding_t enc, UserIDIndication *val)
  2439. {
  2440. if (!ASN1PEREncExtensionBitClear(enc))
  2441. return 0;
  2442. #ifndef _WIN64
  2443. if (!ASN1PEREncInteger(enc, (val)->tag))
  2444. return 0;
  2445. #endif
  2446. return 1;
  2447. }
  2448. static int ASN1CALL ASN1Dec_UserIDIndication(ASN1decoding_t dec, UserIDIndication *val)
  2449. {
  2450. ASN1uint32_t y;
  2451. if (!ASN1PERDecExtensionBit(dec, &y))
  2452. return 0;
  2453. #ifndef _WIN64
  2454. if (!ASN1PERDecInteger(dec, &(val)->tag))
  2455. return 0;
  2456. #endif
  2457. if (y) {
  2458. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2459. return 0;
  2460. }
  2461. return 1;
  2462. }
  2463. static int ASN1CALL ASN1Enc_SetOfPrivileges(ASN1encoding_t enc, PSetOfPrivileges *val)
  2464. {
  2465. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfPrivileges_ElmFn);
  2466. }
  2467. static int ASN1CALL ASN1Enc_SetOfPrivileges_ElmFn(ASN1encoding_t enc, PSetOfPrivileges val)
  2468. {
  2469. if (!ASN1PEREncExtensionBitClear(enc))
  2470. return 0;
  2471. if (!ASN1PEREncBitVal(enc, 3, val->value))
  2472. return 0;
  2473. return 1;
  2474. }
  2475. static int ASN1CALL ASN1Dec_SetOfPrivileges(ASN1decoding_t dec, PSetOfPrivileges *val)
  2476. {
  2477. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfPrivileges_ElmFn, sizeof(**val));
  2478. }
  2479. static int ASN1CALL ASN1Dec_SetOfPrivileges_ElmFn(ASN1decoding_t dec, PSetOfPrivileges val)
  2480. {
  2481. ASN1uint32_t x;
  2482. if (!ASN1PERDecExtensionBit(dec, &x))
  2483. return 0;
  2484. if (!x) {
  2485. if (!ASN1PERDecU32Val(dec, 3, (ASN1uint32_t *) &val->value))
  2486. return 0;
  2487. } else {
  2488. if (!ASN1PERDecSkipNormallySmall(dec))
  2489. return 0;
  2490. }
  2491. return 1;
  2492. }
  2493. static void ASN1CALL ASN1Free_SetOfPrivileges(PSetOfPrivileges *val)
  2494. {
  2495. if (val) {
  2496. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfPrivileges_ElmFn);
  2497. }
  2498. }
  2499. static void ASN1CALL ASN1Free_SetOfPrivileges_ElmFn(PSetOfPrivileges val)
  2500. {
  2501. if (val) {
  2502. }
  2503. }
  2504. static int ASN1CALL ASN1Enc_ConferenceCreateRequest(ASN1encoding_t enc, ConferenceCreateRequest *val)
  2505. {
  2506. if (!ASN1PEREncExtensionBitClear(enc))
  2507. return 0;
  2508. if (!ASN1PEREncBits(enc, 8, (val)->o))
  2509. return 0;
  2510. if (!ASN1Enc_ConferenceName(enc, &(val)->conference_name))
  2511. return 0;
  2512. if ((val)->o[0] & 0x80) {
  2513. if (!ASN1Enc_Password(enc, &(val)->ccrq_convener_password))
  2514. return 0;
  2515. }
  2516. if ((val)->o[0] & 0x40) {
  2517. if (!ASN1Enc_Password(enc, &(val)->ccrq_password))
  2518. return 0;
  2519. }
  2520. if (!ASN1PEREncBoolean(enc, (val)->conference_is_locked))
  2521. return 0;
  2522. if (!ASN1PEREncBoolean(enc, (val)->conference_is_listed))
  2523. return 0;
  2524. if (!ASN1PEREncBoolean(enc, (val)->conference_is_conductible))
  2525. return 0;
  2526. if (!ASN1PEREncExtensionBitClear(enc))
  2527. return 0;
  2528. if (!ASN1PEREncBitVal(enc, 1, (val)->termination_method))
  2529. return 0;
  2530. if ((val)->o[0] & 0x20) {
  2531. if (!ASN1Enc_SetOfPrivileges(enc, &(val)->ccrq_conductor_privs))
  2532. return 0;
  2533. }
  2534. if ((val)->o[0] & 0x10) {
  2535. if (!ASN1Enc_SetOfPrivileges(enc, &(val)->ccrq_conducted_privs))
  2536. return 0;
  2537. }
  2538. if ((val)->o[0] & 0x8) {
  2539. if (!ASN1Enc_SetOfPrivileges(enc, &(val)->ccrq_non_conducted_privs))
  2540. return 0;
  2541. }
  2542. if ((val)->o[0] & 0x4) {
  2543. ASN1PEREncAlignment(enc);
  2544. if (!ASN1PEREncBitVal(enc, 8, ((val)->ccrq_description).length))
  2545. return 0;
  2546. if (!ASN1PEREncChar16String(enc, ((val)->ccrq_description).length, ((val)->ccrq_description).value, 16))
  2547. return 0;
  2548. }
  2549. if ((val)->o[0] & 0x2) {
  2550. ASN1PEREncAlignment(enc);
  2551. if (!ASN1PEREncBitVal(enc, 8, ((val)->ccrq_caller_id).length))
  2552. return 0;
  2553. if (!ASN1PEREncChar16String(enc, ((val)->ccrq_caller_id).length, ((val)->ccrq_caller_id).value, 16))
  2554. return 0;
  2555. }
  2556. if ((val)->o[0] & 0x1) {
  2557. if (!ASN1Enc_SetOfUserData(enc, &(val)->ccrq_user_data))
  2558. return 0;
  2559. }
  2560. return 1;
  2561. }
  2562. static int ASN1CALL ASN1Dec_ConferenceCreateRequest(ASN1decoding_t dec, ConferenceCreateRequest *val)
  2563. {
  2564. ASN1uint32_t y;
  2565. ASN1uint32_t x;
  2566. if (!ASN1PERDecExtensionBit(dec, &y))
  2567. return 0;
  2568. if (!ASN1PERDecExtension(dec, 8, (val)->o))
  2569. return 0;
  2570. if (!ASN1Dec_ConferenceName(dec, &(val)->conference_name))
  2571. return 0;
  2572. if ((val)->o[0] & 0x80) {
  2573. if (!ASN1Dec_Password(dec, &(val)->ccrq_convener_password))
  2574. return 0;
  2575. }
  2576. if ((val)->o[0] & 0x40) {
  2577. if (!ASN1Dec_Password(dec, &(val)->ccrq_password))
  2578. return 0;
  2579. }
  2580. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_locked))
  2581. return 0;
  2582. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_listed))
  2583. return 0;
  2584. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_conductible))
  2585. return 0;
  2586. if (!ASN1PERDecExtensionBit(dec, &x))
  2587. return 0;
  2588. if (!x) {
  2589. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->termination_method))
  2590. return 0;
  2591. } else {
  2592. if (!ASN1PERDecSkipNormallySmall(dec))
  2593. return 0;
  2594. }
  2595. if ((val)->o[0] & 0x20) {
  2596. if (!ASN1Dec_SetOfPrivileges(dec, &(val)->ccrq_conductor_privs))
  2597. return 0;
  2598. }
  2599. if ((val)->o[0] & 0x10) {
  2600. if (!ASN1Dec_SetOfPrivileges(dec, &(val)->ccrq_conducted_privs))
  2601. return 0;
  2602. }
  2603. if ((val)->o[0] & 0x8) {
  2604. if (!ASN1Dec_SetOfPrivileges(dec, &(val)->ccrq_non_conducted_privs))
  2605. return 0;
  2606. }
  2607. if ((val)->o[0] & 0x4) {
  2608. ASN1PERDecAlignment(dec);
  2609. if (!ASN1PERDecU32Val(dec, 8, &((val)->ccrq_description).length))
  2610. return 0;
  2611. if (!ASN1PERDecChar16String(dec, ((val)->ccrq_description).length, &((val)->ccrq_description).value, 16))
  2612. return 0;
  2613. }
  2614. if ((val)->o[0] & 0x2) {
  2615. ASN1PERDecAlignment(dec);
  2616. if (!ASN1PERDecU32Val(dec, 8, &((val)->ccrq_caller_id).length))
  2617. return 0;
  2618. if (!ASN1PERDecChar16String(dec, ((val)->ccrq_caller_id).length, &((val)->ccrq_caller_id).value, 16))
  2619. return 0;
  2620. }
  2621. if ((val)->o[0] & 0x1) {
  2622. if (!ASN1Dec_SetOfUserData(dec, &(val)->ccrq_user_data))
  2623. return 0;
  2624. }
  2625. if (y) {
  2626. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2627. return 0;
  2628. }
  2629. return 1;
  2630. }
  2631. static void ASN1CALL ASN1Free_ConferenceCreateRequest(ConferenceCreateRequest *val)
  2632. {
  2633. if (val) {
  2634. ASN1Free_ConferenceName(&(val)->conference_name);
  2635. if ((val)->o[0] & 0x80) {
  2636. ASN1Free_Password(&(val)->ccrq_convener_password);
  2637. }
  2638. if ((val)->o[0] & 0x40) {
  2639. ASN1Free_Password(&(val)->ccrq_password);
  2640. }
  2641. if ((val)->o[0] & 0x20) {
  2642. ASN1Free_SetOfPrivileges(&(val)->ccrq_conductor_privs);
  2643. }
  2644. if ((val)->o[0] & 0x10) {
  2645. ASN1Free_SetOfPrivileges(&(val)->ccrq_conducted_privs);
  2646. }
  2647. if ((val)->o[0] & 0x8) {
  2648. ASN1Free_SetOfPrivileges(&(val)->ccrq_non_conducted_privs);
  2649. }
  2650. if ((val)->o[0] & 0x4) {
  2651. ASN1char16string_free(&(val)->ccrq_description);
  2652. }
  2653. if ((val)->o[0] & 0x2) {
  2654. ASN1char16string_free(&(val)->ccrq_caller_id);
  2655. }
  2656. if ((val)->o[0] & 0x1) {
  2657. ASN1Free_SetOfUserData(&(val)->ccrq_user_data);
  2658. }
  2659. }
  2660. }
  2661. static int ASN1CALL ASN1Enc_ConferenceCreateResponse(ASN1encoding_t enc, ConferenceCreateResponse *val)
  2662. {
  2663. if (!ASN1PEREncExtensionBitClear(enc))
  2664. return 0;
  2665. if (!ASN1PEREncBits(enc, 1, (val)->o))
  2666. return 0;
  2667. if (!ASN1PEREncUnsignedShort(enc, (val)->node_id - 1001))
  2668. return 0;
  2669. #ifndef _WIN64
  2670. if (!ASN1PEREncInteger(enc, (val)->tag))
  2671. return 0;
  2672. #endif
  2673. if (!ASN1PEREncExtensionBitClear(enc))
  2674. return 0;
  2675. if (!ASN1PEREncBitVal(enc, 3, (val)->result))
  2676. return 0;
  2677. if ((val)->o[0] & 0x80) {
  2678. if (!ASN1Enc_SetOfUserData(enc, &(val)->ccrs_user_data))
  2679. return 0;
  2680. }
  2681. return 1;
  2682. }
  2683. static int ASN1CALL ASN1Dec_ConferenceCreateResponse(ASN1decoding_t dec, ConferenceCreateResponse *val)
  2684. {
  2685. ASN1uint32_t y;
  2686. ASN1uint32_t x;
  2687. if (!ASN1PERDecExtensionBit(dec, &y))
  2688. return 0;
  2689. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  2690. return 0;
  2691. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_id))
  2692. return 0;
  2693. (val)->node_id += 1001;
  2694. #ifndef _WIN64
  2695. if (!ASN1PERDecInteger(dec, &(val)->tag))
  2696. return 0;
  2697. #endif
  2698. if (!ASN1PERDecExtensionBit(dec, &x))
  2699. return 0;
  2700. if (!x) {
  2701. if (!ASN1PERDecU32Val(dec, 3, (ASN1uint32_t *) &(val)->result))
  2702. return 0;
  2703. } else {
  2704. if (!ASN1PERDecSkipNormallySmall(dec))
  2705. return 0;
  2706. }
  2707. if ((val)->o[0] & 0x80) {
  2708. if (!ASN1Dec_SetOfUserData(dec, &(val)->ccrs_user_data))
  2709. return 0;
  2710. }
  2711. if (y) {
  2712. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2713. return 0;
  2714. }
  2715. return 1;
  2716. }
  2717. static void ASN1CALL ASN1Free_ConferenceCreateResponse(ConferenceCreateResponse *val)
  2718. {
  2719. if (val) {
  2720. if ((val)->o[0] & 0x80) {
  2721. ASN1Free_SetOfUserData(&(val)->ccrs_user_data);
  2722. }
  2723. }
  2724. }
  2725. static int ASN1CALL ASN1Enc_ConferenceQueryRequest(ASN1encoding_t enc, ConferenceQueryRequest *val)
  2726. {
  2727. if (!ASN1PEREncExtensionBitClear(enc))
  2728. return 0;
  2729. if (!ASN1PEREncBits(enc, 2, (val)->o))
  2730. return 0;
  2731. if (!ASN1PEREncExtensionBitClear(enc))
  2732. return 0;
  2733. if (!ASN1PEREncBitVal(enc, 2, (val)->node_type))
  2734. return 0;
  2735. if ((val)->o[0] & 0x80) {
  2736. if (!ASN1Enc_AsymmetryIndicator(enc, &(val)->cqrq_asymmetry_indicator))
  2737. return 0;
  2738. }
  2739. if ((val)->o[0] & 0x40) {
  2740. if (!ASN1Enc_SetOfUserData(enc, &(val)->cqrq_user_data))
  2741. return 0;
  2742. }
  2743. return 1;
  2744. }
  2745. static int ASN1CALL ASN1Dec_ConferenceQueryRequest(ASN1decoding_t dec, ConferenceQueryRequest *val)
  2746. {
  2747. ASN1uint32_t y;
  2748. ASN1uint32_t x;
  2749. if (!ASN1PERDecExtensionBit(dec, &y))
  2750. return 0;
  2751. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  2752. return 0;
  2753. if (!ASN1PERDecExtensionBit(dec, &x))
  2754. return 0;
  2755. if (!x) {
  2756. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->node_type))
  2757. return 0;
  2758. } else {
  2759. if (!ASN1PERDecSkipNormallySmall(dec))
  2760. return 0;
  2761. }
  2762. if ((val)->o[0] & 0x80) {
  2763. if (!ASN1Dec_AsymmetryIndicator(dec, &(val)->cqrq_asymmetry_indicator))
  2764. return 0;
  2765. }
  2766. if ((val)->o[0] & 0x40) {
  2767. if (!ASN1Dec_SetOfUserData(dec, &(val)->cqrq_user_data))
  2768. return 0;
  2769. }
  2770. if (y) {
  2771. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2772. return 0;
  2773. }
  2774. return 1;
  2775. }
  2776. static void ASN1CALL ASN1Free_ConferenceQueryRequest(ConferenceQueryRequest *val)
  2777. {
  2778. if (val) {
  2779. if ((val)->o[0] & 0x40) {
  2780. ASN1Free_SetOfUserData(&(val)->cqrq_user_data);
  2781. }
  2782. }
  2783. }
  2784. static int ASN1CALL ASN1Enc_ConferenceQueryResponse(ASN1encoding_t enc, ConferenceQueryResponse *val)
  2785. {
  2786. if (!ASN1PEREncExtensionBitClear(enc))
  2787. return 0;
  2788. if (!ASN1PEREncBits(enc, 2, (val)->o))
  2789. return 0;
  2790. if (!ASN1PEREncExtensionBitClear(enc))
  2791. return 0;
  2792. if (!ASN1PEREncBitVal(enc, 2, (val)->node_type))
  2793. return 0;
  2794. if ((val)->o[0] & 0x80) {
  2795. if (!ASN1Enc_AsymmetryIndicator(enc, &(val)->cqrs_asymmetry_indicator))
  2796. return 0;
  2797. }
  2798. if (!ASN1Enc_SetOfConferenceDescriptors(enc, &(val)->conference_list))
  2799. return 0;
  2800. if (!ASN1PEREncExtensionBitClear(enc))
  2801. return 0;
  2802. if (!ASN1PEREncBitVal(enc, 1, (val)->result))
  2803. return 0;
  2804. if ((val)->o[0] & 0x40) {
  2805. if (!ASN1Enc_SetOfUserData(enc, &(val)->cqrs_user_data))
  2806. return 0;
  2807. }
  2808. return 1;
  2809. }
  2810. static int ASN1CALL ASN1Dec_ConferenceQueryResponse(ASN1decoding_t dec, ConferenceQueryResponse *val)
  2811. {
  2812. ASN1uint32_t y;
  2813. ASN1uint32_t x;
  2814. if (!ASN1PERDecExtensionBit(dec, &y))
  2815. return 0;
  2816. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  2817. return 0;
  2818. if (!ASN1PERDecExtensionBit(dec, &x))
  2819. return 0;
  2820. if (!x) {
  2821. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->node_type))
  2822. return 0;
  2823. } else {
  2824. if (!ASN1PERDecSkipNormallySmall(dec))
  2825. return 0;
  2826. }
  2827. if ((val)->o[0] & 0x80) {
  2828. if (!ASN1Dec_AsymmetryIndicator(dec, &(val)->cqrs_asymmetry_indicator))
  2829. return 0;
  2830. }
  2831. if (!ASN1Dec_SetOfConferenceDescriptors(dec, &(val)->conference_list))
  2832. return 0;
  2833. if (!ASN1PERDecExtensionBit(dec, &x))
  2834. return 0;
  2835. if (!x) {
  2836. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->result))
  2837. return 0;
  2838. } else {
  2839. if (!ASN1PERDecSkipNormallySmall(dec))
  2840. return 0;
  2841. }
  2842. if ((val)->o[0] & 0x40) {
  2843. if (!ASN1Dec_SetOfUserData(dec, &(val)->cqrs_user_data))
  2844. return 0;
  2845. }
  2846. if (y) {
  2847. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2848. return 0;
  2849. }
  2850. return 1;
  2851. }
  2852. static void ASN1CALL ASN1Free_ConferenceQueryResponse(ConferenceQueryResponse *val)
  2853. {
  2854. if (val) {
  2855. ASN1Free_SetOfConferenceDescriptors(&(val)->conference_list);
  2856. if ((val)->o[0] & 0x40) {
  2857. ASN1Free_SetOfUserData(&(val)->cqrs_user_data);
  2858. }
  2859. }
  2860. }
  2861. static int ASN1CALL ASN1Enc_ConferenceInviteRequest(ASN1encoding_t enc, ConferenceInviteRequest *val)
  2862. {
  2863. if (!ASN1PEREncExtensionBitClear(enc))
  2864. return 0;
  2865. if (!ASN1PEREncBits(enc, 6, (val)->o))
  2866. return 0;
  2867. if (!ASN1Enc_ConferenceName(enc, &(val)->conference_name))
  2868. return 0;
  2869. if (!ASN1PEREncUnsignedShort(enc, (val)->node_id - 1001))
  2870. return 0;
  2871. if (!ASN1PEREncUnsignedShort(enc, (val)->top_node_id - 1001))
  2872. return 0;
  2873. #ifndef _WIN64
  2874. if (!ASN1PEREncInteger(enc, (val)->tag))
  2875. return 0;
  2876. #endif
  2877. if (!ASN1PEREncBoolean(enc, (val)->clear_password_required))
  2878. return 0;
  2879. if (!ASN1PEREncBoolean(enc, (val)->conference_is_locked))
  2880. return 0;
  2881. if (!ASN1PEREncBoolean(enc, (val)->conference_is_listed))
  2882. return 0;
  2883. if (!ASN1PEREncBoolean(enc, (val)->conference_is_conductible))
  2884. return 0;
  2885. if (!ASN1PEREncExtensionBitClear(enc))
  2886. return 0;
  2887. if (!ASN1PEREncBitVal(enc, 1, (val)->termination_method))
  2888. return 0;
  2889. if ((val)->o[0] & 0x80) {
  2890. if (!ASN1Enc_SetOfPrivileges(enc, &(val)->cirq_conductor_privs))
  2891. return 0;
  2892. }
  2893. if ((val)->o[0] & 0x40) {
  2894. if (!ASN1Enc_SetOfPrivileges(enc, &(val)->cirq_conducted_privs))
  2895. return 0;
  2896. }
  2897. if ((val)->o[0] & 0x20) {
  2898. if (!ASN1Enc_SetOfPrivileges(enc, &(val)->cirq_non_conducted_privs))
  2899. return 0;
  2900. }
  2901. if ((val)->o[0] & 0x10) {
  2902. ASN1PEREncAlignment(enc);
  2903. if (!ASN1PEREncBitVal(enc, 8, ((val)->cirq_description).length))
  2904. return 0;
  2905. if (!ASN1PEREncChar16String(enc, ((val)->cirq_description).length, ((val)->cirq_description).value, 16))
  2906. return 0;
  2907. }
  2908. if ((val)->o[0] & 0x8) {
  2909. ASN1PEREncAlignment(enc);
  2910. if (!ASN1PEREncBitVal(enc, 8, ((val)->cirq_caller_id).length))
  2911. return 0;
  2912. if (!ASN1PEREncChar16String(enc, ((val)->cirq_caller_id).length, ((val)->cirq_caller_id).value, 16))
  2913. return 0;
  2914. }
  2915. if ((val)->o[0] & 0x4) {
  2916. if (!ASN1Enc_SetOfUserData(enc, &(val)->cirq_user_data))
  2917. return 0;
  2918. }
  2919. return 1;
  2920. }
  2921. static int ASN1CALL ASN1Dec_ConferenceInviteRequest(ASN1decoding_t dec, ConferenceInviteRequest *val)
  2922. {
  2923. ASN1uint32_t y;
  2924. ASN1uint32_t x;
  2925. if (!ASN1PERDecExtensionBit(dec, &y))
  2926. return 0;
  2927. if (!ASN1PERDecExtension(dec, 6, (val)->o))
  2928. return 0;
  2929. if (!ASN1Dec_ConferenceName(dec, &(val)->conference_name))
  2930. return 0;
  2931. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_id))
  2932. return 0;
  2933. (val)->node_id += 1001;
  2934. if (!ASN1PERDecUnsignedShort(dec, &(val)->top_node_id))
  2935. return 0;
  2936. (val)->top_node_id += 1001;
  2937. #ifndef _WIN64
  2938. if (!ASN1PERDecInteger(dec, &(val)->tag))
  2939. return 0;
  2940. #endif
  2941. if (!ASN1PERDecBoolean(dec, &(val)->clear_password_required))
  2942. return 0;
  2943. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_locked))
  2944. return 0;
  2945. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_listed))
  2946. return 0;
  2947. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_conductible))
  2948. return 0;
  2949. if (!ASN1PERDecExtensionBit(dec, &x))
  2950. return 0;
  2951. if (!x) {
  2952. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->termination_method))
  2953. return 0;
  2954. } else {
  2955. if (!ASN1PERDecSkipNormallySmall(dec))
  2956. return 0;
  2957. }
  2958. if ((val)->o[0] & 0x80) {
  2959. if (!ASN1Dec_SetOfPrivileges(dec, &(val)->cirq_conductor_privs))
  2960. return 0;
  2961. }
  2962. if ((val)->o[0] & 0x40) {
  2963. if (!ASN1Dec_SetOfPrivileges(dec, &(val)->cirq_conducted_privs))
  2964. return 0;
  2965. }
  2966. if ((val)->o[0] & 0x20) {
  2967. if (!ASN1Dec_SetOfPrivileges(dec, &(val)->cirq_non_conducted_privs))
  2968. return 0;
  2969. }
  2970. if ((val)->o[0] & 0x10) {
  2971. ASN1PERDecAlignment(dec);
  2972. if (!ASN1PERDecU32Val(dec, 8, &((val)->cirq_description).length))
  2973. return 0;
  2974. if (!ASN1PERDecChar16String(dec, ((val)->cirq_description).length, &((val)->cirq_description).value, 16))
  2975. return 0;
  2976. }
  2977. if ((val)->o[0] & 0x8) {
  2978. ASN1PERDecAlignment(dec);
  2979. if (!ASN1PERDecU32Val(dec, 8, &((val)->cirq_caller_id).length))
  2980. return 0;
  2981. if (!ASN1PERDecChar16String(dec, ((val)->cirq_caller_id).length, &((val)->cirq_caller_id).value, 16))
  2982. return 0;
  2983. }
  2984. if ((val)->o[0] & 0x4) {
  2985. if (!ASN1Dec_SetOfUserData(dec, &(val)->cirq_user_data))
  2986. return 0;
  2987. }
  2988. if (y) {
  2989. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  2990. return 0;
  2991. }
  2992. return 1;
  2993. }
  2994. static void ASN1CALL ASN1Free_ConferenceInviteRequest(ConferenceInviteRequest *val)
  2995. {
  2996. if (val) {
  2997. ASN1Free_ConferenceName(&(val)->conference_name);
  2998. if ((val)->o[0] & 0x80) {
  2999. ASN1Free_SetOfPrivileges(&(val)->cirq_conductor_privs);
  3000. }
  3001. if ((val)->o[0] & 0x40) {
  3002. ASN1Free_SetOfPrivileges(&(val)->cirq_conducted_privs);
  3003. }
  3004. if ((val)->o[0] & 0x20) {
  3005. ASN1Free_SetOfPrivileges(&(val)->cirq_non_conducted_privs);
  3006. }
  3007. if ((val)->o[0] & 0x10) {
  3008. ASN1char16string_free(&(val)->cirq_description);
  3009. }
  3010. if ((val)->o[0] & 0x8) {
  3011. ASN1char16string_free(&(val)->cirq_caller_id);
  3012. }
  3013. if ((val)->o[0] & 0x4) {
  3014. ASN1Free_SetOfUserData(&(val)->cirq_user_data);
  3015. }
  3016. }
  3017. }
  3018. static int ASN1CALL ASN1Enc_ConferenceInviteResponse(ASN1encoding_t enc, ConferenceInviteResponse *val)
  3019. {
  3020. if (!ASN1PEREncExtensionBitClear(enc))
  3021. return 0;
  3022. if (!ASN1PEREncBits(enc, 1, (val)->o))
  3023. return 0;
  3024. if (!ASN1PEREncExtensionBitClear(enc))
  3025. return 0;
  3026. if (!ASN1PEREncBitVal(enc, 1, (val)->result))
  3027. return 0;
  3028. if ((val)->o[0] & 0x80) {
  3029. if (!ASN1Enc_SetOfUserData(enc, &(val)->cirs_user_data))
  3030. return 0;
  3031. }
  3032. return 1;
  3033. }
  3034. static int ASN1CALL ASN1Dec_ConferenceInviteResponse(ASN1decoding_t dec, ConferenceInviteResponse *val)
  3035. {
  3036. ASN1uint32_t y;
  3037. ASN1uint32_t x;
  3038. if (!ASN1PERDecExtensionBit(dec, &y))
  3039. return 0;
  3040. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  3041. return 0;
  3042. if (!ASN1PERDecExtensionBit(dec, &x))
  3043. return 0;
  3044. if (!x) {
  3045. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->result))
  3046. return 0;
  3047. } else {
  3048. if (!ASN1PERDecSkipNormallySmall(dec))
  3049. return 0;
  3050. }
  3051. if ((val)->o[0] & 0x80) {
  3052. if (!ASN1Dec_SetOfUserData(dec, &(val)->cirs_user_data))
  3053. return 0;
  3054. }
  3055. if (y) {
  3056. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3057. return 0;
  3058. }
  3059. return 1;
  3060. }
  3061. static void ASN1CALL ASN1Free_ConferenceInviteResponse(ConferenceInviteResponse *val)
  3062. {
  3063. if (val) {
  3064. if ((val)->o[0] & 0x80) {
  3065. ASN1Free_SetOfUserData(&(val)->cirs_user_data);
  3066. }
  3067. }
  3068. }
  3069. static int ASN1CALL ASN1Enc_ConferenceAddRequest(ASN1encoding_t enc, ConferenceAddRequest *val)
  3070. {
  3071. if (!ASN1PEREncExtensionBitClear(enc))
  3072. return 0;
  3073. if (!ASN1PEREncBits(enc, 2, (val)->o))
  3074. return 0;
  3075. if (!ASN1Enc_SetOfNetworkAddresses(enc, &(val)->add_request_net_address))
  3076. return 0;
  3077. if (!ASN1PEREncUnsignedShort(enc, (val)->requesting_node - 1001))
  3078. return 0;
  3079. #ifndef _WIN64
  3080. if (!ASN1PEREncInteger(enc, (val)->tag))
  3081. return 0;
  3082. #endif
  3083. if ((val)->o[0] & 0x80) {
  3084. if (!ASN1PEREncUnsignedShort(enc, (val)->adding_mcu - 1001))
  3085. return 0;
  3086. }
  3087. if ((val)->o[0] & 0x40) {
  3088. if (!ASN1Enc_SetOfUserData(enc, &(val)->carq_user_data))
  3089. return 0;
  3090. }
  3091. return 1;
  3092. }
  3093. static int ASN1CALL ASN1Dec_ConferenceAddRequest(ASN1decoding_t dec, ConferenceAddRequest *val)
  3094. {
  3095. ASN1uint32_t y;
  3096. if (!ASN1PERDecExtensionBit(dec, &y))
  3097. return 0;
  3098. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  3099. return 0;
  3100. if (!ASN1Dec_SetOfNetworkAddresses(dec, &(val)->add_request_net_address))
  3101. return 0;
  3102. if (!ASN1PERDecUnsignedShort(dec, &(val)->requesting_node))
  3103. return 0;
  3104. (val)->requesting_node += 1001;
  3105. #ifndef _WIN64
  3106. if (!ASN1PERDecInteger(dec, &(val)->tag))
  3107. return 0;
  3108. #endif
  3109. if ((val)->o[0] & 0x80) {
  3110. if (!ASN1PERDecUnsignedShort(dec, &(val)->adding_mcu))
  3111. return 0;
  3112. (val)->adding_mcu += 1001;
  3113. }
  3114. if ((val)->o[0] & 0x40) {
  3115. if (!ASN1Dec_SetOfUserData(dec, &(val)->carq_user_data))
  3116. return 0;
  3117. }
  3118. if (y) {
  3119. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3120. return 0;
  3121. }
  3122. return 1;
  3123. }
  3124. static void ASN1CALL ASN1Free_ConferenceAddRequest(ConferenceAddRequest *val)
  3125. {
  3126. if (val) {
  3127. ASN1Free_SetOfNetworkAddresses(&(val)->add_request_net_address);
  3128. if ((val)->o[0] & 0x40) {
  3129. ASN1Free_SetOfUserData(&(val)->carq_user_data);
  3130. }
  3131. }
  3132. }
  3133. static int ASN1CALL ASN1Enc_ConferenceAddResponse(ASN1encoding_t enc, ConferenceAddResponse *val)
  3134. {
  3135. if (!ASN1PEREncExtensionBitClear(enc))
  3136. return 0;
  3137. if (!ASN1PEREncBits(enc, 1, (val)->o))
  3138. return 0;
  3139. #ifndef _WIN64
  3140. if (!ASN1PEREncInteger(enc, (val)->tag))
  3141. return 0;
  3142. #endif
  3143. if (!ASN1PEREncExtensionBitClear(enc))
  3144. return 0;
  3145. if (!ASN1PEREncBitVal(enc, 3, (val)->result))
  3146. return 0;
  3147. if ((val)->o[0] & 0x80) {
  3148. if (!ASN1Enc_SetOfUserData(enc, &(val)->cars_user_data))
  3149. return 0;
  3150. }
  3151. return 1;
  3152. }
  3153. static int ASN1CALL ASN1Dec_ConferenceAddResponse(ASN1decoding_t dec, ConferenceAddResponse *val)
  3154. {
  3155. ASN1uint32_t y;
  3156. ASN1uint32_t x;
  3157. if (!ASN1PERDecExtensionBit(dec, &y))
  3158. return 0;
  3159. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  3160. return 0;
  3161. #ifndef _WIN64
  3162. if (!ASN1PERDecInteger(dec, &(val)->tag))
  3163. return 0;
  3164. #endif
  3165. if (!ASN1PERDecExtensionBit(dec, &x))
  3166. return 0;
  3167. if (!x) {
  3168. if (!ASN1PERDecU32Val(dec, 3, (ASN1uint32_t *) &(val)->result))
  3169. return 0;
  3170. } else {
  3171. if (!ASN1PERDecSkipNormallySmall(dec))
  3172. return 0;
  3173. }
  3174. if ((val)->o[0] & 0x80) {
  3175. if (!ASN1Dec_SetOfUserData(dec, &(val)->cars_user_data))
  3176. return 0;
  3177. }
  3178. if (y) {
  3179. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3180. return 0;
  3181. }
  3182. return 1;
  3183. }
  3184. static void ASN1CALL ASN1Free_ConferenceAddResponse(ConferenceAddResponse *val)
  3185. {
  3186. if (val) {
  3187. if ((val)->o[0] & 0x80) {
  3188. ASN1Free_SetOfUserData(&(val)->cars_user_data);
  3189. }
  3190. }
  3191. }
  3192. static int ASN1CALL ASN1Enc_ConferenceLockRequest(ASN1encoding_t enc, ConferenceLockRequest *val)
  3193. {
  3194. if (!ASN1PEREncExtensionBitClear(enc))
  3195. return 0;
  3196. return 1;
  3197. }
  3198. static int ASN1CALL ASN1Dec_ConferenceLockRequest(ASN1decoding_t dec, ConferenceLockRequest *val)
  3199. {
  3200. ASN1uint32_t y;
  3201. if (!ASN1PERDecExtensionBit(dec, &y))
  3202. return 0;
  3203. if (y) {
  3204. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3205. return 0;
  3206. }
  3207. return 1;
  3208. }
  3209. static int ASN1CALL ASN1Enc_ConferenceLockResponse(ASN1encoding_t enc, ConferenceLockResponse *val)
  3210. {
  3211. if (!ASN1PEREncExtensionBitClear(enc))
  3212. return 0;
  3213. if (!ASN1PEREncExtensionBitClear(enc))
  3214. return 0;
  3215. if (!ASN1PEREncBitVal(enc, 2, (val)->result))
  3216. return 0;
  3217. return 1;
  3218. }
  3219. static int ASN1CALL ASN1Dec_ConferenceLockResponse(ASN1decoding_t dec, ConferenceLockResponse *val)
  3220. {
  3221. ASN1uint32_t y;
  3222. ASN1uint32_t x;
  3223. if (!ASN1PERDecExtensionBit(dec, &y))
  3224. return 0;
  3225. if (!ASN1PERDecExtensionBit(dec, &x))
  3226. return 0;
  3227. if (!x) {
  3228. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->result))
  3229. return 0;
  3230. } else {
  3231. if (!ASN1PERDecSkipNormallySmall(dec))
  3232. return 0;
  3233. }
  3234. if (y) {
  3235. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3236. return 0;
  3237. }
  3238. return 1;
  3239. }
  3240. static int ASN1CALL ASN1Enc_ConferenceLockIndication(ASN1encoding_t enc, ConferenceLockIndication *val)
  3241. {
  3242. if (!ASN1PEREncExtensionBitClear(enc))
  3243. return 0;
  3244. return 1;
  3245. }
  3246. static int ASN1CALL ASN1Dec_ConferenceLockIndication(ASN1decoding_t dec, ConferenceLockIndication *val)
  3247. {
  3248. ASN1uint32_t y;
  3249. if (!ASN1PERDecExtensionBit(dec, &y))
  3250. return 0;
  3251. if (y) {
  3252. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3253. return 0;
  3254. }
  3255. return 1;
  3256. }
  3257. static int ASN1CALL ASN1Enc_ConferenceUnlockRequest(ASN1encoding_t enc, ConferenceUnlockRequest *val)
  3258. {
  3259. if (!ASN1PEREncExtensionBitClear(enc))
  3260. return 0;
  3261. return 1;
  3262. }
  3263. static int ASN1CALL ASN1Dec_ConferenceUnlockRequest(ASN1decoding_t dec, ConferenceUnlockRequest *val)
  3264. {
  3265. ASN1uint32_t y;
  3266. if (!ASN1PERDecExtensionBit(dec, &y))
  3267. return 0;
  3268. if (y) {
  3269. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3270. return 0;
  3271. }
  3272. return 1;
  3273. }
  3274. static int ASN1CALL ASN1Enc_ConferenceUnlockResponse(ASN1encoding_t enc, ConferenceUnlockResponse *val)
  3275. {
  3276. if (!ASN1PEREncExtensionBitClear(enc))
  3277. return 0;
  3278. if (!ASN1PEREncExtensionBitClear(enc))
  3279. return 0;
  3280. if (!ASN1PEREncBitVal(enc, 2, (val)->result))
  3281. return 0;
  3282. return 1;
  3283. }
  3284. static int ASN1CALL ASN1Dec_ConferenceUnlockResponse(ASN1decoding_t dec, ConferenceUnlockResponse *val)
  3285. {
  3286. ASN1uint32_t y;
  3287. ASN1uint32_t x;
  3288. if (!ASN1PERDecExtensionBit(dec, &y))
  3289. return 0;
  3290. if (!ASN1PERDecExtensionBit(dec, &x))
  3291. return 0;
  3292. if (!x) {
  3293. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->result))
  3294. return 0;
  3295. } else {
  3296. if (!ASN1PERDecSkipNormallySmall(dec))
  3297. return 0;
  3298. }
  3299. if (y) {
  3300. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3301. return 0;
  3302. }
  3303. return 1;
  3304. }
  3305. static int ASN1CALL ASN1Enc_ConferenceUnlockIndication(ASN1encoding_t enc, ConferenceUnlockIndication *val)
  3306. {
  3307. if (!ASN1PEREncExtensionBitClear(enc))
  3308. return 0;
  3309. return 1;
  3310. }
  3311. static int ASN1CALL ASN1Dec_ConferenceUnlockIndication(ASN1decoding_t dec, ConferenceUnlockIndication *val)
  3312. {
  3313. ASN1uint32_t y;
  3314. if (!ASN1PERDecExtensionBit(dec, &y))
  3315. return 0;
  3316. if (y) {
  3317. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3318. return 0;
  3319. }
  3320. return 1;
  3321. }
  3322. static int ASN1CALL ASN1Enc_ConferenceTerminateRequest(ASN1encoding_t enc, ConferenceTerminateRequest *val)
  3323. {
  3324. if (!ASN1PEREncExtensionBitClear(enc))
  3325. return 0;
  3326. if (!ASN1PEREncExtensionBitClear(enc))
  3327. return 0;
  3328. if (!ASN1PEREncBitVal(enc, 1, (val)->reason))
  3329. return 0;
  3330. return 1;
  3331. }
  3332. static int ASN1CALL ASN1Dec_ConferenceTerminateRequest(ASN1decoding_t dec, ConferenceTerminateRequest *val)
  3333. {
  3334. ASN1uint32_t y;
  3335. ASN1uint32_t x;
  3336. if (!ASN1PERDecExtensionBit(dec, &y))
  3337. return 0;
  3338. if (!ASN1PERDecExtensionBit(dec, &x))
  3339. return 0;
  3340. if (!x) {
  3341. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->reason))
  3342. return 0;
  3343. } else {
  3344. if (!ASN1PERDecSkipNormallySmall(dec))
  3345. return 0;
  3346. }
  3347. if (y) {
  3348. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3349. return 0;
  3350. }
  3351. return 1;
  3352. }
  3353. static int ASN1CALL ASN1Enc_ConferenceTerminateResponse(ASN1encoding_t enc, ConferenceTerminateResponse *val)
  3354. {
  3355. if (!ASN1PEREncExtensionBitClear(enc))
  3356. return 0;
  3357. if (!ASN1PEREncExtensionBitClear(enc))
  3358. return 0;
  3359. if (!ASN1PEREncBitVal(enc, 1, (val)->result))
  3360. return 0;
  3361. return 1;
  3362. }
  3363. static int ASN1CALL ASN1Dec_ConferenceTerminateResponse(ASN1decoding_t dec, ConferenceTerminateResponse *val)
  3364. {
  3365. ASN1uint32_t y;
  3366. ASN1uint32_t x;
  3367. if (!ASN1PERDecExtensionBit(dec, &y))
  3368. return 0;
  3369. if (!ASN1PERDecExtensionBit(dec, &x))
  3370. return 0;
  3371. if (!x) {
  3372. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->result))
  3373. return 0;
  3374. } else {
  3375. if (!ASN1PERDecSkipNormallySmall(dec))
  3376. return 0;
  3377. }
  3378. if (y) {
  3379. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3380. return 0;
  3381. }
  3382. return 1;
  3383. }
  3384. static int ASN1CALL ASN1Enc_ConferenceTerminateIndication(ASN1encoding_t enc, ConferenceTerminateIndication *val)
  3385. {
  3386. if (!ASN1PEREncExtensionBitClear(enc))
  3387. return 0;
  3388. if (!ASN1PEREncExtensionBitClear(enc))
  3389. return 0;
  3390. if (!ASN1PEREncBitVal(enc, 1, (val)->reason))
  3391. return 0;
  3392. return 1;
  3393. }
  3394. static int ASN1CALL ASN1Dec_ConferenceTerminateIndication(ASN1decoding_t dec, ConferenceTerminateIndication *val)
  3395. {
  3396. ASN1uint32_t y;
  3397. ASN1uint32_t x;
  3398. if (!ASN1PERDecExtensionBit(dec, &y))
  3399. return 0;
  3400. if (!ASN1PERDecExtensionBit(dec, &x))
  3401. return 0;
  3402. if (!x) {
  3403. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->reason))
  3404. return 0;
  3405. } else {
  3406. if (!ASN1PERDecSkipNormallySmall(dec))
  3407. return 0;
  3408. }
  3409. if (y) {
  3410. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3411. return 0;
  3412. }
  3413. return 1;
  3414. }
  3415. static int ASN1CALL ASN1Enc_ConferenceEjectUserRequest(ASN1encoding_t enc, ConferenceEjectUserRequest *val)
  3416. {
  3417. if (!ASN1PEREncExtensionBitClear(enc))
  3418. return 0;
  3419. if (!ASN1PEREncUnsignedShort(enc, (val)->node_to_eject - 1001))
  3420. return 0;
  3421. if (!ASN1PEREncExtensionBitClear(enc))
  3422. return 0;
  3423. return 1;
  3424. }
  3425. static int ASN1CALL ASN1Dec_ConferenceEjectUserRequest(ASN1decoding_t dec, ConferenceEjectUserRequest *val)
  3426. {
  3427. ASN1uint32_t y;
  3428. ASN1uint32_t x;
  3429. if (!ASN1PERDecExtensionBit(dec, &y))
  3430. return 0;
  3431. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_to_eject))
  3432. return 0;
  3433. (val)->node_to_eject += 1001;
  3434. if (!ASN1PERDecExtensionBit(dec, &x))
  3435. return 0;
  3436. if (!x) {
  3437. (val)->reason = 0;
  3438. } else {
  3439. if (!ASN1PERDecSkipNormallySmall(dec))
  3440. return 0;
  3441. }
  3442. if (y) {
  3443. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3444. return 0;
  3445. }
  3446. return 1;
  3447. }
  3448. static int ASN1CALL ASN1Enc_ConferenceEjectUserResponse(ASN1encoding_t enc, ConferenceEjectUserResponse *val)
  3449. {
  3450. if (!ASN1PEREncExtensionBitClear(enc))
  3451. return 0;
  3452. if (!ASN1PEREncUnsignedShort(enc, (val)->node_to_eject - 1001))
  3453. return 0;
  3454. if (!ASN1PEREncExtensionBitClear(enc))
  3455. return 0;
  3456. if (!ASN1PEREncBitVal(enc, 2, (val)->result))
  3457. return 0;
  3458. return 1;
  3459. }
  3460. static int ASN1CALL ASN1Dec_ConferenceEjectUserResponse(ASN1decoding_t dec, ConferenceEjectUserResponse *val)
  3461. {
  3462. ASN1uint32_t y;
  3463. ASN1uint32_t x;
  3464. if (!ASN1PERDecExtensionBit(dec, &y))
  3465. return 0;
  3466. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_to_eject))
  3467. return 0;
  3468. (val)->node_to_eject += 1001;
  3469. if (!ASN1PERDecExtensionBit(dec, &x))
  3470. return 0;
  3471. if (!x) {
  3472. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->result))
  3473. return 0;
  3474. } else {
  3475. if (!ASN1PERDecSkipNormallySmall(dec))
  3476. return 0;
  3477. }
  3478. if (y) {
  3479. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3480. return 0;
  3481. }
  3482. return 1;
  3483. }
  3484. static int ASN1CALL ASN1Enc_ConferenceEjectUserIndication(ASN1encoding_t enc, ConferenceEjectUserIndication *val)
  3485. {
  3486. if (!ASN1PEREncExtensionBitClear(enc))
  3487. return 0;
  3488. if (!ASN1PEREncUnsignedShort(enc, (val)->node_to_eject - 1001))
  3489. return 0;
  3490. if (!ASN1PEREncExtensionBitClear(enc))
  3491. return 0;
  3492. if (!ASN1PEREncBitVal(enc, 2, (val)->reason))
  3493. return 0;
  3494. return 1;
  3495. }
  3496. static int ASN1CALL ASN1Dec_ConferenceEjectUserIndication(ASN1decoding_t dec, ConferenceEjectUserIndication *val)
  3497. {
  3498. ASN1uint32_t y;
  3499. ASN1uint32_t x;
  3500. if (!ASN1PERDecExtensionBit(dec, &y))
  3501. return 0;
  3502. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_to_eject))
  3503. return 0;
  3504. (val)->node_to_eject += 1001;
  3505. if (!ASN1PERDecExtensionBit(dec, &x))
  3506. return 0;
  3507. if (!x) {
  3508. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->reason))
  3509. return 0;
  3510. } else {
  3511. if (!ASN1PERDecSkipNormallySmall(dec))
  3512. return 0;
  3513. }
  3514. if (y) {
  3515. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3516. return 0;
  3517. }
  3518. return 1;
  3519. }
  3520. static ASN1stringtableentry_t ConferenceTransferRequest_ctrq_conference_modifier_StringTableEntries[] = {
  3521. { 48, 57, 0 },
  3522. };
  3523. static ASN1stringtable_t ConferenceTransferRequest_ctrq_conference_modifier_StringTable = {
  3524. 1, ConferenceTransferRequest_ctrq_conference_modifier_StringTableEntries
  3525. };
  3526. static int ASN1CALL ASN1Enc_ConferenceTransferRequest(ASN1encoding_t enc, ConferenceTransferRequest *val)
  3527. {
  3528. ASN1uint32_t t;
  3529. if (!ASN1PEREncExtensionBitClear(enc))
  3530. return 0;
  3531. if (!ASN1PEREncBits(enc, 4, (val)->o))
  3532. return 0;
  3533. if (!ASN1Enc_ConferenceNameSelector(enc, &(val)->conference_name))
  3534. return 0;
  3535. if ((val)->o[0] & 0x80) {
  3536. t = lstrlenA((val)->ctrq_conference_modifier);
  3537. if (!ASN1PEREncBitVal(enc, 8, t - 1))
  3538. return 0;
  3539. ASN1PEREncAlignment(enc);
  3540. if (!ASN1PEREncTableCharString(enc, t, (val)->ctrq_conference_modifier, 4, &ConferenceTransferRequest_ctrq_conference_modifier_StringTable))
  3541. return 0;
  3542. }
  3543. if ((val)->o[0] & 0x40) {
  3544. if (!ASN1Enc_SetOfNetworkAddresses(enc, &(val)->ctrq_net_address))
  3545. return 0;
  3546. }
  3547. if ((val)->o[0] & 0x20) {
  3548. if (!ASN1Enc_SetOfTransferringNodesRq(enc, &(val)->ctrq_transferring_nodes))
  3549. return 0;
  3550. }
  3551. if ((val)->o[0] & 0x10) {
  3552. if (!ASN1Enc_PasswordSelector(enc, &(val)->ctrq_password))
  3553. return 0;
  3554. }
  3555. return 1;
  3556. }
  3557. static int ASN1CALL ASN1Dec_ConferenceTransferRequest(ASN1decoding_t dec, ConferenceTransferRequest *val)
  3558. {
  3559. ASN1uint32_t y;
  3560. ASN1uint32_t l;
  3561. if (!ASN1PERDecExtensionBit(dec, &y))
  3562. return 0;
  3563. if (!ASN1PERDecExtension(dec, 4, (val)->o))
  3564. return 0;
  3565. if (!ASN1Dec_ConferenceNameSelector(dec, &(val)->conference_name))
  3566. return 0;
  3567. if ((val)->o[0] & 0x80) {
  3568. if (!ASN1PERDecU32Val(dec, 8, &l))
  3569. return 0;
  3570. l += 1;
  3571. ASN1PERDecAlignment(dec);
  3572. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->ctrq_conference_modifier, 4, &ConferenceTransferRequest_ctrq_conference_modifier_StringTable))
  3573. return 0;
  3574. }
  3575. if ((val)->o[0] & 0x40) {
  3576. if (!ASN1Dec_SetOfNetworkAddresses(dec, &(val)->ctrq_net_address))
  3577. return 0;
  3578. }
  3579. if ((val)->o[0] & 0x20) {
  3580. if (!ASN1Dec_SetOfTransferringNodesRq(dec, &(val)->ctrq_transferring_nodes))
  3581. return 0;
  3582. }
  3583. if ((val)->o[0] & 0x10) {
  3584. if (!ASN1Dec_PasswordSelector(dec, &(val)->ctrq_password))
  3585. return 0;
  3586. }
  3587. if (y) {
  3588. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3589. return 0;
  3590. }
  3591. return 1;
  3592. }
  3593. static void ASN1CALL ASN1Free_ConferenceTransferRequest(ConferenceTransferRequest *val)
  3594. {
  3595. if (val) {
  3596. ASN1Free_ConferenceNameSelector(&(val)->conference_name);
  3597. if ((val)->o[0] & 0x80) {
  3598. }
  3599. if ((val)->o[0] & 0x40) {
  3600. ASN1Free_SetOfNetworkAddresses(&(val)->ctrq_net_address);
  3601. }
  3602. if ((val)->o[0] & 0x20) {
  3603. ASN1Free_SetOfTransferringNodesRq(&(val)->ctrq_transferring_nodes);
  3604. }
  3605. if ((val)->o[0] & 0x10) {
  3606. ASN1Free_PasswordSelector(&(val)->ctrq_password);
  3607. }
  3608. }
  3609. }
  3610. static ASN1stringtableentry_t ConferenceTransferResponse_ctrs_conference_modifier_StringTableEntries[] = {
  3611. { 48, 57, 0 },
  3612. };
  3613. static ASN1stringtable_t ConferenceTransferResponse_ctrs_conference_modifier_StringTable = {
  3614. 1, ConferenceTransferResponse_ctrs_conference_modifier_StringTableEntries
  3615. };
  3616. static int ASN1CALL ASN1Enc_ConferenceTransferResponse(ASN1encoding_t enc, ConferenceTransferResponse *val)
  3617. {
  3618. ASN1uint32_t t;
  3619. if (!ASN1PEREncExtensionBitClear(enc))
  3620. return 0;
  3621. if (!ASN1PEREncBits(enc, 2, (val)->o))
  3622. return 0;
  3623. if (!ASN1Enc_ConferenceNameSelector(enc, &(val)->conference_name))
  3624. return 0;
  3625. if ((val)->o[0] & 0x80) {
  3626. t = lstrlenA((val)->ctrs_conference_modifier);
  3627. if (!ASN1PEREncBitVal(enc, 8, t - 1))
  3628. return 0;
  3629. ASN1PEREncAlignment(enc);
  3630. if (!ASN1PEREncTableCharString(enc, t, (val)->ctrs_conference_modifier, 4, &ConferenceTransferResponse_ctrs_conference_modifier_StringTable))
  3631. return 0;
  3632. }
  3633. if ((val)->o[0] & 0x40) {
  3634. if (!ASN1Enc_SetOfTransferringNodesRs(enc, &(val)->ctrs_transferring_nodes))
  3635. return 0;
  3636. }
  3637. if (!ASN1PEREncExtensionBitClear(enc))
  3638. return 0;
  3639. if (!ASN1PEREncBitVal(enc, 1, (val)->result))
  3640. return 0;
  3641. return 1;
  3642. }
  3643. static int ASN1CALL ASN1Dec_ConferenceTransferResponse(ASN1decoding_t dec, ConferenceTransferResponse *val)
  3644. {
  3645. ASN1uint32_t y;
  3646. ASN1uint32_t l;
  3647. ASN1uint32_t x;
  3648. if (!ASN1PERDecExtensionBit(dec, &y))
  3649. return 0;
  3650. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  3651. return 0;
  3652. if (!ASN1Dec_ConferenceNameSelector(dec, &(val)->conference_name))
  3653. return 0;
  3654. if ((val)->o[0] & 0x80) {
  3655. if (!ASN1PERDecU32Val(dec, 8, &l))
  3656. return 0;
  3657. l += 1;
  3658. ASN1PERDecAlignment(dec);
  3659. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->ctrs_conference_modifier, 4, &ConferenceTransferResponse_ctrs_conference_modifier_StringTable))
  3660. return 0;
  3661. }
  3662. if ((val)->o[0] & 0x40) {
  3663. if (!ASN1Dec_SetOfTransferringNodesRs(dec, &(val)->ctrs_transferring_nodes))
  3664. return 0;
  3665. }
  3666. if (!ASN1PERDecExtensionBit(dec, &x))
  3667. return 0;
  3668. if (!x) {
  3669. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->result))
  3670. return 0;
  3671. } else {
  3672. if (!ASN1PERDecSkipNormallySmall(dec))
  3673. return 0;
  3674. }
  3675. if (y) {
  3676. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3677. return 0;
  3678. }
  3679. return 1;
  3680. }
  3681. static void ASN1CALL ASN1Free_ConferenceTransferResponse(ConferenceTransferResponse *val)
  3682. {
  3683. if (val) {
  3684. ASN1Free_ConferenceNameSelector(&(val)->conference_name);
  3685. if ((val)->o[0] & 0x80) {
  3686. }
  3687. if ((val)->o[0] & 0x40) {
  3688. ASN1Free_SetOfTransferringNodesRs(&(val)->ctrs_transferring_nodes);
  3689. }
  3690. }
  3691. }
  3692. static ASN1stringtableentry_t ConferenceTransferIndication_ctin_conference_modifier_StringTableEntries[] = {
  3693. { 48, 57, 0 },
  3694. };
  3695. static ASN1stringtable_t ConferenceTransferIndication_ctin_conference_modifier_StringTable = {
  3696. 1, ConferenceTransferIndication_ctin_conference_modifier_StringTableEntries
  3697. };
  3698. static int ASN1CALL ASN1Enc_ConferenceTransferIndication(ASN1encoding_t enc, ConferenceTransferIndication *val)
  3699. {
  3700. ASN1uint32_t t;
  3701. if (!ASN1PEREncExtensionBitClear(enc))
  3702. return 0;
  3703. if (!ASN1PEREncBits(enc, 4, (val)->o))
  3704. return 0;
  3705. if (!ASN1Enc_ConferenceNameSelector(enc, &(val)->conference_name))
  3706. return 0;
  3707. if ((val)->o[0] & 0x80) {
  3708. t = lstrlenA((val)->ctin_conference_modifier);
  3709. if (!ASN1PEREncBitVal(enc, 8, t - 1))
  3710. return 0;
  3711. ASN1PEREncAlignment(enc);
  3712. if (!ASN1PEREncTableCharString(enc, t, (val)->ctin_conference_modifier, 4, &ConferenceTransferIndication_ctin_conference_modifier_StringTable))
  3713. return 0;
  3714. }
  3715. if ((val)->o[0] & 0x40) {
  3716. if (!ASN1Enc_SetOfNetworkAddresses(enc, &(val)->ctin_net_address))
  3717. return 0;
  3718. }
  3719. if ((val)->o[0] & 0x20) {
  3720. if (!ASN1Enc_SetOfTransferringNodesIn(enc, &(val)->ctin_transferring_nodes))
  3721. return 0;
  3722. }
  3723. if ((val)->o[0] & 0x10) {
  3724. if (!ASN1Enc_PasswordSelector(enc, &(val)->ctin_password))
  3725. return 0;
  3726. }
  3727. return 1;
  3728. }
  3729. static int ASN1CALL ASN1Dec_ConferenceTransferIndication(ASN1decoding_t dec, ConferenceTransferIndication *val)
  3730. {
  3731. ASN1uint32_t y;
  3732. ASN1uint32_t l;
  3733. if (!ASN1PERDecExtensionBit(dec, &y))
  3734. return 0;
  3735. if (!ASN1PERDecExtension(dec, 4, (val)->o))
  3736. return 0;
  3737. if (!ASN1Dec_ConferenceNameSelector(dec, &(val)->conference_name))
  3738. return 0;
  3739. if ((val)->o[0] & 0x80) {
  3740. if (!ASN1PERDecU32Val(dec, 8, &l))
  3741. return 0;
  3742. l += 1;
  3743. ASN1PERDecAlignment(dec);
  3744. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->ctin_conference_modifier, 4, &ConferenceTransferIndication_ctin_conference_modifier_StringTable))
  3745. return 0;
  3746. }
  3747. if ((val)->o[0] & 0x40) {
  3748. if (!ASN1Dec_SetOfNetworkAddresses(dec, &(val)->ctin_net_address))
  3749. return 0;
  3750. }
  3751. if ((val)->o[0] & 0x20) {
  3752. if (!ASN1Dec_SetOfTransferringNodesIn(dec, &(val)->ctin_transferring_nodes))
  3753. return 0;
  3754. }
  3755. if ((val)->o[0] & 0x10) {
  3756. if (!ASN1Dec_PasswordSelector(dec, &(val)->ctin_password))
  3757. return 0;
  3758. }
  3759. if (y) {
  3760. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3761. return 0;
  3762. }
  3763. return 1;
  3764. }
  3765. static void ASN1CALL ASN1Free_ConferenceTransferIndication(ConferenceTransferIndication *val)
  3766. {
  3767. if (val) {
  3768. ASN1Free_ConferenceNameSelector(&(val)->conference_name);
  3769. if ((val)->o[0] & 0x80) {
  3770. }
  3771. if ((val)->o[0] & 0x40) {
  3772. ASN1Free_SetOfNetworkAddresses(&(val)->ctin_net_address);
  3773. }
  3774. if ((val)->o[0] & 0x20) {
  3775. ASN1Free_SetOfTransferringNodesIn(&(val)->ctin_transferring_nodes);
  3776. }
  3777. if ((val)->o[0] & 0x10) {
  3778. ASN1Free_PasswordSelector(&(val)->ctin_password);
  3779. }
  3780. }
  3781. }
  3782. static int ASN1CALL ASN1Enc_RosterUpdateIndication(ASN1encoding_t enc, RosterUpdateIndication *val)
  3783. {
  3784. if (!ASN1PEREncExtensionBitClear(enc))
  3785. return 0;
  3786. if (!ASN1PEREncBoolean(enc, (val)->refresh_is_full))
  3787. return 0;
  3788. if (!ASN1Enc_NodeInformation(enc, &(val)->node_information))
  3789. return 0;
  3790. if (!ASN1Enc_SetOfApplicationInformation(enc, &(val)->application_information))
  3791. return 0;
  3792. return 1;
  3793. }
  3794. static int ASN1CALL ASN1Dec_RosterUpdateIndication(ASN1decoding_t dec, RosterUpdateIndication *val)
  3795. {
  3796. ASN1uint32_t y;
  3797. if (!ASN1PERDecExtensionBit(dec, &y))
  3798. return 0;
  3799. if (!ASN1PERDecBoolean(dec, &(val)->refresh_is_full))
  3800. return 0;
  3801. if (!ASN1Dec_NodeInformation(dec, &(val)->node_information))
  3802. return 0;
  3803. if (!ASN1Dec_SetOfApplicationInformation(dec, &(val)->application_information))
  3804. return 0;
  3805. if (y) {
  3806. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3807. return 0;
  3808. }
  3809. return 1;
  3810. }
  3811. static void ASN1CALL ASN1Free_RosterUpdateIndication(RosterUpdateIndication *val)
  3812. {
  3813. if (val) {
  3814. ASN1Free_NodeInformation(&(val)->node_information);
  3815. ASN1Free_SetOfApplicationInformation(&(val)->application_information);
  3816. }
  3817. }
  3818. static int ASN1CALL ASN1Enc_ApplicationInvokeIndication(ASN1encoding_t enc, ApplicationInvokeIndication *val)
  3819. {
  3820. if (!ASN1PEREncExtensionBitClear(enc))
  3821. return 0;
  3822. if (!ASN1PEREncBits(enc, 1, (val)->o))
  3823. return 0;
  3824. if (!ASN1Enc_ApplicationProtocolEntityList(enc, &(val)->application_protocol_entity_list))
  3825. return 0;
  3826. if ((val)->o[0] & 0x80) {
  3827. if (!ASN1Enc_SetOfDestinationNodes(enc, &(val)->destination_nodes))
  3828. return 0;
  3829. }
  3830. return 1;
  3831. }
  3832. static int ASN1CALL ASN1Dec_ApplicationInvokeIndication(ASN1decoding_t dec, ApplicationInvokeIndication *val)
  3833. {
  3834. ASN1uint32_t y;
  3835. if (!ASN1PERDecExtensionBit(dec, &y))
  3836. return 0;
  3837. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  3838. return 0;
  3839. if (!ASN1Dec_ApplicationProtocolEntityList(dec, &(val)->application_protocol_entity_list))
  3840. return 0;
  3841. if ((val)->o[0] & 0x80) {
  3842. if (!ASN1Dec_SetOfDestinationNodes(dec, &(val)->destination_nodes))
  3843. return 0;
  3844. }
  3845. if (y) {
  3846. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3847. return 0;
  3848. }
  3849. return 1;
  3850. }
  3851. static void ASN1CALL ASN1Free_ApplicationInvokeIndication(ApplicationInvokeIndication *val)
  3852. {
  3853. if (val) {
  3854. ASN1Free_ApplicationProtocolEntityList(&(val)->application_protocol_entity_list);
  3855. if ((val)->o[0] & 0x80) {
  3856. ASN1Free_SetOfDestinationNodes(&(val)->destination_nodes);
  3857. }
  3858. }
  3859. }
  3860. static int ASN1CALL ASN1Enc_RegistryRegisterChannelRequest(ASN1encoding_t enc, RegistryRegisterChannelRequest *val)
  3861. {
  3862. if (!ASN1PEREncExtensionBitClear(enc))
  3863. return 0;
  3864. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  3865. return 0;
  3866. if (!ASN1Enc_RegistryKey(enc, &(val)->key))
  3867. return 0;
  3868. if (!ASN1PEREncUnsignedShort(enc, (val)->channel_id - 1001))
  3869. return 0;
  3870. return 1;
  3871. }
  3872. static int ASN1CALL ASN1Dec_RegistryRegisterChannelRequest(ASN1decoding_t dec, RegistryRegisterChannelRequest *val)
  3873. {
  3874. ASN1uint32_t y;
  3875. if (!ASN1PERDecExtensionBit(dec, &y))
  3876. return 0;
  3877. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  3878. return 0;
  3879. if (!ASN1Dec_RegistryKey(dec, &(val)->key))
  3880. return 0;
  3881. if (!ASN1PERDecUnsignedShort(dec, &(val)->channel_id))
  3882. return 0;
  3883. (val)->channel_id += 1001;
  3884. if (y) {
  3885. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3886. return 0;
  3887. }
  3888. return 1;
  3889. }
  3890. static void ASN1CALL ASN1Free_RegistryRegisterChannelRequest(RegistryRegisterChannelRequest *val)
  3891. {
  3892. if (val) {
  3893. ASN1Free_RegistryKey(&(val)->key);
  3894. }
  3895. }
  3896. static int ASN1CALL ASN1Enc_RegistryAssignTokenRequest(ASN1encoding_t enc, RegistryAssignTokenRequest *val)
  3897. {
  3898. if (!ASN1PEREncExtensionBitClear(enc))
  3899. return 0;
  3900. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  3901. return 0;
  3902. if (!ASN1Enc_RegistryKey(enc, &(val)->registry_key))
  3903. return 0;
  3904. return 1;
  3905. }
  3906. static int ASN1CALL ASN1Dec_RegistryAssignTokenRequest(ASN1decoding_t dec, RegistryAssignTokenRequest *val)
  3907. {
  3908. ASN1uint32_t y;
  3909. if (!ASN1PERDecExtensionBit(dec, &y))
  3910. return 0;
  3911. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  3912. return 0;
  3913. if (!ASN1Dec_RegistryKey(dec, &(val)->registry_key))
  3914. return 0;
  3915. if (y) {
  3916. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3917. return 0;
  3918. }
  3919. return 1;
  3920. }
  3921. static void ASN1CALL ASN1Free_RegistryAssignTokenRequest(RegistryAssignTokenRequest *val)
  3922. {
  3923. if (val) {
  3924. ASN1Free_RegistryKey(&(val)->registry_key);
  3925. }
  3926. }
  3927. static int ASN1CALL ASN1Enc_RegistrySetParameterRequest(ASN1encoding_t enc, RegistrySetParameterRequest *val)
  3928. {
  3929. if (!ASN1PEREncExtensionBitClear(enc))
  3930. return 0;
  3931. if (!ASN1PEREncBits(enc, 1, (val)->o))
  3932. return 0;
  3933. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  3934. return 0;
  3935. if (!ASN1Enc_RegistryKey(enc, &(val)->key))
  3936. return 0;
  3937. if (!ASN1PEREncOctetString_VarSize(enc, (ASN1octetstring2_t *) &(val)->registry_set_parameter, 0, 64, 7))
  3938. return 0;
  3939. if ((val)->o[0] & 0x80) {
  3940. if (!ASN1PEREncBitVal(enc, 2, (val)->parameter_modify_rights))
  3941. return 0;
  3942. }
  3943. return 1;
  3944. }
  3945. static int ASN1CALL ASN1Dec_RegistrySetParameterRequest(ASN1decoding_t dec, RegistrySetParameterRequest *val)
  3946. {
  3947. ASN1uint32_t y;
  3948. if (!ASN1PERDecExtensionBit(dec, &y))
  3949. return 0;
  3950. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  3951. return 0;
  3952. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  3953. return 0;
  3954. if (!ASN1Dec_RegistryKey(dec, &(val)->key))
  3955. return 0;
  3956. if (!ASN1PERDecOctetString_VarSize(dec, (ASN1octetstring2_t *) &(val)->registry_set_parameter, 0, 64, 7))
  3957. return 0;
  3958. if ((val)->o[0] & 0x80) {
  3959. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->parameter_modify_rights))
  3960. return 0;
  3961. }
  3962. if (y) {
  3963. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3964. return 0;
  3965. }
  3966. return 1;
  3967. }
  3968. static void ASN1CALL ASN1Free_RegistrySetParameterRequest(RegistrySetParameterRequest *val)
  3969. {
  3970. if (val) {
  3971. ASN1Free_RegistryKey(&(val)->key);
  3972. }
  3973. }
  3974. static int ASN1CALL ASN1Enc_RegistryRetrieveEntryRequest(ASN1encoding_t enc, RegistryRetrieveEntryRequest *val)
  3975. {
  3976. if (!ASN1PEREncExtensionBitClear(enc))
  3977. return 0;
  3978. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  3979. return 0;
  3980. if (!ASN1Enc_RegistryKey(enc, &(val)->key))
  3981. return 0;
  3982. return 1;
  3983. }
  3984. static int ASN1CALL ASN1Dec_RegistryRetrieveEntryRequest(ASN1decoding_t dec, RegistryRetrieveEntryRequest *val)
  3985. {
  3986. ASN1uint32_t y;
  3987. if (!ASN1PERDecExtensionBit(dec, &y))
  3988. return 0;
  3989. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  3990. return 0;
  3991. if (!ASN1Dec_RegistryKey(dec, &(val)->key))
  3992. return 0;
  3993. if (y) {
  3994. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  3995. return 0;
  3996. }
  3997. return 1;
  3998. }
  3999. static void ASN1CALL ASN1Free_RegistryRetrieveEntryRequest(RegistryRetrieveEntryRequest *val)
  4000. {
  4001. if (val) {
  4002. ASN1Free_RegistryKey(&(val)->key);
  4003. }
  4004. }
  4005. static int ASN1CALL ASN1Enc_RegistryDeleteEntryRequest(ASN1encoding_t enc, RegistryDeleteEntryRequest *val)
  4006. {
  4007. if (!ASN1PEREncExtensionBitClear(enc))
  4008. return 0;
  4009. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  4010. return 0;
  4011. if (!ASN1Enc_RegistryKey(enc, &(val)->key))
  4012. return 0;
  4013. return 1;
  4014. }
  4015. static int ASN1CALL ASN1Dec_RegistryDeleteEntryRequest(ASN1decoding_t dec, RegistryDeleteEntryRequest *val)
  4016. {
  4017. ASN1uint32_t y;
  4018. if (!ASN1PERDecExtensionBit(dec, &y))
  4019. return 0;
  4020. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  4021. return 0;
  4022. if (!ASN1Dec_RegistryKey(dec, &(val)->key))
  4023. return 0;
  4024. if (y) {
  4025. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4026. return 0;
  4027. }
  4028. return 1;
  4029. }
  4030. static void ASN1CALL ASN1Free_RegistryDeleteEntryRequest(RegistryDeleteEntryRequest *val)
  4031. {
  4032. if (val) {
  4033. ASN1Free_RegistryKey(&(val)->key);
  4034. }
  4035. }
  4036. static int ASN1CALL ASN1Enc_RegistryMonitorEntryRequest(ASN1encoding_t enc, RegistryMonitorEntryRequest *val)
  4037. {
  4038. if (!ASN1PEREncExtensionBitClear(enc))
  4039. return 0;
  4040. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  4041. return 0;
  4042. if (!ASN1Enc_RegistryKey(enc, &(val)->key))
  4043. return 0;
  4044. return 1;
  4045. }
  4046. static int ASN1CALL ASN1Dec_RegistryMonitorEntryRequest(ASN1decoding_t dec, RegistryMonitorEntryRequest *val)
  4047. {
  4048. ASN1uint32_t y;
  4049. if (!ASN1PERDecExtensionBit(dec, &y))
  4050. return 0;
  4051. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  4052. return 0;
  4053. if (!ASN1Dec_RegistryKey(dec, &(val)->key))
  4054. return 0;
  4055. if (y) {
  4056. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4057. return 0;
  4058. }
  4059. return 1;
  4060. }
  4061. static void ASN1CALL ASN1Free_RegistryMonitorEntryRequest(RegistryMonitorEntryRequest *val)
  4062. {
  4063. if (val) {
  4064. ASN1Free_RegistryKey(&(val)->key);
  4065. }
  4066. }
  4067. static int ASN1CALL ASN1Enc_RegistryMonitorEntryIndication(ASN1encoding_t enc, RegistryMonitorEntryIndication *val)
  4068. {
  4069. if (!ASN1PEREncExtensionBitClear(enc))
  4070. return 0;
  4071. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4072. return 0;
  4073. if (!ASN1Enc_RegistryKey(enc, &(val)->key))
  4074. return 0;
  4075. if (!ASN1Enc_RegistryItem(enc, &(val)->item))
  4076. return 0;
  4077. if (!ASN1Enc_RegistryEntryOwner(enc, &(val)->owner))
  4078. return 0;
  4079. if ((val)->o[0] & 0x80) {
  4080. if (!ASN1PEREncBitVal(enc, 2, (val)->entry_modify_rights))
  4081. return 0;
  4082. }
  4083. return 1;
  4084. }
  4085. static int ASN1CALL ASN1Dec_RegistryMonitorEntryIndication(ASN1decoding_t dec, RegistryMonitorEntryIndication *val)
  4086. {
  4087. ASN1uint32_t y;
  4088. if (!ASN1PERDecExtensionBit(dec, &y))
  4089. return 0;
  4090. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4091. return 0;
  4092. if (!ASN1Dec_RegistryKey(dec, &(val)->key))
  4093. return 0;
  4094. if (!ASN1Dec_RegistryItem(dec, &(val)->item))
  4095. return 0;
  4096. if (!ASN1Dec_RegistryEntryOwner(dec, &(val)->owner))
  4097. return 0;
  4098. if ((val)->o[0] & 0x80) {
  4099. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->entry_modify_rights))
  4100. return 0;
  4101. }
  4102. if (y) {
  4103. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4104. return 0;
  4105. }
  4106. return 1;
  4107. }
  4108. static void ASN1CALL ASN1Free_RegistryMonitorEntryIndication(RegistryMonitorEntryIndication *val)
  4109. {
  4110. if (val) {
  4111. ASN1Free_RegistryKey(&(val)->key);
  4112. ASN1Free_RegistryItem(&(val)->item);
  4113. }
  4114. }
  4115. static int ASN1CALL ASN1Enc_RegistryAllocateHandleRequest(ASN1encoding_t enc, RegistryAllocateHandleRequest *val)
  4116. {
  4117. if (!ASN1PEREncExtensionBitClear(enc))
  4118. return 0;
  4119. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  4120. return 0;
  4121. if (!ASN1PEREncUnsignedShort(enc, (val)->number_of_handles - 1))
  4122. return 0;
  4123. return 1;
  4124. }
  4125. static int ASN1CALL ASN1Dec_RegistryAllocateHandleRequest(ASN1decoding_t dec, RegistryAllocateHandleRequest *val)
  4126. {
  4127. ASN1uint32_t y;
  4128. if (!ASN1PERDecExtensionBit(dec, &y))
  4129. return 0;
  4130. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  4131. return 0;
  4132. if (!ASN1PERDecUnsignedShort(dec, &(val)->number_of_handles))
  4133. return 0;
  4134. (val)->number_of_handles += 1;
  4135. if (y) {
  4136. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4137. return 0;
  4138. }
  4139. return 1;
  4140. }
  4141. static int ASN1CALL ASN1Enc_RegistryAllocateHandleResponse(ASN1encoding_t enc, RegistryAllocateHandleResponse *val)
  4142. {
  4143. ASN1uint32_t l;
  4144. if (!ASN1PEREncExtensionBitClear(enc))
  4145. return 0;
  4146. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  4147. return 0;
  4148. if (!ASN1PEREncUnsignedShort(enc, (val)->number_of_handles - 1))
  4149. return 0;
  4150. l = ASN1uint32_uoctets((val)->first_handle);
  4151. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  4152. return 0;
  4153. ASN1PEREncAlignment(enc);
  4154. if (!ASN1PEREncBitVal(enc, l * 8, (val)->first_handle))
  4155. return 0;
  4156. if (!ASN1PEREncExtensionBitClear(enc))
  4157. return 0;
  4158. if (!ASN1PEREncBitVal(enc, 1, (val)->result))
  4159. return 0;
  4160. return 1;
  4161. }
  4162. static int ASN1CALL ASN1Dec_RegistryAllocateHandleResponse(ASN1decoding_t dec, RegistryAllocateHandleResponse *val)
  4163. {
  4164. ASN1uint32_t y;
  4165. ASN1uint32_t l;
  4166. ASN1uint32_t x;
  4167. if (!ASN1PERDecExtensionBit(dec, &y))
  4168. return 0;
  4169. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  4170. return 0;
  4171. if (!ASN1PERDecUnsignedShort(dec, &(val)->number_of_handles))
  4172. return 0;
  4173. (val)->number_of_handles += 1;
  4174. if (!ASN1PERDecU32Val(dec, 2, &l))
  4175. return 0;
  4176. l += 1;
  4177. ASN1PERDecAlignment(dec);
  4178. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->first_handle))
  4179. return 0;
  4180. if (!ASN1PERDecExtensionBit(dec, &x))
  4181. return 0;
  4182. if (!x) {
  4183. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->result))
  4184. return 0;
  4185. } else {
  4186. if (!ASN1PERDecSkipNormallySmall(dec))
  4187. return 0;
  4188. }
  4189. if (y) {
  4190. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4191. return 0;
  4192. }
  4193. return 1;
  4194. }
  4195. static int ASN1CALL ASN1Enc_RegistryResponse(ASN1encoding_t enc, RegistryResponse *val)
  4196. {
  4197. if (!ASN1PEREncExtensionBitClear(enc))
  4198. return 0;
  4199. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4200. return 0;
  4201. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  4202. return 0;
  4203. if (!ASN1PEREncExtensionBitClear(enc))
  4204. return 0;
  4205. if (!ASN1PEREncBitVal(enc, 3, (val)->primitive_type))
  4206. return 0;
  4207. if (!ASN1Enc_RegistryKey(enc, &(val)->key))
  4208. return 0;
  4209. if (!ASN1Enc_RegistryItem(enc, &(val)->item))
  4210. return 0;
  4211. if (!ASN1Enc_RegistryEntryOwner(enc, &(val)->owner))
  4212. return 0;
  4213. if ((val)->o[0] & 0x80) {
  4214. if (!ASN1PEREncBitVal(enc, 2, (val)->response_modify_rights))
  4215. return 0;
  4216. }
  4217. if (!ASN1PEREncExtensionBitClear(enc))
  4218. return 0;
  4219. if (!ASN1PEREncBitVal(enc, 3, (val)->result))
  4220. return 0;
  4221. return 1;
  4222. }
  4223. static int ASN1CALL ASN1Dec_RegistryResponse(ASN1decoding_t dec, RegistryResponse *val)
  4224. {
  4225. ASN1uint32_t y;
  4226. ASN1uint32_t x;
  4227. if (!ASN1PERDecExtensionBit(dec, &y))
  4228. return 0;
  4229. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4230. return 0;
  4231. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  4232. return 0;
  4233. if (!ASN1PERDecExtensionBit(dec, &x))
  4234. return 0;
  4235. if (!x) {
  4236. if (!ASN1PERDecU32Val(dec, 3, (ASN1uint32_t *) &(val)->primitive_type))
  4237. return 0;
  4238. } else {
  4239. if (!ASN1PERDecSkipNormallySmall(dec))
  4240. return 0;
  4241. }
  4242. if (!ASN1Dec_RegistryKey(dec, &(val)->key))
  4243. return 0;
  4244. if (!ASN1Dec_RegistryItem(dec, &(val)->item))
  4245. return 0;
  4246. if (!ASN1Dec_RegistryEntryOwner(dec, &(val)->owner))
  4247. return 0;
  4248. if ((val)->o[0] & 0x80) {
  4249. if (!ASN1PERDecU32Val(dec, 2, (ASN1uint32_t *) &(val)->response_modify_rights))
  4250. return 0;
  4251. }
  4252. if (!ASN1PERDecExtensionBit(dec, &x))
  4253. return 0;
  4254. if (!x) {
  4255. if (!ASN1PERDecU32Val(dec, 3, (ASN1uint32_t *) &(val)->result))
  4256. return 0;
  4257. } else {
  4258. if (!ASN1PERDecSkipNormallySmall(dec))
  4259. return 0;
  4260. }
  4261. if (y) {
  4262. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4263. return 0;
  4264. }
  4265. return 1;
  4266. }
  4267. static void ASN1CALL ASN1Free_RegistryResponse(RegistryResponse *val)
  4268. {
  4269. if (val) {
  4270. ASN1Free_RegistryKey(&(val)->key);
  4271. ASN1Free_RegistryItem(&(val)->item);
  4272. }
  4273. }
  4274. static int ASN1CALL ASN1Enc_ConductorAssignIndication(ASN1encoding_t enc, ConductorAssignIndication *val)
  4275. {
  4276. if (!ASN1PEREncExtensionBitClear(enc))
  4277. return 0;
  4278. if (!ASN1PEREncUnsignedShort(enc, (val)->user_id - 1001))
  4279. return 0;
  4280. return 1;
  4281. }
  4282. static int ASN1CALL ASN1Dec_ConductorAssignIndication(ASN1decoding_t dec, ConductorAssignIndication *val)
  4283. {
  4284. ASN1uint32_t y;
  4285. if (!ASN1PERDecExtensionBit(dec, &y))
  4286. return 0;
  4287. if (!ASN1PERDecUnsignedShort(dec, &(val)->user_id))
  4288. return 0;
  4289. (val)->user_id += 1001;
  4290. if (y) {
  4291. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4292. return 0;
  4293. }
  4294. return 1;
  4295. }
  4296. static int ASN1CALL ASN1Enc_ConductorReleaseIndication(ASN1encoding_t enc, ConductorReleaseIndication *val)
  4297. {
  4298. if (!ASN1PEREncExtensionBitClear(enc))
  4299. return 0;
  4300. return 1;
  4301. }
  4302. static int ASN1CALL ASN1Dec_ConductorReleaseIndication(ASN1decoding_t dec, ConductorReleaseIndication *val)
  4303. {
  4304. ASN1uint32_t y;
  4305. if (!ASN1PERDecExtensionBit(dec, &y))
  4306. return 0;
  4307. if (y) {
  4308. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4309. return 0;
  4310. }
  4311. return 1;
  4312. }
  4313. static int ASN1CALL ASN1Enc_ConductorPermissionAskIndication(ASN1encoding_t enc, ConductorPermissionAskIndication *val)
  4314. {
  4315. if (!ASN1PEREncExtensionBitClear(enc))
  4316. return 0;
  4317. if (!ASN1PEREncBoolean(enc, (val)->permission_is_granted))
  4318. return 0;
  4319. return 1;
  4320. }
  4321. static int ASN1CALL ASN1Dec_ConductorPermissionAskIndication(ASN1decoding_t dec, ConductorPermissionAskIndication *val)
  4322. {
  4323. ASN1uint32_t y;
  4324. if (!ASN1PERDecExtensionBit(dec, &y))
  4325. return 0;
  4326. if (!ASN1PERDecBoolean(dec, &(val)->permission_is_granted))
  4327. return 0;
  4328. if (y) {
  4329. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4330. return 0;
  4331. }
  4332. return 1;
  4333. }
  4334. static int ASN1CALL ASN1Enc_ConductorPermissionGrantIndication(ASN1encoding_t enc, ConductorPermissionGrantIndication *val)
  4335. {
  4336. if (!ASN1PEREncExtensionBitClear(enc))
  4337. return 0;
  4338. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4339. return 0;
  4340. if (!ASN1Enc_PermissionList(enc, &(val)->permission_list))
  4341. return 0;
  4342. if ((val)->o[0] & 0x80) {
  4343. if (!ASN1Enc_WaitingList(enc, &(val)->waiting_list))
  4344. return 0;
  4345. }
  4346. return 1;
  4347. }
  4348. static int ASN1CALL ASN1Dec_ConductorPermissionGrantIndication(ASN1decoding_t dec, ConductorPermissionGrantIndication *val)
  4349. {
  4350. ASN1uint32_t y;
  4351. if (!ASN1PERDecExtensionBit(dec, &y))
  4352. return 0;
  4353. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4354. return 0;
  4355. if (!ASN1Dec_PermissionList(dec, &(val)->permission_list))
  4356. return 0;
  4357. if ((val)->o[0] & 0x80) {
  4358. if (!ASN1Dec_WaitingList(dec, &(val)->waiting_list))
  4359. return 0;
  4360. }
  4361. if (y) {
  4362. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4363. return 0;
  4364. }
  4365. return 1;
  4366. }
  4367. static void ASN1CALL ASN1Free_ConductorPermissionGrantIndication(ConductorPermissionGrantIndication *val)
  4368. {
  4369. if (val) {
  4370. ASN1Free_PermissionList(&(val)->permission_list);
  4371. if ((val)->o[0] & 0x80) {
  4372. ASN1Free_WaitingList(&(val)->waiting_list);
  4373. }
  4374. }
  4375. }
  4376. static int ASN1CALL ASN1Enc_ConferenceTimeRemainingIndication(ASN1encoding_t enc, ConferenceTimeRemainingIndication *val)
  4377. {
  4378. ASN1uint32_t l;
  4379. if (!ASN1PEREncExtensionBitClear(enc))
  4380. return 0;
  4381. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4382. return 0;
  4383. l = ASN1uint32_uoctets((val)->time_remaining + 2147483648);
  4384. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  4385. return 0;
  4386. ASN1PEREncAlignment(enc);
  4387. if (!ASN1PEREncBitVal(enc, l * 8, (val)->time_remaining + 2147483648))
  4388. return 0;
  4389. if ((val)->o[0] & 0x80) {
  4390. if (!ASN1PEREncUnsignedShort(enc, (val)->time_remaining_node_id - 1001))
  4391. return 0;
  4392. }
  4393. return 1;
  4394. }
  4395. static int ASN1CALL ASN1Dec_ConferenceTimeRemainingIndication(ASN1decoding_t dec, ConferenceTimeRemainingIndication *val)
  4396. {
  4397. ASN1uint32_t y;
  4398. ASN1uint32_t l;
  4399. if (!ASN1PERDecExtensionBit(dec, &y))
  4400. return 0;
  4401. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4402. return 0;
  4403. if (!ASN1PERDecU32Val(dec, 2, &l))
  4404. return 0;
  4405. l += 1;
  4406. ASN1PERDecAlignment(dec);
  4407. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->time_remaining))
  4408. return 0;
  4409. (val)->time_remaining += 0 - 2147483648;
  4410. if ((val)->o[0] & 0x80) {
  4411. if (!ASN1PERDecUnsignedShort(dec, &(val)->time_remaining_node_id))
  4412. return 0;
  4413. (val)->time_remaining_node_id += 1001;
  4414. }
  4415. if (y) {
  4416. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4417. return 0;
  4418. }
  4419. return 1;
  4420. }
  4421. static int ASN1CALL ASN1Enc_ConferenceTimeInquireIndication(ASN1encoding_t enc, ConferenceTimeInquireIndication *val)
  4422. {
  4423. if (!ASN1PEREncExtensionBitClear(enc))
  4424. return 0;
  4425. if (!ASN1PEREncBoolean(enc, (val)->time_is_node_specific))
  4426. return 0;
  4427. return 1;
  4428. }
  4429. static int ASN1CALL ASN1Dec_ConferenceTimeInquireIndication(ASN1decoding_t dec, ConferenceTimeInquireIndication *val)
  4430. {
  4431. ASN1uint32_t y;
  4432. if (!ASN1PERDecExtensionBit(dec, &y))
  4433. return 0;
  4434. if (!ASN1PERDecBoolean(dec, &(val)->time_is_node_specific))
  4435. return 0;
  4436. if (y) {
  4437. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4438. return 0;
  4439. }
  4440. return 1;
  4441. }
  4442. static int ASN1CALL ASN1Enc_ConferenceTimeExtendIndication(ASN1encoding_t enc, ConferenceTimeExtendIndication *val)
  4443. {
  4444. ASN1uint32_t l;
  4445. if (!ASN1PEREncExtensionBitClear(enc))
  4446. return 0;
  4447. l = ASN1uint32_uoctets((val)->time_to_extend + 2147483648);
  4448. if (!ASN1PEREncBitVal(enc, 2, l - 1))
  4449. return 0;
  4450. ASN1PEREncAlignment(enc);
  4451. if (!ASN1PEREncBitVal(enc, l * 8, (val)->time_to_extend + 2147483648))
  4452. return 0;
  4453. if (!ASN1PEREncBoolean(enc, (val)->time_is_node_specific))
  4454. return 0;
  4455. return 1;
  4456. }
  4457. static int ASN1CALL ASN1Dec_ConferenceTimeExtendIndication(ASN1decoding_t dec, ConferenceTimeExtendIndication *val)
  4458. {
  4459. ASN1uint32_t y;
  4460. ASN1uint32_t l;
  4461. if (!ASN1PERDecExtensionBit(dec, &y))
  4462. return 0;
  4463. if (!ASN1PERDecU32Val(dec, 2, &l))
  4464. return 0;
  4465. l += 1;
  4466. ASN1PERDecAlignment(dec);
  4467. if (!ASN1PERDecU32Val(dec, l * 8, &(val)->time_to_extend))
  4468. return 0;
  4469. (val)->time_to_extend += 0 - 2147483648;
  4470. if (!ASN1PERDecBoolean(dec, &(val)->time_is_node_specific))
  4471. return 0;
  4472. if (y) {
  4473. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4474. return 0;
  4475. }
  4476. return 1;
  4477. }
  4478. static int ASN1CALL ASN1Enc_ConferenceAssistanceIndication(ASN1encoding_t enc, ConferenceAssistanceIndication *val)
  4479. {
  4480. if (!ASN1PEREncExtensionBitClear(enc))
  4481. return 0;
  4482. if (!ASN1PEREncBits(enc, 1, (val)->o))
  4483. return 0;
  4484. if ((val)->o[0] & 0x80) {
  4485. if (!ASN1Enc_SetOfUserData(enc, &(val)->cain_user_data))
  4486. return 0;
  4487. }
  4488. return 1;
  4489. }
  4490. static int ASN1CALL ASN1Dec_ConferenceAssistanceIndication(ASN1decoding_t dec, ConferenceAssistanceIndication *val)
  4491. {
  4492. ASN1uint32_t y;
  4493. if (!ASN1PERDecExtensionBit(dec, &y))
  4494. return 0;
  4495. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  4496. return 0;
  4497. if ((val)->o[0] & 0x80) {
  4498. if (!ASN1Dec_SetOfUserData(dec, &(val)->cain_user_data))
  4499. return 0;
  4500. }
  4501. if (y) {
  4502. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4503. return 0;
  4504. }
  4505. return 1;
  4506. }
  4507. static void ASN1CALL ASN1Free_ConferenceAssistanceIndication(ConferenceAssistanceIndication *val)
  4508. {
  4509. if (val) {
  4510. if ((val)->o[0] & 0x80) {
  4511. ASN1Free_SetOfUserData(&(val)->cain_user_data);
  4512. }
  4513. }
  4514. }
  4515. static int ASN1CALL ASN1Enc_TextMessageIndication(ASN1encoding_t enc, TextMessageIndication *val)
  4516. {
  4517. if (!ASN1PEREncExtensionBitClear(enc))
  4518. return 0;
  4519. ASN1PEREncAlignment(enc);
  4520. if (!ASN1PEREncBitVal(enc, 8, ((val)->message).length))
  4521. return 0;
  4522. if (!ASN1PEREncChar16String(enc, ((val)->message).length, ((val)->message).value, 16))
  4523. return 0;
  4524. return 1;
  4525. }
  4526. static int ASN1CALL ASN1Dec_TextMessageIndication(ASN1decoding_t dec, TextMessageIndication *val)
  4527. {
  4528. ASN1uint32_t y;
  4529. if (!ASN1PERDecExtensionBit(dec, &y))
  4530. return 0;
  4531. ASN1PERDecAlignment(dec);
  4532. if (!ASN1PERDecU32Val(dec, 8, &((val)->message).length))
  4533. return 0;
  4534. if (!ASN1PERDecChar16String(dec, ((val)->message).length, &((val)->message).value, 16))
  4535. return 0;
  4536. if (y) {
  4537. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4538. return 0;
  4539. }
  4540. return 1;
  4541. }
  4542. static void ASN1CALL ASN1Free_TextMessageIndication(TextMessageIndication *val)
  4543. {
  4544. if (val) {
  4545. ASN1char16string_free(&(val)->message);
  4546. }
  4547. }
  4548. static int ASN1CALL ASN1Enc_NonStandardPDU(ASN1encoding_t enc, NonStandardPDU *val)
  4549. {
  4550. if (!ASN1PEREncExtensionBitClear(enc))
  4551. return 0;
  4552. if (!ASN1Enc_NonStandardParameter(enc, &(val)->data))
  4553. return 0;
  4554. return 1;
  4555. }
  4556. static int ASN1CALL ASN1Dec_NonStandardPDU(ASN1decoding_t dec, NonStandardPDU *val)
  4557. {
  4558. ASN1uint32_t y;
  4559. if (!ASN1PERDecExtensionBit(dec, &y))
  4560. return 0;
  4561. if (!ASN1Dec_NonStandardParameter(dec, &(val)->data))
  4562. return 0;
  4563. if (y) {
  4564. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4565. return 0;
  4566. }
  4567. return 1;
  4568. }
  4569. static void ASN1CALL ASN1Free_NonStandardPDU(NonStandardPDU *val)
  4570. {
  4571. if (val) {
  4572. ASN1Free_NonStandardParameter(&(val)->data);
  4573. }
  4574. }
  4575. static int ASN1CALL ASN1Enc_ConnectData(ASN1encoding_t enc, ConnectData *val)
  4576. {
  4577. if (!ASN1Enc_Key(enc, &(val)->t124_identifier))
  4578. return 0;
  4579. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->connect_pdu))
  4580. return 0;
  4581. return 1;
  4582. }
  4583. static int ASN1CALL ASN1Dec_ConnectData(ASN1decoding_t dec, ConnectData *val)
  4584. {
  4585. if (!ASN1Dec_Key(dec, &(val)->t124_identifier))
  4586. return 0;
  4587. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->connect_pdu))
  4588. return 0;
  4589. return 1;
  4590. }
  4591. static void ASN1CALL ASN1Free_ConnectData(ConnectData *val)
  4592. {
  4593. if (val) {
  4594. ASN1Free_Key(&(val)->t124_identifier);
  4595. ASN1octetstring_free(&(val)->connect_pdu);
  4596. }
  4597. }
  4598. static int ASN1CALL ASN1Enc_IndicationPDU(ASN1encoding_t enc, IndicationPDU *val)
  4599. {
  4600. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 5))
  4601. return 0;
  4602. switch ((val)->choice) {
  4603. case 1:
  4604. if (!ASN1Enc_UserIDIndication(enc, &(val)->u.user_id_indication))
  4605. return 0;
  4606. break;
  4607. case 2:
  4608. if (!ASN1Enc_ConferenceLockIndication(enc, &(val)->u.conference_lock_indication))
  4609. return 0;
  4610. break;
  4611. case 3:
  4612. if (!ASN1Enc_ConferenceUnlockIndication(enc, &(val)->u.conference_unlock_indication))
  4613. return 0;
  4614. break;
  4615. case 4:
  4616. if (!ASN1Enc_ConferenceTerminateIndication(enc, &(val)->u.conference_terminate_indication))
  4617. return 0;
  4618. break;
  4619. case 5:
  4620. if (!ASN1Enc_ConferenceEjectUserIndication(enc, &(val)->u.conference_eject_user_indication))
  4621. return 0;
  4622. break;
  4623. case 6:
  4624. if (!ASN1Enc_ConferenceTransferIndication(enc, &(val)->u.conference_transfer_indication))
  4625. return 0;
  4626. break;
  4627. case 7:
  4628. if (!ASN1Enc_RosterUpdateIndication(enc, &(val)->u.roster_update_indication))
  4629. return 0;
  4630. break;
  4631. case 8:
  4632. if (!ASN1Enc_ApplicationInvokeIndication(enc, &(val)->u.application_invoke_indication))
  4633. return 0;
  4634. break;
  4635. case 9:
  4636. if (!ASN1Enc_RegistryMonitorEntryIndication(enc, &(val)->u.registry_monitor_entry_indication))
  4637. return 0;
  4638. break;
  4639. case 10:
  4640. if (!ASN1Enc_ConductorAssignIndication(enc, &(val)->u.conductor_assign_indication))
  4641. return 0;
  4642. break;
  4643. case 11:
  4644. if (!ASN1Enc_ConductorReleaseIndication(enc, &(val)->u.conductor_release_indication))
  4645. return 0;
  4646. break;
  4647. case 12:
  4648. if (!ASN1Enc_ConductorPermissionAskIndication(enc, &(val)->u.conductor_permission_ask_indication))
  4649. return 0;
  4650. break;
  4651. case 13:
  4652. if (!ASN1Enc_ConductorPermissionGrantIndication(enc, &(val)->u.conductor_permission_grant_indication))
  4653. return 0;
  4654. break;
  4655. case 14:
  4656. if (!ASN1Enc_ConferenceTimeRemainingIndication(enc, &(val)->u.conference_time_remaining_indication))
  4657. return 0;
  4658. break;
  4659. case 15:
  4660. if (!ASN1Enc_ConferenceTimeInquireIndication(enc, &(val)->u.conference_time_inquire_indication))
  4661. return 0;
  4662. break;
  4663. case 16:
  4664. if (!ASN1Enc_ConferenceTimeExtendIndication(enc, &(val)->u.conference_time_extend_indication))
  4665. return 0;
  4666. break;
  4667. case 17:
  4668. if (!ASN1Enc_ConferenceAssistanceIndication(enc, &(val)->u.conference_assistance_indication))
  4669. return 0;
  4670. break;
  4671. case 18:
  4672. if (!ASN1Enc_TextMessageIndication(enc, &(val)->u.text_message_indication))
  4673. return 0;
  4674. break;
  4675. case 19:
  4676. if (!ASN1Enc_NonStandardPDU(enc, &(val)->u.non_standard_indication))
  4677. return 0;
  4678. break;
  4679. default:
  4680. /* impossible */
  4681. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  4682. return 0;
  4683. }
  4684. return 1;
  4685. }
  4686. static int ASN1CALL ASN1Dec_IndicationPDU(ASN1decoding_t dec, IndicationPDU *val)
  4687. {
  4688. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 5))
  4689. return 0;
  4690. switch ((val)->choice) {
  4691. case 1:
  4692. if (!ASN1Dec_UserIDIndication(dec, &(val)->u.user_id_indication))
  4693. return 0;
  4694. break;
  4695. case 2:
  4696. if (!ASN1Dec_ConferenceLockIndication(dec, &(val)->u.conference_lock_indication))
  4697. return 0;
  4698. break;
  4699. case 3:
  4700. if (!ASN1Dec_ConferenceUnlockIndication(dec, &(val)->u.conference_unlock_indication))
  4701. return 0;
  4702. break;
  4703. case 4:
  4704. if (!ASN1Dec_ConferenceTerminateIndication(dec, &(val)->u.conference_terminate_indication))
  4705. return 0;
  4706. break;
  4707. case 5:
  4708. if (!ASN1Dec_ConferenceEjectUserIndication(dec, &(val)->u.conference_eject_user_indication))
  4709. return 0;
  4710. break;
  4711. case 6:
  4712. if (!ASN1Dec_ConferenceTransferIndication(dec, &(val)->u.conference_transfer_indication))
  4713. return 0;
  4714. break;
  4715. case 7:
  4716. if (!ASN1Dec_RosterUpdateIndication(dec, &(val)->u.roster_update_indication))
  4717. return 0;
  4718. break;
  4719. case 8:
  4720. if (!ASN1Dec_ApplicationInvokeIndication(dec, &(val)->u.application_invoke_indication))
  4721. return 0;
  4722. break;
  4723. case 9:
  4724. if (!ASN1Dec_RegistryMonitorEntryIndication(dec, &(val)->u.registry_monitor_entry_indication))
  4725. return 0;
  4726. break;
  4727. case 10:
  4728. if (!ASN1Dec_ConductorAssignIndication(dec, &(val)->u.conductor_assign_indication))
  4729. return 0;
  4730. break;
  4731. case 11:
  4732. if (!ASN1Dec_ConductorReleaseIndication(dec, &(val)->u.conductor_release_indication))
  4733. return 0;
  4734. break;
  4735. case 12:
  4736. if (!ASN1Dec_ConductorPermissionAskIndication(dec, &(val)->u.conductor_permission_ask_indication))
  4737. return 0;
  4738. break;
  4739. case 13:
  4740. if (!ASN1Dec_ConductorPermissionGrantIndication(dec, &(val)->u.conductor_permission_grant_indication))
  4741. return 0;
  4742. break;
  4743. case 14:
  4744. if (!ASN1Dec_ConferenceTimeRemainingIndication(dec, &(val)->u.conference_time_remaining_indication))
  4745. return 0;
  4746. break;
  4747. case 15:
  4748. if (!ASN1Dec_ConferenceTimeInquireIndication(dec, &(val)->u.conference_time_inquire_indication))
  4749. return 0;
  4750. break;
  4751. case 16:
  4752. if (!ASN1Dec_ConferenceTimeExtendIndication(dec, &(val)->u.conference_time_extend_indication))
  4753. return 0;
  4754. break;
  4755. case 17:
  4756. if (!ASN1Dec_ConferenceAssistanceIndication(dec, &(val)->u.conference_assistance_indication))
  4757. return 0;
  4758. break;
  4759. case 18:
  4760. if (!ASN1Dec_TextMessageIndication(dec, &(val)->u.text_message_indication))
  4761. return 0;
  4762. break;
  4763. case 19:
  4764. if (!ASN1Dec_NonStandardPDU(dec, &(val)->u.non_standard_indication))
  4765. return 0;
  4766. break;
  4767. case 0:
  4768. /* extension case */
  4769. if (!ASN1PERDecSkipFragmented(dec, 8))
  4770. return 0;
  4771. break;
  4772. default:
  4773. /* impossible */
  4774. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  4775. return 0;
  4776. }
  4777. return 1;
  4778. }
  4779. static void ASN1CALL ASN1Free_IndicationPDU(IndicationPDU *val)
  4780. {
  4781. if (val) {
  4782. switch ((val)->choice) {
  4783. case 6:
  4784. ASN1Free_ConferenceTransferIndication(&(val)->u.conference_transfer_indication);
  4785. break;
  4786. case 7:
  4787. ASN1Free_RosterUpdateIndication(&(val)->u.roster_update_indication);
  4788. break;
  4789. case 8:
  4790. ASN1Free_ApplicationInvokeIndication(&(val)->u.application_invoke_indication);
  4791. break;
  4792. case 9:
  4793. ASN1Free_RegistryMonitorEntryIndication(&(val)->u.registry_monitor_entry_indication);
  4794. break;
  4795. case 13:
  4796. ASN1Free_ConductorPermissionGrantIndication(&(val)->u.conductor_permission_grant_indication);
  4797. break;
  4798. case 17:
  4799. ASN1Free_ConferenceAssistanceIndication(&(val)->u.conference_assistance_indication);
  4800. break;
  4801. case 18:
  4802. ASN1Free_TextMessageIndication(&(val)->u.text_message_indication);
  4803. break;
  4804. case 19:
  4805. ASN1Free_NonStandardPDU(&(val)->u.non_standard_indication);
  4806. break;
  4807. }
  4808. }
  4809. }
  4810. static int ASN1CALL ASN1Enc_ApplicationUpdate(ASN1encoding_t enc, ApplicationUpdate *val)
  4811. {
  4812. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  4813. return 0;
  4814. switch ((val)->choice) {
  4815. case 1:
  4816. if (!ASN1Enc_ApplicationRecord(enc, &(val)->u.application_add_record))
  4817. return 0;
  4818. break;
  4819. case 2:
  4820. if (!ASN1Enc_ApplicationRecord(enc, &(val)->u.application_replace_record))
  4821. return 0;
  4822. break;
  4823. case 3:
  4824. break;
  4825. default:
  4826. /* impossible */
  4827. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  4828. return 0;
  4829. }
  4830. return 1;
  4831. }
  4832. static int ASN1CALL ASN1Dec_ApplicationUpdate(ASN1decoding_t dec, ApplicationUpdate *val)
  4833. {
  4834. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  4835. return 0;
  4836. switch ((val)->choice) {
  4837. case 1:
  4838. if (!ASN1Dec_ApplicationRecord(dec, &(val)->u.application_add_record))
  4839. return 0;
  4840. break;
  4841. case 2:
  4842. if (!ASN1Dec_ApplicationRecord(dec, &(val)->u.application_replace_record))
  4843. return 0;
  4844. break;
  4845. case 3:
  4846. break;
  4847. case 0:
  4848. /* extension case */
  4849. if (!ASN1PERDecSkipFragmented(dec, 8))
  4850. return 0;
  4851. break;
  4852. default:
  4853. /* impossible */
  4854. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  4855. return 0;
  4856. }
  4857. return 1;
  4858. }
  4859. static void ASN1CALL ASN1Free_ApplicationUpdate(ApplicationUpdate *val)
  4860. {
  4861. if (val) {
  4862. switch ((val)->choice) {
  4863. case 1:
  4864. ASN1Free_ApplicationRecord(&(val)->u.application_add_record);
  4865. break;
  4866. case 2:
  4867. ASN1Free_ApplicationRecord(&(val)->u.application_replace_record);
  4868. break;
  4869. }
  4870. }
  4871. }
  4872. static int ASN1CALL ASN1Enc_RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set(ASN1encoding_t enc, RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set *val)
  4873. {
  4874. if (!ASN1PEREncExtensionBitClear(enc))
  4875. return 0;
  4876. if (!ASN1Enc_CapabilityID(enc, &(val)->capability_id))
  4877. return 0;
  4878. if (!ASN1Enc_CapabilityClass(enc, &(val)->capability_class))
  4879. return 0;
  4880. ASN1PEREncAlignment(enc);
  4881. if (!ASN1PEREncBitVal(enc, 16, (val)->number_of_entities - 1))
  4882. return 0;
  4883. return 1;
  4884. }
  4885. static int ASN1CALL ASN1Dec_RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set(ASN1decoding_t dec, RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set *val)
  4886. {
  4887. ASN1uint32_t y;
  4888. if (!ASN1PERDecExtensionBit(dec, &y))
  4889. return 0;
  4890. if (!ASN1Dec_CapabilityID(dec, &(val)->capability_id))
  4891. return 0;
  4892. if (!ASN1Dec_CapabilityClass(dec, &(val)->capability_class))
  4893. return 0;
  4894. ASN1PERDecAlignment(dec);
  4895. if (!ASN1PERDecU32Val(dec, 16, &(val)->number_of_entities))
  4896. return 0;
  4897. (val)->number_of_entities += 1;
  4898. if (y) {
  4899. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  4900. return 0;
  4901. }
  4902. return 1;
  4903. }
  4904. static void ASN1CALL ASN1Free_RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set(RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set *val)
  4905. {
  4906. if (val) {
  4907. ASN1Free_CapabilityID(&(val)->capability_id);
  4908. }
  4909. }
  4910. static int ASN1CALL ASN1Enc_RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set(ASN1encoding_t enc, RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set *val)
  4911. {
  4912. if (!ASN1PEREncUnsignedShort(enc, (val)->node_id - 1001))
  4913. return 0;
  4914. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  4915. return 0;
  4916. if (!ASN1Enc_ApplicationRecord(enc, &(val)->application_record))
  4917. return 0;
  4918. return 1;
  4919. }
  4920. static int ASN1CALL ASN1Dec_RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set(ASN1decoding_t dec, RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set *val)
  4921. {
  4922. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_id))
  4923. return 0;
  4924. (val)->node_id += 1001;
  4925. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  4926. return 0;
  4927. if (!ASN1Dec_ApplicationRecord(dec, &(val)->application_record))
  4928. return 0;
  4929. return 1;
  4930. }
  4931. static void ASN1CALL ASN1Free_RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set(RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set *val)
  4932. {
  4933. if (val) {
  4934. ASN1Free_ApplicationRecord(&(val)->application_record);
  4935. }
  4936. }
  4937. static int ASN1CALL ASN1Enc_RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set(ASN1encoding_t enc, RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set *val)
  4938. {
  4939. if (!ASN1PEREncUnsignedShort(enc, (val)->node_id - 1001))
  4940. return 0;
  4941. if (!ASN1PEREncUnsignedShort(enc, (val)->entity_id))
  4942. return 0;
  4943. if (!ASN1Enc_ApplicationUpdate(enc, &(val)->application_update))
  4944. return 0;
  4945. return 1;
  4946. }
  4947. static int ASN1CALL ASN1Dec_RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set(ASN1decoding_t dec, RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set *val)
  4948. {
  4949. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_id))
  4950. return 0;
  4951. (val)->node_id += 1001;
  4952. if (!ASN1PERDecUnsignedShort(dec, &(val)->entity_id))
  4953. return 0;
  4954. if (!ASN1Dec_ApplicationUpdate(dec, &(val)->application_update))
  4955. return 0;
  4956. return 1;
  4957. }
  4958. static void ASN1CALL ASN1Free_RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set(RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set *val)
  4959. {
  4960. if (val) {
  4961. ASN1Free_ApplicationUpdate(&(val)->application_update);
  4962. }
  4963. }
  4964. static int ASN1CALL ASN1Enc_NodeUpdate(ASN1encoding_t enc, NodeUpdate *val)
  4965. {
  4966. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  4967. return 0;
  4968. switch ((val)->choice) {
  4969. case 1:
  4970. if (!ASN1Enc_NodeRecord(enc, &(val)->u.node_add_record))
  4971. return 0;
  4972. break;
  4973. case 2:
  4974. if (!ASN1Enc_NodeRecord(enc, &(val)->u.node_replace_record))
  4975. return 0;
  4976. break;
  4977. case 3:
  4978. break;
  4979. default:
  4980. /* impossible */
  4981. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  4982. return 0;
  4983. }
  4984. return 1;
  4985. }
  4986. static int ASN1CALL ASN1Dec_NodeUpdate(ASN1decoding_t dec, NodeUpdate *val)
  4987. {
  4988. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  4989. return 0;
  4990. switch ((val)->choice) {
  4991. case 1:
  4992. if (!ASN1Dec_NodeRecord(dec, &(val)->u.node_add_record))
  4993. return 0;
  4994. break;
  4995. case 2:
  4996. if (!ASN1Dec_NodeRecord(dec, &(val)->u.node_replace_record))
  4997. return 0;
  4998. break;
  4999. case 3:
  5000. break;
  5001. case 0:
  5002. /* extension case */
  5003. if (!ASN1PERDecSkipFragmented(dec, 8))
  5004. return 0;
  5005. break;
  5006. default:
  5007. /* impossible */
  5008. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  5009. return 0;
  5010. }
  5011. return 1;
  5012. }
  5013. static void ASN1CALL ASN1Free_NodeUpdate(NodeUpdate *val)
  5014. {
  5015. if (val) {
  5016. switch ((val)->choice) {
  5017. case 1:
  5018. ASN1Free_NodeRecord(&(val)->u.node_add_record);
  5019. break;
  5020. case 2:
  5021. ASN1Free_NodeRecord(&(val)->u.node_replace_record);
  5022. break;
  5023. }
  5024. }
  5025. }
  5026. static int ASN1CALL ASN1Enc_RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set(ASN1encoding_t enc, RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set *val)
  5027. {
  5028. if (!ASN1PEREncUnsignedShort(enc, (val)->node_id - 1001))
  5029. return 0;
  5030. if (!ASN1Enc_NodeRecord(enc, &(val)->node_record))
  5031. return 0;
  5032. return 1;
  5033. }
  5034. static int ASN1CALL ASN1Dec_RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set(ASN1decoding_t dec, RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set *val)
  5035. {
  5036. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_id))
  5037. return 0;
  5038. (val)->node_id += 1001;
  5039. if (!ASN1Dec_NodeRecord(dec, &(val)->node_record))
  5040. return 0;
  5041. return 1;
  5042. }
  5043. static void ASN1CALL ASN1Free_RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set(RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set *val)
  5044. {
  5045. if (val) {
  5046. ASN1Free_NodeRecord(&(val)->node_record);
  5047. }
  5048. }
  5049. static int ASN1CALL ASN1Enc_RosterUpdateIndication_node_information_node_record_list_node_record_update_Set(ASN1encoding_t enc, RosterUpdateIndication_node_information_node_record_list_node_record_update_Set *val)
  5050. {
  5051. if (!ASN1PEREncUnsignedShort(enc, (val)->node_id - 1001))
  5052. return 0;
  5053. if (!ASN1Enc_NodeUpdate(enc, &(val)->node_update))
  5054. return 0;
  5055. return 1;
  5056. }
  5057. static int ASN1CALL ASN1Dec_RosterUpdateIndication_node_information_node_record_list_node_record_update_Set(ASN1decoding_t dec, RosterUpdateIndication_node_information_node_record_list_node_record_update_Set *val)
  5058. {
  5059. if (!ASN1PERDecUnsignedShort(dec, &(val)->node_id))
  5060. return 0;
  5061. (val)->node_id += 1001;
  5062. if (!ASN1Dec_NodeUpdate(dec, &(val)->node_update))
  5063. return 0;
  5064. return 1;
  5065. }
  5066. static void ASN1CALL ASN1Free_RosterUpdateIndication_node_information_node_record_list_node_record_update_Set(RosterUpdateIndication_node_information_node_record_list_node_record_update_Set *val)
  5067. {
  5068. if (val) {
  5069. ASN1Free_NodeUpdate(&(val)->node_update);
  5070. }
  5071. }
  5072. static int ASN1CALL ASN1Enc_SetOfApplicationRecordUpdates(ASN1encoding_t enc, PSetOfApplicationRecordUpdates *val)
  5073. {
  5074. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfApplicationRecordUpdates_ElmFn);
  5075. }
  5076. static int ASN1CALL ASN1Enc_SetOfApplicationRecordUpdates_ElmFn(ASN1encoding_t enc, PSetOfApplicationRecordUpdates val)
  5077. {
  5078. if (!ASN1Enc_RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set(enc, &val->value))
  5079. return 0;
  5080. return 1;
  5081. }
  5082. static int ASN1CALL ASN1Dec_SetOfApplicationRecordUpdates(ASN1decoding_t dec, PSetOfApplicationRecordUpdates *val)
  5083. {
  5084. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfApplicationRecordUpdates_ElmFn, sizeof(**val));
  5085. }
  5086. static int ASN1CALL ASN1Dec_SetOfApplicationRecordUpdates_ElmFn(ASN1decoding_t dec, PSetOfApplicationRecordUpdates val)
  5087. {
  5088. if (!ASN1Dec_RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set(dec, &val->value))
  5089. return 0;
  5090. return 1;
  5091. }
  5092. static void ASN1CALL ASN1Free_SetOfApplicationRecordUpdates(PSetOfApplicationRecordUpdates *val)
  5093. {
  5094. if (val) {
  5095. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfApplicationRecordUpdates_ElmFn);
  5096. }
  5097. }
  5098. static void ASN1CALL ASN1Free_SetOfApplicationRecordUpdates_ElmFn(PSetOfApplicationRecordUpdates val)
  5099. {
  5100. if (val) {
  5101. ASN1Free_RosterUpdateIndication_application_information_Set_application_record_list_application_record_update_Set(&val->value);
  5102. }
  5103. }
  5104. static int ASN1CALL ASN1Enc_SetOfApplicationRecordRefreshes(ASN1encoding_t enc, PSetOfApplicationRecordRefreshes *val)
  5105. {
  5106. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfApplicationRecordRefreshes_ElmFn, 0, 65535, 16);
  5107. }
  5108. static int ASN1CALL ASN1Enc_SetOfApplicationRecordRefreshes_ElmFn(ASN1encoding_t enc, PSetOfApplicationRecordRefreshes val)
  5109. {
  5110. if (!ASN1Enc_RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set(enc, &val->value))
  5111. return 0;
  5112. return 1;
  5113. }
  5114. static int ASN1CALL ASN1Dec_SetOfApplicationRecordRefreshes(ASN1decoding_t dec, PSetOfApplicationRecordRefreshes *val)
  5115. {
  5116. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfApplicationRecordRefreshes_ElmFn, sizeof(**val), 0, 65535, 16);
  5117. }
  5118. static int ASN1CALL ASN1Dec_SetOfApplicationRecordRefreshes_ElmFn(ASN1decoding_t dec, PSetOfApplicationRecordRefreshes val)
  5119. {
  5120. if (!ASN1Dec_RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set(dec, &val->value))
  5121. return 0;
  5122. return 1;
  5123. }
  5124. static void ASN1CALL ASN1Free_SetOfApplicationRecordRefreshes(PSetOfApplicationRecordRefreshes *val)
  5125. {
  5126. if (val) {
  5127. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfApplicationRecordRefreshes_ElmFn);
  5128. }
  5129. }
  5130. static void ASN1CALL ASN1Free_SetOfApplicationRecordRefreshes_ElmFn(PSetOfApplicationRecordRefreshes val)
  5131. {
  5132. if (val) {
  5133. ASN1Free_RosterUpdateIndication_application_information_Set_application_record_list_application_record_refresh_Set(&val->value);
  5134. }
  5135. }
  5136. static int ASN1CALL ASN1Enc_SetOfApplicationCapabilityRefreshes(ASN1encoding_t enc, PSetOfApplicationCapabilityRefreshes *val)
  5137. {
  5138. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfApplicationCapabilityRefreshes_ElmFn);
  5139. }
  5140. static int ASN1CALL ASN1Enc_SetOfApplicationCapabilityRefreshes_ElmFn(ASN1encoding_t enc, PSetOfApplicationCapabilityRefreshes val)
  5141. {
  5142. if (!ASN1Enc_RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set(enc, &val->value))
  5143. return 0;
  5144. return 1;
  5145. }
  5146. static int ASN1CALL ASN1Dec_SetOfApplicationCapabilityRefreshes(ASN1decoding_t dec, PSetOfApplicationCapabilityRefreshes *val)
  5147. {
  5148. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfApplicationCapabilityRefreshes_ElmFn, sizeof(**val));
  5149. }
  5150. static int ASN1CALL ASN1Dec_SetOfApplicationCapabilityRefreshes_ElmFn(ASN1decoding_t dec, PSetOfApplicationCapabilityRefreshes val)
  5151. {
  5152. if (!ASN1Dec_RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set(dec, &val->value))
  5153. return 0;
  5154. return 1;
  5155. }
  5156. static void ASN1CALL ASN1Free_SetOfApplicationCapabilityRefreshes(PSetOfApplicationCapabilityRefreshes *val)
  5157. {
  5158. if (val) {
  5159. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfApplicationCapabilityRefreshes_ElmFn);
  5160. }
  5161. }
  5162. static void ASN1CALL ASN1Free_SetOfApplicationCapabilityRefreshes_ElmFn(PSetOfApplicationCapabilityRefreshes val)
  5163. {
  5164. if (val) {
  5165. ASN1Free_RosterUpdateIndication_application_information_Set_application_capabilities_list_application_capability_refresh_Set(&val->value);
  5166. }
  5167. }
  5168. static int ASN1CALL ASN1Enc_SetOfNodeRecordUpdates(ASN1encoding_t enc, PSetOfNodeRecordUpdates *val)
  5169. {
  5170. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfNodeRecordUpdates_ElmFn);
  5171. }
  5172. static int ASN1CALL ASN1Enc_SetOfNodeRecordUpdates_ElmFn(ASN1encoding_t enc, PSetOfNodeRecordUpdates val)
  5173. {
  5174. if (!ASN1Enc_RosterUpdateIndication_node_information_node_record_list_node_record_update_Set(enc, &val->value))
  5175. return 0;
  5176. return 1;
  5177. }
  5178. static int ASN1CALL ASN1Dec_SetOfNodeRecordUpdates(ASN1decoding_t dec, PSetOfNodeRecordUpdates *val)
  5179. {
  5180. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfNodeRecordUpdates_ElmFn, sizeof(**val));
  5181. }
  5182. static int ASN1CALL ASN1Dec_SetOfNodeRecordUpdates_ElmFn(ASN1decoding_t dec, PSetOfNodeRecordUpdates val)
  5183. {
  5184. if (!ASN1Dec_RosterUpdateIndication_node_information_node_record_list_node_record_update_Set(dec, &val->value))
  5185. return 0;
  5186. return 1;
  5187. }
  5188. static void ASN1CALL ASN1Free_SetOfNodeRecordUpdates(PSetOfNodeRecordUpdates *val)
  5189. {
  5190. if (val) {
  5191. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfNodeRecordUpdates_ElmFn);
  5192. }
  5193. }
  5194. static void ASN1CALL ASN1Free_SetOfNodeRecordUpdates_ElmFn(PSetOfNodeRecordUpdates val)
  5195. {
  5196. if (val) {
  5197. ASN1Free_RosterUpdateIndication_node_information_node_record_list_node_record_update_Set(&val->value);
  5198. }
  5199. }
  5200. static int ASN1CALL ASN1Enc_SetOfNodeRecordRefreshes(ASN1encoding_t enc, PSetOfNodeRecordRefreshes *val)
  5201. {
  5202. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfNodeRecordRefreshes_ElmFn);
  5203. }
  5204. static int ASN1CALL ASN1Enc_SetOfNodeRecordRefreshes_ElmFn(ASN1encoding_t enc, PSetOfNodeRecordRefreshes val)
  5205. {
  5206. if (!ASN1Enc_RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set(enc, &val->value))
  5207. return 0;
  5208. return 1;
  5209. }
  5210. static int ASN1CALL ASN1Dec_SetOfNodeRecordRefreshes(ASN1decoding_t dec, PSetOfNodeRecordRefreshes *val)
  5211. {
  5212. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfNodeRecordRefreshes_ElmFn, sizeof(**val));
  5213. }
  5214. static int ASN1CALL ASN1Dec_SetOfNodeRecordRefreshes_ElmFn(ASN1decoding_t dec, PSetOfNodeRecordRefreshes val)
  5215. {
  5216. if (!ASN1Dec_RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set(dec, &val->value))
  5217. return 0;
  5218. return 1;
  5219. }
  5220. static void ASN1CALL ASN1Free_SetOfNodeRecordRefreshes(PSetOfNodeRecordRefreshes *val)
  5221. {
  5222. if (val) {
  5223. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfNodeRecordRefreshes_ElmFn);
  5224. }
  5225. }
  5226. static void ASN1CALL ASN1Free_SetOfNodeRecordRefreshes_ElmFn(PSetOfNodeRecordRefreshes val)
  5227. {
  5228. if (val) {
  5229. ASN1Free_RosterUpdateIndication_node_information_node_record_list_node_record_refresh_Set(&val->value);
  5230. }
  5231. }
  5232. static int ASN1CALL ASN1Enc_ApplicationRecord_non_collapsing_capabilities_Set(ASN1encoding_t enc, ApplicationRecord_non_collapsing_capabilities_Set *val)
  5233. {
  5234. if (!ASN1PEREncBits(enc, 1, (val)->o))
  5235. return 0;
  5236. if (!ASN1Enc_CapabilityID(enc, &(val)->capability_id))
  5237. return 0;
  5238. if ((val)->o[0] & 0x80) {
  5239. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->application_data))
  5240. return 0;
  5241. }
  5242. return 1;
  5243. }
  5244. static int ASN1CALL ASN1Dec_ApplicationRecord_non_collapsing_capabilities_Set(ASN1decoding_t dec, ApplicationRecord_non_collapsing_capabilities_Set *val)
  5245. {
  5246. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  5247. return 0;
  5248. if (!ASN1Dec_CapabilityID(dec, &(val)->capability_id))
  5249. return 0;
  5250. if ((val)->o[0] & 0x80) {
  5251. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->application_data))
  5252. return 0;
  5253. }
  5254. return 1;
  5255. }
  5256. static void ASN1CALL ASN1Free_ApplicationRecord_non_collapsing_capabilities_Set(ApplicationRecord_non_collapsing_capabilities_Set *val)
  5257. {
  5258. if (val) {
  5259. ASN1Free_CapabilityID(&(val)->capability_id);
  5260. if ((val)->o[0] & 0x80) {
  5261. ASN1octetstring_free(&(val)->application_data);
  5262. }
  5263. }
  5264. }
  5265. static int ASN1CALL ASN1Enc_ApplicationInvokeSpecifier_expected_capability_set_Set(ASN1encoding_t enc, ApplicationInvokeSpecifier_expected_capability_set_Set *val)
  5266. {
  5267. if (!ASN1PEREncExtensionBitClear(enc))
  5268. return 0;
  5269. if (!ASN1Enc_CapabilityID(enc, &(val)->capability_id))
  5270. return 0;
  5271. if (!ASN1Enc_CapabilityClass(enc, &(val)->capability_class))
  5272. return 0;
  5273. return 1;
  5274. }
  5275. static int ASN1CALL ASN1Dec_ApplicationInvokeSpecifier_expected_capability_set_Set(ASN1decoding_t dec, ApplicationInvokeSpecifier_expected_capability_set_Set *val)
  5276. {
  5277. ASN1uint32_t y;
  5278. if (!ASN1PERDecExtensionBit(dec, &y))
  5279. return 0;
  5280. if (!ASN1Dec_CapabilityID(dec, &(val)->capability_id))
  5281. return 0;
  5282. if (!ASN1Dec_CapabilityClass(dec, &(val)->capability_class))
  5283. return 0;
  5284. if (y) {
  5285. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5286. return 0;
  5287. }
  5288. return 1;
  5289. }
  5290. static void ASN1CALL ASN1Free_ApplicationInvokeSpecifier_expected_capability_set_Set(ApplicationInvokeSpecifier_expected_capability_set_Set *val)
  5291. {
  5292. if (val) {
  5293. ASN1Free_CapabilityID(&(val)->capability_id);
  5294. }
  5295. }
  5296. static int ASN1CALL ASN1Enc_RosterUpdateIndication_application_information_Set(ASN1encoding_t enc, RosterUpdateIndication_application_information_Set *val)
  5297. {
  5298. if (!ASN1PEREncExtensionBitClear(enc))
  5299. return 0;
  5300. if (!ASN1Enc_SessionKey(enc, &(val)->session_key))
  5301. return 0;
  5302. if (!ASN1Enc_ApplicationRecordList(enc, &(val)->application_record_list))
  5303. return 0;
  5304. if (!ASN1Enc_ApplicationCapabilitiesList(enc, &(val)->application_capabilities_list))
  5305. return 0;
  5306. if (!ASN1PEREncUnsignedShort(enc, (val)->roster_instance_number))
  5307. return 0;
  5308. if (!ASN1PEREncBoolean(enc, (val)->peer_entities_are_added))
  5309. return 0;
  5310. if (!ASN1PEREncBoolean(enc, (val)->peer_entities_are_removed))
  5311. return 0;
  5312. return 1;
  5313. }
  5314. static int ASN1CALL ASN1Dec_RosterUpdateIndication_application_information_Set(ASN1decoding_t dec, RosterUpdateIndication_application_information_Set *val)
  5315. {
  5316. ASN1uint32_t y;
  5317. if (!ASN1PERDecExtensionBit(dec, &y))
  5318. return 0;
  5319. if (!ASN1Dec_SessionKey(dec, &(val)->session_key))
  5320. return 0;
  5321. if (!ASN1Dec_ApplicationRecordList(dec, &(val)->application_record_list))
  5322. return 0;
  5323. if (!ASN1Dec_ApplicationCapabilitiesList(dec, &(val)->application_capabilities_list))
  5324. return 0;
  5325. if (!ASN1PERDecUnsignedShort(dec, &(val)->roster_instance_number))
  5326. return 0;
  5327. if (!ASN1PERDecBoolean(dec, &(val)->peer_entities_are_added))
  5328. return 0;
  5329. if (!ASN1PERDecBoolean(dec, &(val)->peer_entities_are_removed))
  5330. return 0;
  5331. if (y) {
  5332. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5333. return 0;
  5334. }
  5335. return 1;
  5336. }
  5337. static void ASN1CALL ASN1Free_RosterUpdateIndication_application_information_Set(RosterUpdateIndication_application_information_Set *val)
  5338. {
  5339. if (val) {
  5340. ASN1Free_SessionKey(&(val)->session_key);
  5341. ASN1Free_ApplicationRecordList(&(val)->application_record_list);
  5342. ASN1Free_ApplicationCapabilitiesList(&(val)->application_capabilities_list);
  5343. }
  5344. }
  5345. static int ASN1CALL ASN1Enc_ApplicationProtocolEntityList(ASN1encoding_t enc, PApplicationProtocolEntityList *val)
  5346. {
  5347. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_ApplicationProtocolEntityList_ElmFn);
  5348. }
  5349. static int ASN1CALL ASN1Enc_ApplicationProtocolEntityList_ElmFn(ASN1encoding_t enc, PApplicationProtocolEntityList val)
  5350. {
  5351. if (!ASN1Enc_ApplicationInvokeSpecifier(enc, &val->value))
  5352. return 0;
  5353. return 1;
  5354. }
  5355. static int ASN1CALL ASN1Dec_ApplicationProtocolEntityList(ASN1decoding_t dec, PApplicationProtocolEntityList *val)
  5356. {
  5357. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_ApplicationProtocolEntityList_ElmFn, sizeof(**val));
  5358. }
  5359. static int ASN1CALL ASN1Dec_ApplicationProtocolEntityList_ElmFn(ASN1decoding_t dec, PApplicationProtocolEntityList val)
  5360. {
  5361. if (!ASN1Dec_ApplicationInvokeSpecifier(dec, &val->value))
  5362. return 0;
  5363. return 1;
  5364. }
  5365. static void ASN1CALL ASN1Free_ApplicationProtocolEntityList(PApplicationProtocolEntityList *val)
  5366. {
  5367. if (val) {
  5368. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_ApplicationProtocolEntityList_ElmFn);
  5369. }
  5370. }
  5371. static void ASN1CALL ASN1Free_ApplicationProtocolEntityList_ElmFn(PApplicationProtocolEntityList val)
  5372. {
  5373. if (val) {
  5374. ASN1Free_ApplicationInvokeSpecifier(&val->value);
  5375. }
  5376. }
  5377. static int ASN1CALL ASN1Enc_SetOfApplicationInformation(ASN1encoding_t enc, PSetOfApplicationInformation *val)
  5378. {
  5379. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfApplicationInformation_ElmFn, 0, 65535, 16);
  5380. }
  5381. static int ASN1CALL ASN1Enc_SetOfApplicationInformation_ElmFn(ASN1encoding_t enc, PSetOfApplicationInformation val)
  5382. {
  5383. if (!ASN1Enc_RosterUpdateIndication_application_information_Set(enc, &val->value))
  5384. return 0;
  5385. return 1;
  5386. }
  5387. static int ASN1CALL ASN1Dec_SetOfApplicationInformation(ASN1decoding_t dec, PSetOfApplicationInformation *val)
  5388. {
  5389. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfApplicationInformation_ElmFn, sizeof(**val), 0, 65535, 16);
  5390. }
  5391. static int ASN1CALL ASN1Dec_SetOfApplicationInformation_ElmFn(ASN1decoding_t dec, PSetOfApplicationInformation val)
  5392. {
  5393. if (!ASN1Dec_RosterUpdateIndication_application_information_Set(dec, &val->value))
  5394. return 0;
  5395. return 1;
  5396. }
  5397. static void ASN1CALL ASN1Free_SetOfApplicationInformation(PSetOfApplicationInformation *val)
  5398. {
  5399. if (val) {
  5400. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfApplicationInformation_ElmFn);
  5401. }
  5402. }
  5403. static void ASN1CALL ASN1Free_SetOfApplicationInformation_ElmFn(PSetOfApplicationInformation val)
  5404. {
  5405. if (val) {
  5406. ASN1Free_RosterUpdateIndication_application_information_Set(&val->value);
  5407. }
  5408. }
  5409. static int ASN1CALL ASN1Enc_SetOfConferenceDescriptors(ASN1encoding_t enc, PSetOfConferenceDescriptors *val)
  5410. {
  5411. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfConferenceDescriptors_ElmFn);
  5412. }
  5413. static int ASN1CALL ASN1Enc_SetOfConferenceDescriptors_ElmFn(ASN1encoding_t enc, PSetOfConferenceDescriptors val)
  5414. {
  5415. if (!ASN1Enc_ConferenceDescriptor(enc, &val->value))
  5416. return 0;
  5417. return 1;
  5418. }
  5419. static int ASN1CALL ASN1Dec_SetOfConferenceDescriptors(ASN1decoding_t dec, PSetOfConferenceDescriptors *val)
  5420. {
  5421. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfConferenceDescriptors_ElmFn, sizeof(**val));
  5422. }
  5423. static int ASN1CALL ASN1Dec_SetOfConferenceDescriptors_ElmFn(ASN1decoding_t dec, PSetOfConferenceDescriptors val)
  5424. {
  5425. if (!ASN1Dec_ConferenceDescriptor(dec, &val->value))
  5426. return 0;
  5427. return 1;
  5428. }
  5429. static void ASN1CALL ASN1Free_SetOfConferenceDescriptors(PSetOfConferenceDescriptors *val)
  5430. {
  5431. if (val) {
  5432. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfConferenceDescriptors_ElmFn);
  5433. }
  5434. }
  5435. static void ASN1CALL ASN1Free_SetOfConferenceDescriptors_ElmFn(PSetOfConferenceDescriptors val)
  5436. {
  5437. if (val) {
  5438. ASN1Free_ConferenceDescriptor(&val->value);
  5439. }
  5440. }
  5441. static int ASN1CALL ASN1Enc_SetOfExpectedCapabilities(ASN1encoding_t enc, PSetOfExpectedCapabilities *val)
  5442. {
  5443. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfExpectedCapabilities_ElmFn);
  5444. }
  5445. static int ASN1CALL ASN1Enc_SetOfExpectedCapabilities_ElmFn(ASN1encoding_t enc, PSetOfExpectedCapabilities val)
  5446. {
  5447. if (!ASN1Enc_ApplicationInvokeSpecifier_expected_capability_set_Set(enc, &val->value))
  5448. return 0;
  5449. return 1;
  5450. }
  5451. static int ASN1CALL ASN1Dec_SetOfExpectedCapabilities(ASN1decoding_t dec, PSetOfExpectedCapabilities *val)
  5452. {
  5453. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfExpectedCapabilities_ElmFn, sizeof(**val));
  5454. }
  5455. static int ASN1CALL ASN1Dec_SetOfExpectedCapabilities_ElmFn(ASN1decoding_t dec, PSetOfExpectedCapabilities val)
  5456. {
  5457. if (!ASN1Dec_ApplicationInvokeSpecifier_expected_capability_set_Set(dec, &val->value))
  5458. return 0;
  5459. return 1;
  5460. }
  5461. static void ASN1CALL ASN1Free_SetOfExpectedCapabilities(PSetOfExpectedCapabilities *val)
  5462. {
  5463. if (val) {
  5464. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfExpectedCapabilities_ElmFn);
  5465. }
  5466. }
  5467. static void ASN1CALL ASN1Free_SetOfExpectedCapabilities_ElmFn(PSetOfExpectedCapabilities val)
  5468. {
  5469. if (val) {
  5470. ASN1Free_ApplicationInvokeSpecifier_expected_capability_set_Set(&val->value);
  5471. }
  5472. }
  5473. static int ASN1CALL ASN1Enc_SetOfNonCollapsingCapabilities(ASN1encoding_t enc, PSetOfNonCollapsingCapabilities *val)
  5474. {
  5475. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfNonCollapsingCapabilities_ElmFn);
  5476. }
  5477. static int ASN1CALL ASN1Enc_SetOfNonCollapsingCapabilities_ElmFn(ASN1encoding_t enc, PSetOfNonCollapsingCapabilities val)
  5478. {
  5479. if (!ASN1Enc_ApplicationRecord_non_collapsing_capabilities_Set(enc, &val->value))
  5480. return 0;
  5481. return 1;
  5482. }
  5483. static int ASN1CALL ASN1Dec_SetOfNonCollapsingCapabilities(ASN1decoding_t dec, PSetOfNonCollapsingCapabilities *val)
  5484. {
  5485. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfNonCollapsingCapabilities_ElmFn, sizeof(**val));
  5486. }
  5487. static int ASN1CALL ASN1Dec_SetOfNonCollapsingCapabilities_ElmFn(ASN1decoding_t dec, PSetOfNonCollapsingCapabilities val)
  5488. {
  5489. if (!ASN1Dec_ApplicationRecord_non_collapsing_capabilities_Set(dec, &val->value))
  5490. return 0;
  5491. return 1;
  5492. }
  5493. static void ASN1CALL ASN1Free_SetOfNonCollapsingCapabilities(PSetOfNonCollapsingCapabilities *val)
  5494. {
  5495. if (val) {
  5496. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfNonCollapsingCapabilities_ElmFn);
  5497. }
  5498. }
  5499. static void ASN1CALL ASN1Free_SetOfNonCollapsingCapabilities_ElmFn(PSetOfNonCollapsingCapabilities val)
  5500. {
  5501. if (val) {
  5502. ASN1Free_ApplicationRecord_non_collapsing_capabilities_Set(&val->value);
  5503. }
  5504. }
  5505. static int ASN1CALL ASN1Enc_NetworkAddress(ASN1encoding_t enc, NetworkAddress *val)
  5506. {
  5507. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 2))
  5508. return 0;
  5509. switch ((val)->choice) {
  5510. case 1:
  5511. if (!ASN1Enc_AggregateChannel(enc, &(val)->u.aggregated_channel))
  5512. return 0;
  5513. break;
  5514. case 2:
  5515. if (!ASN1Enc_TransportConnectionType(enc, &(val)->u.transport_connection))
  5516. return 0;
  5517. break;
  5518. case 3:
  5519. if (!ASN1Enc_NonStandardParameter(enc, &(val)->u.address_non_standard))
  5520. return 0;
  5521. break;
  5522. default:
  5523. /* impossible */
  5524. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  5525. return 0;
  5526. }
  5527. return 1;
  5528. }
  5529. static int ASN1CALL ASN1Dec_NetworkAddress(ASN1decoding_t dec, NetworkAddress *val)
  5530. {
  5531. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 2))
  5532. return 0;
  5533. switch ((val)->choice) {
  5534. case 1:
  5535. if (!ASN1Dec_AggregateChannel(dec, &(val)->u.aggregated_channel))
  5536. return 0;
  5537. break;
  5538. case 2:
  5539. if (!ASN1Dec_TransportConnectionType(dec, &(val)->u.transport_connection))
  5540. return 0;
  5541. break;
  5542. case 3:
  5543. if (!ASN1Dec_NonStandardParameter(dec, &(val)->u.address_non_standard))
  5544. return 0;
  5545. break;
  5546. case 0:
  5547. /* extension case */
  5548. if (!ASN1PERDecSkipFragmented(dec, 8))
  5549. return 0;
  5550. break;
  5551. default:
  5552. /* impossible */
  5553. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  5554. return 0;
  5555. }
  5556. return 1;
  5557. }
  5558. static void ASN1CALL ASN1Free_NetworkAddress(NetworkAddress *val)
  5559. {
  5560. if (val) {
  5561. switch ((val)->choice) {
  5562. case 1:
  5563. ASN1Free_AggregateChannel(&(val)->u.aggregated_channel);
  5564. break;
  5565. case 2:
  5566. ASN1Free_TransportConnectionType(&(val)->u.transport_connection);
  5567. break;
  5568. case 3:
  5569. ASN1Free_NonStandardParameter(&(val)->u.address_non_standard);
  5570. break;
  5571. }
  5572. }
  5573. }
  5574. static int ASN1CALL ASN1Enc_ChallengeRequestResponse(ASN1encoding_t enc, ChallengeRequestResponse *val)
  5575. {
  5576. if (!ASN1PEREncExtensionBitClear(enc))
  5577. return 0;
  5578. if (!ASN1PEREncBits(enc, 2, (val)->o))
  5579. return 0;
  5580. if ((val)->o[0] & 0x80) {
  5581. if (!ASN1Enc_ChallengeRequest(enc, &(val)->challenge_request))
  5582. return 0;
  5583. }
  5584. if ((val)->o[0] & 0x40) {
  5585. if (!ASN1Enc_ChallengeResponse(enc, &(val)->challenge_response))
  5586. return 0;
  5587. }
  5588. return 1;
  5589. }
  5590. static int ASN1CALL ASN1Dec_ChallengeRequestResponse(ASN1decoding_t dec, ChallengeRequestResponse *val)
  5591. {
  5592. ASN1uint32_t y;
  5593. if (!ASN1PERDecExtensionBit(dec, &y))
  5594. return 0;
  5595. if (!ASN1PERDecExtension(dec, 2, (val)->o))
  5596. return 0;
  5597. if ((val)->o[0] & 0x80) {
  5598. if (!ASN1Dec_ChallengeRequest(dec, &(val)->challenge_request))
  5599. return 0;
  5600. }
  5601. if ((val)->o[0] & 0x40) {
  5602. if (!ASN1Dec_ChallengeResponse(dec, &(val)->challenge_response))
  5603. return 0;
  5604. }
  5605. if (y) {
  5606. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5607. return 0;
  5608. }
  5609. return 1;
  5610. }
  5611. static void ASN1CALL ASN1Free_ChallengeRequestResponse(ChallengeRequestResponse *val)
  5612. {
  5613. if (val) {
  5614. if ((val)->o[0] & 0x80) {
  5615. ASN1Free_ChallengeRequest(&(val)->challenge_request);
  5616. }
  5617. if ((val)->o[0] & 0x40) {
  5618. ASN1Free_ChallengeResponse(&(val)->challenge_response);
  5619. }
  5620. }
  5621. }
  5622. static int ASN1CALL ASN1Enc_SetOfChallengeItems(ASN1encoding_t enc, PSetOfChallengeItems *val)
  5623. {
  5624. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfChallengeItems_ElmFn);
  5625. }
  5626. static int ASN1CALL ASN1Enc_SetOfChallengeItems_ElmFn(ASN1encoding_t enc, PSetOfChallengeItems val)
  5627. {
  5628. if (!ASN1Enc_ChallengeItem(enc, &val->value))
  5629. return 0;
  5630. return 1;
  5631. }
  5632. static int ASN1CALL ASN1Dec_SetOfChallengeItems(ASN1decoding_t dec, PSetOfChallengeItems *val)
  5633. {
  5634. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfChallengeItems_ElmFn, sizeof(**val));
  5635. }
  5636. static int ASN1CALL ASN1Dec_SetOfChallengeItems_ElmFn(ASN1decoding_t dec, PSetOfChallengeItems val)
  5637. {
  5638. if (!ASN1Dec_ChallengeItem(dec, &val->value))
  5639. return 0;
  5640. return 1;
  5641. }
  5642. static void ASN1CALL ASN1Free_SetOfChallengeItems(PSetOfChallengeItems *val)
  5643. {
  5644. if (val) {
  5645. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfChallengeItems_ElmFn);
  5646. }
  5647. }
  5648. static void ASN1CALL ASN1Free_SetOfChallengeItems_ElmFn(PSetOfChallengeItems val)
  5649. {
  5650. if (val) {
  5651. ASN1Free_ChallengeItem(&val->value);
  5652. }
  5653. }
  5654. static int ASN1CALL ASN1Enc_UserData_Set(ASN1encoding_t enc, UserData_Set *val)
  5655. {
  5656. if (!ASN1PEREncBits(enc, 1, (val)->o))
  5657. return 0;
  5658. if (!ASN1Enc_Key(enc, &(val)->key))
  5659. return 0;
  5660. if ((val)->o[0] & 0x80) {
  5661. if (!ASN1PEREncOctetString_NoSize(enc, &(val)->user_data_field))
  5662. return 0;
  5663. }
  5664. return 1;
  5665. }
  5666. static int ASN1CALL ASN1Dec_UserData_Set(ASN1decoding_t dec, UserData_Set *val)
  5667. {
  5668. if (!ASN1PERDecExtension(dec, 1, (val)->o))
  5669. return 0;
  5670. if (!ASN1Dec_Key(dec, &(val)->key))
  5671. return 0;
  5672. if ((val)->o[0] & 0x80) {
  5673. if (!ASN1PERDecOctetString_NoSize(dec, &(val)->user_data_field))
  5674. return 0;
  5675. }
  5676. return 1;
  5677. }
  5678. static void ASN1CALL ASN1Free_UserData_Set(UserData_Set *val)
  5679. {
  5680. if (val) {
  5681. ASN1Free_Key(&(val)->key);
  5682. if ((val)->o[0] & 0x80) {
  5683. ASN1octetstring_free(&(val)->user_data_field);
  5684. }
  5685. }
  5686. }
  5687. static int ASN1CALL ASN1Enc_SetOfUserData(ASN1encoding_t enc, PSetOfUserData *val)
  5688. {
  5689. return ASN1PEREncSeqOf_NoSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfUserData_ElmFn);
  5690. }
  5691. static int ASN1CALL ASN1Enc_SetOfUserData_ElmFn(ASN1encoding_t enc, PSetOfUserData val)
  5692. {
  5693. if (!ASN1Enc_UserData_Set(enc, &val->user_data_element))
  5694. return 0;
  5695. return 1;
  5696. }
  5697. static int ASN1CALL ASN1Dec_SetOfUserData(ASN1decoding_t dec, PSetOfUserData *val)
  5698. {
  5699. return ASN1PERDecSeqOf_NoSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfUserData_ElmFn, sizeof(**val));
  5700. }
  5701. static int ASN1CALL ASN1Dec_SetOfUserData_ElmFn(ASN1decoding_t dec, PSetOfUserData val)
  5702. {
  5703. if (!ASN1Dec_UserData_Set(dec, &val->user_data_element))
  5704. return 0;
  5705. return 1;
  5706. }
  5707. static void ASN1CALL ASN1Free_SetOfUserData(PSetOfUserData *val)
  5708. {
  5709. if (val) {
  5710. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfUserData_ElmFn);
  5711. }
  5712. }
  5713. static void ASN1CALL ASN1Free_SetOfUserData_ElmFn(PSetOfUserData val)
  5714. {
  5715. if (val) {
  5716. ASN1Free_UserData_Set(&val->user_data_element);
  5717. }
  5718. }
  5719. static int ASN1CALL ASN1Enc_PasswordChallengeRequestResponse(ASN1encoding_t enc, PasswordChallengeRequestResponse *val)
  5720. {
  5721. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 1))
  5722. return 0;
  5723. switch ((val)->choice) {
  5724. case 1:
  5725. if (!ASN1Enc_PasswordSelector(enc, &(val)->u.challenge_clear_password))
  5726. return 0;
  5727. break;
  5728. case 2:
  5729. if (!ASN1Enc_ChallengeRequestResponse(enc, &(val)->u.challenge_request_response))
  5730. return 0;
  5731. break;
  5732. default:
  5733. /* impossible */
  5734. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  5735. return 0;
  5736. }
  5737. return 1;
  5738. }
  5739. static int ASN1CALL ASN1Dec_PasswordChallengeRequestResponse(ASN1decoding_t dec, PasswordChallengeRequestResponse *val)
  5740. {
  5741. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 1))
  5742. return 0;
  5743. switch ((val)->choice) {
  5744. case 1:
  5745. if (!ASN1Dec_PasswordSelector(dec, &(val)->u.challenge_clear_password))
  5746. return 0;
  5747. break;
  5748. case 2:
  5749. if (!ASN1Dec_ChallengeRequestResponse(dec, &(val)->u.challenge_request_response))
  5750. return 0;
  5751. break;
  5752. case 0:
  5753. /* extension case */
  5754. if (!ASN1PERDecSkipFragmented(dec, 8))
  5755. return 0;
  5756. break;
  5757. default:
  5758. /* impossible */
  5759. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  5760. return 0;
  5761. }
  5762. return 1;
  5763. }
  5764. static void ASN1CALL ASN1Free_PasswordChallengeRequestResponse(PasswordChallengeRequestResponse *val)
  5765. {
  5766. if (val) {
  5767. switch ((val)->choice) {
  5768. case 1:
  5769. ASN1Free_PasswordSelector(&(val)->u.challenge_clear_password);
  5770. break;
  5771. case 2:
  5772. ASN1Free_ChallengeRequestResponse(&(val)->u.challenge_request_response);
  5773. break;
  5774. }
  5775. }
  5776. }
  5777. static int ASN1CALL ASN1Enc_SetOfNetworkAddresses(ASN1encoding_t enc, PSetOfNetworkAddresses *val)
  5778. {
  5779. return ASN1PEREncSeqOf_VarSize(enc, (ASN1iterator_t **) val, (ASN1iterator_encfn) ASN1Enc_SetOfNetworkAddresses_ElmFn, 1, 64, 6);
  5780. }
  5781. static int ASN1CALL ASN1Enc_SetOfNetworkAddresses_ElmFn(ASN1encoding_t enc, PSetOfNetworkAddresses val)
  5782. {
  5783. if (!ASN1Enc_NetworkAddress(enc, &val->value))
  5784. return 0;
  5785. return 1;
  5786. }
  5787. static int ASN1CALL ASN1Dec_SetOfNetworkAddresses(ASN1decoding_t dec, PSetOfNetworkAddresses *val)
  5788. {
  5789. return ASN1PERDecSeqOf_VarSize(dec, (ASN1iterator_t **) val, (ASN1iterator_decfn) ASN1Dec_SetOfNetworkAddresses_ElmFn, sizeof(**val), 1, 64, 6);
  5790. }
  5791. static int ASN1CALL ASN1Dec_SetOfNetworkAddresses_ElmFn(ASN1decoding_t dec, PSetOfNetworkAddresses val)
  5792. {
  5793. if (!ASN1Dec_NetworkAddress(dec, &val->value))
  5794. return 0;
  5795. return 1;
  5796. }
  5797. static void ASN1CALL ASN1Free_SetOfNetworkAddresses(PSetOfNetworkAddresses *val)
  5798. {
  5799. if (val) {
  5800. ASN1PERFreeSeqOf((ASN1iterator_t **) val, (ASN1iterator_freefn) ASN1Free_SetOfNetworkAddresses_ElmFn);
  5801. }
  5802. }
  5803. static void ASN1CALL ASN1Free_SetOfNetworkAddresses_ElmFn(PSetOfNetworkAddresses val)
  5804. {
  5805. if (val) {
  5806. ASN1Free_NetworkAddress(&val->value);
  5807. }
  5808. }
  5809. static ASN1stringtableentry_t ConferenceJoinRequest_cjrq_conference_modifier_StringTableEntries[] = {
  5810. { 48, 57, 0 },
  5811. };
  5812. static ASN1stringtable_t ConferenceJoinRequest_cjrq_conference_modifier_StringTable = {
  5813. 1, ConferenceJoinRequest_cjrq_conference_modifier_StringTableEntries
  5814. };
  5815. static int ASN1CALL ASN1Enc_ConferenceJoinRequest(ASN1encoding_t enc, ConferenceJoinRequest *val)
  5816. {
  5817. ASN1uint32_t t;
  5818. if (!ASN1PEREncExtensionBitClear(enc))
  5819. return 0;
  5820. if (!ASN1PEREncBits(enc, 7, (val)->o))
  5821. return 0;
  5822. if ((val)->o[0] & 0x80) {
  5823. if (!ASN1Enc_ConferenceNameSelector(enc, &(val)->conference_name))
  5824. return 0;
  5825. }
  5826. if ((val)->o[0] & 0x40) {
  5827. t = lstrlenA((val)->cjrq_conference_modifier);
  5828. if (!ASN1PEREncBitVal(enc, 8, t - 1))
  5829. return 0;
  5830. ASN1PEREncAlignment(enc);
  5831. if (!ASN1PEREncTableCharString(enc, t, (val)->cjrq_conference_modifier, 4, &ConferenceJoinRequest_cjrq_conference_modifier_StringTable))
  5832. return 0;
  5833. }
  5834. if ((val)->o[0] & 0x20) {
  5835. #ifndef _WIN64
  5836. if (!ASN1PEREncInteger(enc, (val)->tag))
  5837. return 0;
  5838. #endif
  5839. }
  5840. if ((val)->o[0] & 0x10) {
  5841. if (!ASN1Enc_PasswordChallengeRequestResponse(enc, &(val)->cjrq_password))
  5842. return 0;
  5843. }
  5844. if ((val)->o[0] & 0x8) {
  5845. if (!ASN1Enc_PasswordSelector(enc, &(val)->cjrq_convener_password))
  5846. return 0;
  5847. }
  5848. if ((val)->o[0] & 0x4) {
  5849. ASN1PEREncAlignment(enc);
  5850. if (!ASN1PEREncBitVal(enc, 8, ((val)->cjrq_caller_id).length))
  5851. return 0;
  5852. if (!ASN1PEREncChar16String(enc, ((val)->cjrq_caller_id).length, ((val)->cjrq_caller_id).value, 16))
  5853. return 0;
  5854. }
  5855. if ((val)->o[0] & 0x2) {
  5856. if (!ASN1Enc_SetOfUserData(enc, &(val)->cjrq_user_data))
  5857. return 0;
  5858. }
  5859. return 1;
  5860. }
  5861. static int ASN1CALL ASN1Dec_ConferenceJoinRequest(ASN1decoding_t dec, ConferenceJoinRequest *val)
  5862. {
  5863. ASN1uint32_t y;
  5864. ASN1uint32_t l;
  5865. if (!ASN1PERDecExtensionBit(dec, &y))
  5866. return 0;
  5867. if (!ASN1PERDecExtension(dec, 7, (val)->o))
  5868. return 0;
  5869. if ((val)->o[0] & 0x80) {
  5870. if (!ASN1Dec_ConferenceNameSelector(dec, &(val)->conference_name))
  5871. return 0;
  5872. }
  5873. if ((val)->o[0] & 0x40) {
  5874. if (!ASN1PERDecU32Val(dec, 8, &l))
  5875. return 0;
  5876. l += 1;
  5877. ASN1PERDecAlignment(dec);
  5878. if (!ASN1PERDecZeroTableCharStringNoAlloc(dec, l, (val)->cjrq_conference_modifier, 4, &ConferenceJoinRequest_cjrq_conference_modifier_StringTable))
  5879. return 0;
  5880. }
  5881. if ((val)->o[0] & 0x20) {
  5882. #ifndef _WIN64
  5883. if (!ASN1PERDecInteger(dec, &(val)->tag))
  5884. return 0;
  5885. #endif
  5886. }
  5887. if ((val)->o[0] & 0x10) {
  5888. if (!ASN1Dec_PasswordChallengeRequestResponse(dec, &(val)->cjrq_password))
  5889. return 0;
  5890. }
  5891. if ((val)->o[0] & 0x8) {
  5892. if (!ASN1Dec_PasswordSelector(dec, &(val)->cjrq_convener_password))
  5893. return 0;
  5894. }
  5895. if ((val)->o[0] & 0x4) {
  5896. ASN1PERDecAlignment(dec);
  5897. if (!ASN1PERDecU32Val(dec, 8, &((val)->cjrq_caller_id).length))
  5898. return 0;
  5899. if (!ASN1PERDecChar16String(dec, ((val)->cjrq_caller_id).length, &((val)->cjrq_caller_id).value, 16))
  5900. return 0;
  5901. }
  5902. if ((val)->o[0] & 0x2) {
  5903. if (!ASN1Dec_SetOfUserData(dec, &(val)->cjrq_user_data))
  5904. return 0;
  5905. }
  5906. if (y) {
  5907. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  5908. return 0;
  5909. }
  5910. return 1;
  5911. }
  5912. static void ASN1CALL ASN1Free_ConferenceJoinRequest(ConferenceJoinRequest *val)
  5913. {
  5914. if (val) {
  5915. if ((val)->o[0] & 0x80) {
  5916. ASN1Free_ConferenceNameSelector(&(val)->conference_name);
  5917. }
  5918. if ((val)->o[0] & 0x40) {
  5919. }
  5920. if ((val)->o[0] & 0x10) {
  5921. ASN1Free_PasswordChallengeRequestResponse(&(val)->cjrq_password);
  5922. }
  5923. if ((val)->o[0] & 0x8) {
  5924. ASN1Free_PasswordSelector(&(val)->cjrq_convener_password);
  5925. }
  5926. if ((val)->o[0] & 0x4) {
  5927. ASN1char16string_free(&(val)->cjrq_caller_id);
  5928. }
  5929. if ((val)->o[0] & 0x2) {
  5930. ASN1Free_SetOfUserData(&(val)->cjrq_user_data);
  5931. }
  5932. }
  5933. }
  5934. static int ASN1CALL ASN1Enc_ConferenceJoinResponse(ASN1encoding_t enc, ConferenceJoinResponse *val)
  5935. {
  5936. if (!ASN1PEREncExtensionBitClear(enc))
  5937. return 0;
  5938. if (!ASN1PEREncBits(enc, 8, (val)->o))
  5939. return 0;
  5940. if ((val)->o[0] & 0x80) {
  5941. if (!ASN1PEREncUnsignedShort(enc, (val)->cjrs_node_id - 1001))
  5942. return 0;
  5943. }
  5944. if (!ASN1PEREncUnsignedShort(enc, (val)->top_node_id - 1001))
  5945. return 0;
  5946. #ifndef _WIN64
  5947. if (!ASN1PEREncInteger(enc, (val)->tag))
  5948. return 0;
  5949. #endif
  5950. if ((val)->o[0] & 0x40) {
  5951. if (!ASN1Enc_ConferenceNameSelector(enc, &(val)->conference_name_alias))
  5952. return 0;
  5953. }
  5954. if (!ASN1PEREncBoolean(enc, (val)->clear_password_required))
  5955. return 0;
  5956. if (!ASN1PEREncBoolean(enc, (val)->conference_is_locked))
  5957. return 0;
  5958. if (!ASN1PEREncBoolean(enc, (val)->conference_is_listed))
  5959. return 0;
  5960. if (!ASN1PEREncBoolean(enc, (val)->conference_is_conductible))
  5961. return 0;
  5962. if (!ASN1PEREncExtensionBitClear(enc))
  5963. return 0;
  5964. if (!ASN1PEREncBitVal(enc, 1, (val)->termination_method))
  5965. return 0;
  5966. if ((val)->o[0] & 0x20) {
  5967. if (!ASN1Enc_SetOfPrivileges(enc, &(val)->cjrs_conductor_privs))
  5968. return 0;
  5969. }
  5970. if ((val)->o[0] & 0x10) {
  5971. if (!ASN1Enc_SetOfPrivileges(enc, &(val)->cjrs_conducted_privs))
  5972. return 0;
  5973. }
  5974. if ((val)->o[0] & 0x8) {
  5975. if (!ASN1Enc_SetOfPrivileges(enc, &(val)->cjrs_non_conducted_privs))
  5976. return 0;
  5977. }
  5978. if ((val)->o[0] & 0x4) {
  5979. ASN1PEREncAlignment(enc);
  5980. if (!ASN1PEREncBitVal(enc, 8, ((val)->cjrs_description).length))
  5981. return 0;
  5982. if (!ASN1PEREncChar16String(enc, ((val)->cjrs_description).length, ((val)->cjrs_description).value, 16))
  5983. return 0;
  5984. }
  5985. if ((val)->o[0] & 0x2) {
  5986. if (!ASN1Enc_PasswordChallengeRequestResponse(enc, &(val)->cjrs_password))
  5987. return 0;
  5988. }
  5989. if (!ASN1PEREncExtensionBitClear(enc))
  5990. return 0;
  5991. if (!ASN1PEREncBitVal(enc, 3, (val)->result))
  5992. return 0;
  5993. if ((val)->o[0] & 0x1) {
  5994. if (!ASN1Enc_SetOfUserData(enc, &(val)->cjrs_user_data))
  5995. return 0;
  5996. }
  5997. return 1;
  5998. }
  5999. static int ASN1CALL ASN1Dec_ConferenceJoinResponse(ASN1decoding_t dec, ConferenceJoinResponse *val)
  6000. {
  6001. ASN1uint32_t y;
  6002. ASN1uint32_t x;
  6003. if (!ASN1PERDecExtensionBit(dec, &y))
  6004. return 0;
  6005. if (!ASN1PERDecExtension(dec, 8, (val)->o))
  6006. return 0;
  6007. if ((val)->o[0] & 0x80) {
  6008. if (!ASN1PERDecUnsignedShort(dec, &(val)->cjrs_node_id))
  6009. return 0;
  6010. (val)->cjrs_node_id += 1001;
  6011. }
  6012. if (!ASN1PERDecUnsignedShort(dec, &(val)->top_node_id))
  6013. return 0;
  6014. (val)->top_node_id += 1001;
  6015. #ifndef _WIN64
  6016. if (!ASN1PERDecInteger(dec, &(val)->tag))
  6017. return 0;
  6018. #endif
  6019. if ((val)->o[0] & 0x40) {
  6020. if (!ASN1Dec_ConferenceNameSelector(dec, &(val)->conference_name_alias))
  6021. return 0;
  6022. }
  6023. if (!ASN1PERDecBoolean(dec, &(val)->clear_password_required))
  6024. return 0;
  6025. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_locked))
  6026. return 0;
  6027. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_listed))
  6028. return 0;
  6029. if (!ASN1PERDecBoolean(dec, &(val)->conference_is_conductible))
  6030. return 0;
  6031. if (!ASN1PERDecExtensionBit(dec, &x))
  6032. return 0;
  6033. if (!x) {
  6034. if (!ASN1PERDecU32Val(dec, 1, (ASN1uint32_t *) &(val)->termination_method))
  6035. return 0;
  6036. } else {
  6037. if (!ASN1PERDecSkipNormallySmall(dec))
  6038. return 0;
  6039. }
  6040. if ((val)->o[0] & 0x20) {
  6041. if (!ASN1Dec_SetOfPrivileges(dec, &(val)->cjrs_conductor_privs))
  6042. return 0;
  6043. }
  6044. if ((val)->o[0] & 0x10) {
  6045. if (!ASN1Dec_SetOfPrivileges(dec, &(val)->cjrs_conducted_privs))
  6046. return 0;
  6047. }
  6048. if ((val)->o[0] & 0x8) {
  6049. if (!ASN1Dec_SetOfPrivileges(dec, &(val)->cjrs_non_conducted_privs))
  6050. return 0;
  6051. }
  6052. if ((val)->o[0] & 0x4) {
  6053. ASN1PERDecAlignment(dec);
  6054. if (!ASN1PERDecU32Val(dec, 8, &((val)->cjrs_description).length))
  6055. return 0;
  6056. if (!ASN1PERDecChar16String(dec, ((val)->cjrs_description).length, &((val)->cjrs_description).value, 16))
  6057. return 0;
  6058. }
  6059. if ((val)->o[0] & 0x2) {
  6060. if (!ASN1Dec_PasswordChallengeRequestResponse(dec, &(val)->cjrs_password))
  6061. return 0;
  6062. }
  6063. if (!ASN1PERDecExtensionBit(dec, &x))
  6064. return 0;
  6065. if (!x) {
  6066. if (!ASN1PERDecU32Val(dec, 3, (ASN1uint32_t *) &(val)->result))
  6067. return 0;
  6068. } else {
  6069. if (!ASN1PERDecSkipNormallySmall(dec))
  6070. return 0;
  6071. }
  6072. if ((val)->o[0] & 0x1) {
  6073. if (!ASN1Dec_SetOfUserData(dec, &(val)->cjrs_user_data))
  6074. return 0;
  6075. }
  6076. if (y) {
  6077. if (!ASN1PERDecSkipNormallySmallExtensionFragmented(dec))
  6078. return 0;
  6079. }
  6080. return 1;
  6081. }
  6082. static void ASN1CALL ASN1Free_ConferenceJoinResponse(ConferenceJoinResponse *val)
  6083. {
  6084. if (val) {
  6085. if ((val)->o[0] & 0x40) {
  6086. ASN1Free_ConferenceNameSelector(&(val)->conference_name_alias);
  6087. }
  6088. if ((val)->o[0] & 0x20) {
  6089. ASN1Free_SetOfPrivileges(&(val)->cjrs_conductor_privs);
  6090. }
  6091. if ((val)->o[0] & 0x10) {
  6092. ASN1Free_SetOfPrivileges(&(val)->cjrs_conducted_privs);
  6093. }
  6094. if ((val)->o[0] & 0x8) {
  6095. ASN1Free_SetOfPrivileges(&(val)->cjrs_non_conducted_privs);
  6096. }
  6097. if ((val)->o[0] & 0x4) {
  6098. ASN1char16string_free(&(val)->cjrs_description);
  6099. }
  6100. if ((val)->o[0] & 0x2) {
  6101. ASN1Free_PasswordChallengeRequestResponse(&(val)->cjrs_password);
  6102. }
  6103. if ((val)->o[0] & 0x1) {
  6104. ASN1Free_SetOfUserData(&(val)->cjrs_user_data);
  6105. }
  6106. }
  6107. }
  6108. static int ASN1CALL ASN1Enc_ConnectGCCPDU(ASN1encoding_t enc, ConnectGCCPDU *val)
  6109. {
  6110. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 3))
  6111. return 0;
  6112. switch ((val)->choice) {
  6113. case 1:
  6114. if (!ASN1Enc_ConferenceCreateRequest(enc, &(val)->u.conference_create_request))
  6115. return 0;
  6116. break;
  6117. case 2:
  6118. if (!ASN1Enc_ConferenceCreateResponse(enc, &(val)->u.conference_create_response))
  6119. return 0;
  6120. break;
  6121. case 3:
  6122. if (!ASN1Enc_ConferenceQueryRequest(enc, &(val)->u.conference_query_request))
  6123. return 0;
  6124. break;
  6125. case 4:
  6126. if (!ASN1Enc_ConferenceQueryResponse(enc, &(val)->u.conference_query_response))
  6127. return 0;
  6128. break;
  6129. case 5:
  6130. if (!ASN1Enc_ConferenceJoinRequest(enc, &(val)->u.connect_join_request))
  6131. return 0;
  6132. break;
  6133. case 6:
  6134. if (!ASN1Enc_ConferenceJoinResponse(enc, &(val)->u.connect_join_response))
  6135. return 0;
  6136. break;
  6137. case 7:
  6138. if (!ASN1Enc_ConferenceInviteRequest(enc, &(val)->u.conference_invite_request))
  6139. return 0;
  6140. break;
  6141. case 8:
  6142. if (!ASN1Enc_ConferenceInviteResponse(enc, &(val)->u.conference_invite_response))
  6143. return 0;
  6144. break;
  6145. default:
  6146. /* impossible */
  6147. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  6148. return 0;
  6149. }
  6150. return 1;
  6151. }
  6152. static int ASN1CALL ASN1Dec_ConnectGCCPDU(ASN1decoding_t dec, ConnectGCCPDU *val)
  6153. {
  6154. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 3))
  6155. return 0;
  6156. switch ((val)->choice) {
  6157. case 1:
  6158. if (!ASN1Dec_ConferenceCreateRequest(dec, &(val)->u.conference_create_request))
  6159. return 0;
  6160. break;
  6161. case 2:
  6162. if (!ASN1Dec_ConferenceCreateResponse(dec, &(val)->u.conference_create_response))
  6163. return 0;
  6164. break;
  6165. case 3:
  6166. if (!ASN1Dec_ConferenceQueryRequest(dec, &(val)->u.conference_query_request))
  6167. return 0;
  6168. break;
  6169. case 4:
  6170. if (!ASN1Dec_ConferenceQueryResponse(dec, &(val)->u.conference_query_response))
  6171. return 0;
  6172. break;
  6173. case 5:
  6174. if (!ASN1Dec_ConferenceJoinRequest(dec, &(val)->u.connect_join_request))
  6175. return 0;
  6176. break;
  6177. case 6:
  6178. if (!ASN1Dec_ConferenceJoinResponse(dec, &(val)->u.connect_join_response))
  6179. return 0;
  6180. break;
  6181. case 7:
  6182. if (!ASN1Dec_ConferenceInviteRequest(dec, &(val)->u.conference_invite_request))
  6183. return 0;
  6184. break;
  6185. case 8:
  6186. if (!ASN1Dec_ConferenceInviteResponse(dec, &(val)->u.conference_invite_response))
  6187. return 0;
  6188. break;
  6189. case 0:
  6190. /* extension case */
  6191. if (!ASN1PERDecSkipFragmented(dec, 8))
  6192. return 0;
  6193. break;
  6194. default:
  6195. /* impossible */
  6196. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  6197. return 0;
  6198. }
  6199. return 1;
  6200. }
  6201. static void ASN1CALL ASN1Free_ConnectGCCPDU(ConnectGCCPDU *val)
  6202. {
  6203. if (val) {
  6204. switch ((val)->choice) {
  6205. case 1:
  6206. ASN1Free_ConferenceCreateRequest(&(val)->u.conference_create_request);
  6207. break;
  6208. case 2:
  6209. ASN1Free_ConferenceCreateResponse(&(val)->u.conference_create_response);
  6210. break;
  6211. case 3:
  6212. ASN1Free_ConferenceQueryRequest(&(val)->u.conference_query_request);
  6213. break;
  6214. case 4:
  6215. ASN1Free_ConferenceQueryResponse(&(val)->u.conference_query_response);
  6216. break;
  6217. case 5:
  6218. ASN1Free_ConferenceJoinRequest(&(val)->u.connect_join_request);
  6219. break;
  6220. case 6:
  6221. ASN1Free_ConferenceJoinResponse(&(val)->u.connect_join_response);
  6222. break;
  6223. case 7:
  6224. ASN1Free_ConferenceInviteRequest(&(val)->u.conference_invite_request);
  6225. break;
  6226. case 8:
  6227. ASN1Free_ConferenceInviteResponse(&(val)->u.conference_invite_response);
  6228. break;
  6229. }
  6230. }
  6231. }
  6232. static int ASN1CALL ASN1Enc_RequestPDU(ASN1encoding_t enc, RequestPDU *val)
  6233. {
  6234. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 4))
  6235. return 0;
  6236. switch ((val)->choice) {
  6237. case 1:
  6238. if (!ASN1Enc_ConferenceJoinRequest(enc, &(val)->u.conference_join_request))
  6239. return 0;
  6240. break;
  6241. case 2:
  6242. if (!ASN1Enc_ConferenceAddRequest(enc, &(val)->u.conference_add_request))
  6243. return 0;
  6244. break;
  6245. case 3:
  6246. if (!ASN1Enc_ConferenceLockRequest(enc, &(val)->u.conference_lock_request))
  6247. return 0;
  6248. break;
  6249. case 4:
  6250. if (!ASN1Enc_ConferenceUnlockRequest(enc, &(val)->u.conference_unlock_request))
  6251. return 0;
  6252. break;
  6253. case 5:
  6254. if (!ASN1Enc_ConferenceTerminateRequest(enc, &(val)->u.conference_terminate_request))
  6255. return 0;
  6256. break;
  6257. case 6:
  6258. if (!ASN1Enc_ConferenceEjectUserRequest(enc, &(val)->u.conference_eject_user_request))
  6259. return 0;
  6260. break;
  6261. case 7:
  6262. if (!ASN1Enc_ConferenceTransferRequest(enc, &(val)->u.conference_transfer_request))
  6263. return 0;
  6264. break;
  6265. case 8:
  6266. if (!ASN1Enc_RegistryRegisterChannelRequest(enc, &(val)->u.registry_register_channel_request))
  6267. return 0;
  6268. break;
  6269. case 9:
  6270. if (!ASN1Enc_RegistryAssignTokenRequest(enc, &(val)->u.registry_assign_token_request))
  6271. return 0;
  6272. break;
  6273. case 10:
  6274. if (!ASN1Enc_RegistrySetParameterRequest(enc, &(val)->u.registry_set_parameter_request))
  6275. return 0;
  6276. break;
  6277. case 11:
  6278. if (!ASN1Enc_RegistryRetrieveEntryRequest(enc, &(val)->u.registry_retrieve_entry_request))
  6279. return 0;
  6280. break;
  6281. case 12:
  6282. if (!ASN1Enc_RegistryDeleteEntryRequest(enc, &(val)->u.registry_delete_entry_request))
  6283. return 0;
  6284. break;
  6285. case 13:
  6286. if (!ASN1Enc_RegistryMonitorEntryRequest(enc, &(val)->u.registry_monitor_entry_request))
  6287. return 0;
  6288. break;
  6289. case 14:
  6290. if (!ASN1Enc_RegistryAllocateHandleRequest(enc, &(val)->u.registry_allocate_handle_request))
  6291. return 0;
  6292. break;
  6293. case 15:
  6294. if (!ASN1Enc_NonStandardPDU(enc, &(val)->u.non_standard_request))
  6295. return 0;
  6296. break;
  6297. default:
  6298. /* impossible */
  6299. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  6300. return 0;
  6301. }
  6302. return 1;
  6303. }
  6304. static int ASN1CALL ASN1Dec_RequestPDU(ASN1decoding_t dec, RequestPDU *val)
  6305. {
  6306. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 4))
  6307. return 0;
  6308. switch ((val)->choice) {
  6309. case 1:
  6310. if (!ASN1Dec_ConferenceJoinRequest(dec, &(val)->u.conference_join_request))
  6311. return 0;
  6312. break;
  6313. case 2:
  6314. if (!ASN1Dec_ConferenceAddRequest(dec, &(val)->u.conference_add_request))
  6315. return 0;
  6316. break;
  6317. case 3:
  6318. if (!ASN1Dec_ConferenceLockRequest(dec, &(val)->u.conference_lock_request))
  6319. return 0;
  6320. break;
  6321. case 4:
  6322. if (!ASN1Dec_ConferenceUnlockRequest(dec, &(val)->u.conference_unlock_request))
  6323. return 0;
  6324. break;
  6325. case 5:
  6326. if (!ASN1Dec_ConferenceTerminateRequest(dec, &(val)->u.conference_terminate_request))
  6327. return 0;
  6328. break;
  6329. case 6:
  6330. if (!ASN1Dec_ConferenceEjectUserRequest(dec, &(val)->u.conference_eject_user_request))
  6331. return 0;
  6332. break;
  6333. case 7:
  6334. if (!ASN1Dec_ConferenceTransferRequest(dec, &(val)->u.conference_transfer_request))
  6335. return 0;
  6336. break;
  6337. case 8:
  6338. if (!ASN1Dec_RegistryRegisterChannelRequest(dec, &(val)->u.registry_register_channel_request))
  6339. return 0;
  6340. break;
  6341. case 9:
  6342. if (!ASN1Dec_RegistryAssignTokenRequest(dec, &(val)->u.registry_assign_token_request))
  6343. return 0;
  6344. break;
  6345. case 10:
  6346. if (!ASN1Dec_RegistrySetParameterRequest(dec, &(val)->u.registry_set_parameter_request))
  6347. return 0;
  6348. break;
  6349. case 11:
  6350. if (!ASN1Dec_RegistryRetrieveEntryRequest(dec, &(val)->u.registry_retrieve_entry_request))
  6351. return 0;
  6352. break;
  6353. case 12:
  6354. if (!ASN1Dec_RegistryDeleteEntryRequest(dec, &(val)->u.registry_delete_entry_request))
  6355. return 0;
  6356. break;
  6357. case 13:
  6358. if (!ASN1Dec_RegistryMonitorEntryRequest(dec, &(val)->u.registry_monitor_entry_request))
  6359. return 0;
  6360. break;
  6361. case 14:
  6362. if (!ASN1Dec_RegistryAllocateHandleRequest(dec, &(val)->u.registry_allocate_handle_request))
  6363. return 0;
  6364. break;
  6365. case 15:
  6366. if (!ASN1Dec_NonStandardPDU(dec, &(val)->u.non_standard_request))
  6367. return 0;
  6368. break;
  6369. case 0:
  6370. /* extension case */
  6371. if (!ASN1PERDecSkipFragmented(dec, 8))
  6372. return 0;
  6373. break;
  6374. default:
  6375. /* impossible */
  6376. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  6377. return 0;
  6378. }
  6379. return 1;
  6380. }
  6381. static void ASN1CALL ASN1Free_RequestPDU(RequestPDU *val)
  6382. {
  6383. if (val) {
  6384. switch ((val)->choice) {
  6385. case 1:
  6386. ASN1Free_ConferenceJoinRequest(&(val)->u.conference_join_request);
  6387. break;
  6388. case 2:
  6389. ASN1Free_ConferenceAddRequest(&(val)->u.conference_add_request);
  6390. break;
  6391. case 7:
  6392. ASN1Free_ConferenceTransferRequest(&(val)->u.conference_transfer_request);
  6393. break;
  6394. case 8:
  6395. ASN1Free_RegistryRegisterChannelRequest(&(val)->u.registry_register_channel_request);
  6396. break;
  6397. case 9:
  6398. ASN1Free_RegistryAssignTokenRequest(&(val)->u.registry_assign_token_request);
  6399. break;
  6400. case 10:
  6401. ASN1Free_RegistrySetParameterRequest(&(val)->u.registry_set_parameter_request);
  6402. break;
  6403. case 11:
  6404. ASN1Free_RegistryRetrieveEntryRequest(&(val)->u.registry_retrieve_entry_request);
  6405. break;
  6406. case 12:
  6407. ASN1Free_RegistryDeleteEntryRequest(&(val)->u.registry_delete_entry_request);
  6408. break;
  6409. case 13:
  6410. ASN1Free_RegistryMonitorEntryRequest(&(val)->u.registry_monitor_entry_request);
  6411. break;
  6412. case 15:
  6413. ASN1Free_NonStandardPDU(&(val)->u.non_standard_request);
  6414. break;
  6415. }
  6416. }
  6417. }
  6418. static int ASN1CALL ASN1Enc_FunctionNotSupportedResponse(ASN1encoding_t enc, FunctionNotSupportedResponse *val)
  6419. {
  6420. if (!ASN1Enc_RequestPDU(enc, &(val)->request))
  6421. return 0;
  6422. return 1;
  6423. }
  6424. static int ASN1CALL ASN1Dec_FunctionNotSupportedResponse(ASN1decoding_t dec, FunctionNotSupportedResponse *val)
  6425. {
  6426. if (!ASN1Dec_RequestPDU(dec, &(val)->request))
  6427. return 0;
  6428. return 1;
  6429. }
  6430. static void ASN1CALL ASN1Free_FunctionNotSupportedResponse(FunctionNotSupportedResponse *val)
  6431. {
  6432. if (val) {
  6433. ASN1Free_RequestPDU(&(val)->request);
  6434. }
  6435. }
  6436. static int ASN1CALL ASN1Enc_ResponsePDU(ASN1encoding_t enc, ResponsePDU *val)
  6437. {
  6438. if (!ASN1PEREncSimpleChoiceEx(enc, (val)->choice, 4))
  6439. return 0;
  6440. switch ((val)->choice) {
  6441. case 1:
  6442. if (!ASN1Enc_ConferenceJoinResponse(enc, &(val)->u.conference_join_response))
  6443. return 0;
  6444. break;
  6445. case 2:
  6446. if (!ASN1Enc_ConferenceAddResponse(enc, &(val)->u.conference_add_response))
  6447. return 0;
  6448. break;
  6449. case 3:
  6450. if (!ASN1Enc_ConferenceLockResponse(enc, &(val)->u.conference_lock_response))
  6451. return 0;
  6452. break;
  6453. case 4:
  6454. if (!ASN1Enc_ConferenceUnlockResponse(enc, &(val)->u.conference_unlock_response))
  6455. return 0;
  6456. break;
  6457. case 5:
  6458. if (!ASN1Enc_ConferenceTerminateResponse(enc, &(val)->u.conference_terminate_response))
  6459. return 0;
  6460. break;
  6461. case 6:
  6462. if (!ASN1Enc_ConferenceEjectUserResponse(enc, &(val)->u.conference_eject_user_response))
  6463. return 0;
  6464. break;
  6465. case 7:
  6466. if (!ASN1Enc_ConferenceTransferResponse(enc, &(val)->u.conference_transfer_response))
  6467. return 0;
  6468. break;
  6469. case 8:
  6470. if (!ASN1Enc_RegistryResponse(enc, &(val)->u.registry_response))
  6471. return 0;
  6472. break;
  6473. case 9:
  6474. if (!ASN1Enc_RegistryAllocateHandleResponse(enc, &(val)->u.registry_allocate_handle_response))
  6475. return 0;
  6476. break;
  6477. case 10:
  6478. if (!ASN1Enc_FunctionNotSupportedResponse(enc, &(val)->u.function_not_supported_response))
  6479. return 0;
  6480. break;
  6481. case 11:
  6482. if (!ASN1Enc_NonStandardPDU(enc, &(val)->u.non_standard_response))
  6483. return 0;
  6484. break;
  6485. default:
  6486. /* impossible */
  6487. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  6488. return 0;
  6489. }
  6490. return 1;
  6491. }
  6492. static int ASN1CALL ASN1Dec_ResponsePDU(ASN1decoding_t dec, ResponsePDU *val)
  6493. {
  6494. if (!ASN1PERDecSimpleChoiceEx(dec, &(val)->choice, 4))
  6495. return 0;
  6496. switch ((val)->choice) {
  6497. case 1:
  6498. if (!ASN1Dec_ConferenceJoinResponse(dec, &(val)->u.conference_join_response))
  6499. return 0;
  6500. break;
  6501. case 2:
  6502. if (!ASN1Dec_ConferenceAddResponse(dec, &(val)->u.conference_add_response))
  6503. return 0;
  6504. break;
  6505. case 3:
  6506. if (!ASN1Dec_ConferenceLockResponse(dec, &(val)->u.conference_lock_response))
  6507. return 0;
  6508. break;
  6509. case 4:
  6510. if (!ASN1Dec_ConferenceUnlockResponse(dec, &(val)->u.conference_unlock_response))
  6511. return 0;
  6512. break;
  6513. case 5:
  6514. if (!ASN1Dec_ConferenceTerminateResponse(dec, &(val)->u.conference_terminate_response))
  6515. return 0;
  6516. break;
  6517. case 6:
  6518. if (!ASN1Dec_ConferenceEjectUserResponse(dec, &(val)->u.conference_eject_user_response))
  6519. return 0;
  6520. break;
  6521. case 7:
  6522. if (!ASN1Dec_ConferenceTransferResponse(dec, &(val)->u.conference_transfer_response))
  6523. return 0;
  6524. break;
  6525. case 8:
  6526. if (!ASN1Dec_RegistryResponse(dec, &(val)->u.registry_response))
  6527. return 0;
  6528. break;
  6529. case 9:
  6530. if (!ASN1Dec_RegistryAllocateHandleResponse(dec, &(val)->u.registry_allocate_handle_response))
  6531. return 0;
  6532. break;
  6533. case 10:
  6534. if (!ASN1Dec_FunctionNotSupportedResponse(dec, &(val)->u.function_not_supported_response))
  6535. return 0;
  6536. break;
  6537. case 11:
  6538. if (!ASN1Dec_NonStandardPDU(dec, &(val)->u.non_standard_response))
  6539. return 0;
  6540. break;
  6541. case 0:
  6542. /* extension case */
  6543. if (!ASN1PERDecSkipFragmented(dec, 8))
  6544. return 0;
  6545. break;
  6546. default:
  6547. /* impossible */
  6548. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  6549. return 0;
  6550. }
  6551. return 1;
  6552. }
  6553. static void ASN1CALL ASN1Free_ResponsePDU(ResponsePDU *val)
  6554. {
  6555. if (val) {
  6556. switch ((val)->choice) {
  6557. case 1:
  6558. ASN1Free_ConferenceJoinResponse(&(val)->u.conference_join_response);
  6559. break;
  6560. case 2:
  6561. ASN1Free_ConferenceAddResponse(&(val)->u.conference_add_response);
  6562. break;
  6563. case 7:
  6564. ASN1Free_ConferenceTransferResponse(&(val)->u.conference_transfer_response);
  6565. break;
  6566. case 8:
  6567. ASN1Free_RegistryResponse(&(val)->u.registry_response);
  6568. break;
  6569. case 10:
  6570. ASN1Free_FunctionNotSupportedResponse(&(val)->u.function_not_supported_response);
  6571. break;
  6572. case 11:
  6573. ASN1Free_NonStandardPDU(&(val)->u.non_standard_response);
  6574. break;
  6575. }
  6576. }
  6577. }
  6578. static int ASN1CALL ASN1Enc_GCCPDU(ASN1encoding_t enc, GCCPDU *val)
  6579. {
  6580. if (!ASN1PEREncSimpleChoice(enc, (val)->choice, 2))
  6581. return 0;
  6582. switch ((val)->choice) {
  6583. case 1:
  6584. if (!ASN1Enc_RequestPDU(enc, &(val)->u.request))
  6585. return 0;
  6586. break;
  6587. case 2:
  6588. if (!ASN1Enc_ResponsePDU(enc, &(val)->u.response))
  6589. return 0;
  6590. break;
  6591. case 3:
  6592. if (!ASN1Enc_IndicationPDU(enc, &(val)->u.indication))
  6593. return 0;
  6594. break;
  6595. default:
  6596. /* impossible */
  6597. ASN1EncSetError(enc, ASN1_ERR_CHOICE);
  6598. return 0;
  6599. }
  6600. return 1;
  6601. }
  6602. static int ASN1CALL ASN1Dec_GCCPDU(ASN1decoding_t dec, GCCPDU *val)
  6603. {
  6604. if (!ASN1PERDecSimpleChoice(dec, &(val)->choice, 2))
  6605. return 0;
  6606. switch ((val)->choice) {
  6607. case 1:
  6608. if (!ASN1Dec_RequestPDU(dec, &(val)->u.request))
  6609. return 0;
  6610. break;
  6611. case 2:
  6612. if (!ASN1Dec_ResponsePDU(dec, &(val)->u.response))
  6613. return 0;
  6614. break;
  6615. case 3:
  6616. if (!ASN1Dec_IndicationPDU(dec, &(val)->u.indication))
  6617. return 0;
  6618. break;
  6619. default:
  6620. /* impossible */
  6621. ASN1DecSetError(dec, ASN1_ERR_CHOICE);
  6622. return 0;
  6623. }
  6624. return 1;
  6625. }
  6626. static void ASN1CALL ASN1Free_GCCPDU(GCCPDU *val)
  6627. {
  6628. if (val) {
  6629. switch ((val)->choice) {
  6630. case 1:
  6631. ASN1Free_RequestPDU(&(val)->u.request);
  6632. break;
  6633. case 2:
  6634. ASN1Free_ResponsePDU(&(val)->u.response);
  6635. break;
  6636. case 3:
  6637. ASN1Free_IndicationPDU(&(val)->u.indication);
  6638. break;
  6639. }
  6640. }
  6641. }