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

7056 lines
222 KiB

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