Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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